Log In  

Well, before the game start, users need to type their name or nicknames. But I don't know how.
any methods or functions??

P#52098 2018-04-28 06:07 ( Edited 2018-04-28 19:10)

Pico is supposed to be a console (shipped w/ a devkit ;), keyboard is not recommended but possible.
See: stat(31)
Btw, rtfm ;)

P#52099 2018-04-28 08:16 ( Edited 2018-04-28 12:16)

https://www.lexaloffle.com/bbs/?tid=31079
You can use my mouse and keyboard library for this. Copy the library into your code and just use the simple predefined variable's to get the state of the keyboard or mouse.The only thing you don't need to copy is the demo function but definitely check out it out for more info on how things work. Just be aware if you want them to type in their names that the 'p' key is mapped to pause in pico8 so the game will pause unless you manually suppress it.
Which you can do with this

poke(0x5f30,1)

however you're going to do it for EACH time they would press P. So do it once default at the beginning of your init function and then again after each time they press P, but ONLY when you'd be getting their text input, because otherwise they would be unable to open the menu.

P#52105 2018-04-28 09:58 ( Edited 2018-04-28 13:59)

thanks everybody

P#52106 2018-04-28 10:12 ( Edited 2018-04-28 14:12)

Or you know... Do it the retro way.

If you're not too young to remember how console games used to provide a keyboard input method.

P#52110 2018-04-28 15:10 ( Edited 2018-04-28 19:10)

[Please log in to post a comment]

Follow Lexaloffle:          
Generated 2024-04-20 03:45:15 | 0.007s | Q:19