Log In  

Hello
Just curious, are there any plans to integrate functionality for handling sockets to pico8? I can't seem to find anything on it so I'm assuming there is no support at this moment anyway.

P#93851 2021-06-22 16:12

I do not expect support for sockets in PICO-8 directly. However, you can already realize socket communication via GPIO. I recently used this to create the online multi-player game Martian Dice. In my write-up at itch.io you can find some more details. For full details see the source code on GitHub.

P#93854 2021-06-22 17:25

Thats very cool eriban, although that might be to overkill for most people from a "gaming" perspective.

Hm, haven't really looked at how the source is built for html exports. I noticed the registration form had a captcha made with pico8 (also pretty cool imo) so I'm assuming there are ways to allow for some kind of communication when running the export on a web server- or may be it only allows for reading data?
If you or anyone else has any references on this, I'd love to have a look at it.

P#93855 2021-06-22 17:41

Look for GPIO in the official manual. On raspberry pi, it’s a memory area used to interact with the pins and sensors or actuators connected to them. In HTML exports, that memory area is mapped to a javascript array and you can use that to communicate data between js and the cart. (There are some libs around to make that easier, but rolling your own works too.)

For pico-8 1.0, we will get a few functions to save and retrieve online scores. 'login(...)' may prompt the player to accept connecting to the bbs, then 'scoresub(level, score)' will save score for current game and current player, and another function will let us get the scores. It should be possible to use that data storage to implement some turn-by-turn games.

P#93870 2021-06-22 23:34 ( Edited 2021-06-22 23:35)

Thank you merwork!

P#93875 2021-06-23 06:37

[Please log in to post a comment]

Follow Lexaloffle:          
Generated 2024-04-18 15:09:14 | 0.006s | Q:14