Log In  
Page:
1
2

1

not directly, but should be easy to adapt games.
see the 4th item in the faq: https://www.lexaloffle.com/picotron.php?page=faq

P#141506 2024-02-15 00:25

now i was on my computer and i couldn't find out how to close a workspace
(i also tried [Alt]+[Esc] but i found out it's an Openbox shortcut to move the active window to the back
so if Picotron was going to do something with [Alt]+[Esc] Openbox prevented it)

i hope there will be an option to close the workspace when clicking its icon with 2nd mouse button

P#141565 2024-02-16 18:06
1

alt+esc doesn't work

P#141572 2024-02-16 21:54
2

This might sound dumb, but how do I reference other scripts in my main script. (E.g. player collision is in a separate script. I need to reference it in my main script.)

P#144903 2024-03-28 20:53
1

@zep I am a mac user and I LOVE picotron. CMD "r" and "s" sadly don't work. Also using alt and the arrow keys to switch work spaces also doesn't work. Thanks! BTW (CMD "C" and "V" also don't work.)

P#144905 2024-03-28 20:57 ( Edited 2024-03-28 21:07)
1

@JimboTheGod You can use require() to load other files e.g.
require("player.lua") or require "player.lua"

P#144907 2024-03-28 21:00
1

@Soupster, thank you very much! How would I exactly do it. Do I only call it once in the "function _init()"? This is what I wrote and I am getting an error message. In this code "testfunction()" is just prints hello world in the collision.lua file.

function init()
require("collision.lua")
end

function draw()
testfunction()
end

P#144908 2024-03-28 21:17 ( Edited 2024-03-28 21:21)
1

@JimboTheGod require include() executes the contents of the file. If you have it inside _init(), testfunction is local to _init() and cannot be called outside of _init(). It would be equivalent to

function _init()
    function testfunction()
        print("foo")
    end
end

function _update()
    testfunction() -- Doesn't work because testfunction is local to _init()
end

Therefore, you would want to place the require outside of _init() at the top of your code, where it is equivalent to

function testfunction()
    print("foo")
end

function _init()

end

function _update()
    testfunction() -- testfunction is now global
end
P#144909 2024-03-28 21:28 ( Edited 2024-03-29 00:08)
1

we have includes, not require!

P#144914 2024-03-28 22:45
1

@Soupster, thank you very much. The code works now. I realise that writing a function within a function gives a local output. I now used "iclude("collision.lua")" at the beginning of the script. Thank you very much!

P#144939 2024-03-29 05:59
1

Any chance of picotron coming to raspberry pi?

P#145934 2024-04-06 23:34

yes, there is a chance of Picotron coming to Raspberry Pi.

out of Lexaloffle's standalone games (i mean games which don't run in a fantasy console), none of them run on Raspberry Pi —
although the only one with a trailer has a 15‐year‐old trailer, and Swarm Racer 3000 is still in development.

Pico‐8 is Lexaloffle's only fantasy console on Raspberry Pi, thought it's in Beta and the others are in Alpha.

P#145945 2024-04-07 03:21
Page:

[Please log in to post a comment]

Follow Lexaloffle:          
Generated 2024-04-17 04:39:24 | 0.059s | Q:28