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


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


1

alt+esc doesn't work


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.)


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.)


1

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


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


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

1

we have includes, not require!


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!


1

Any chance of picotron coming to raspberry pi?


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.


Page:

[Please log in to post a comment]