Log In  

Will pico8 ever set foot into the scary realm of the internet?

By that of course I mean will socket support be added to pico8 so that our little games can go online at all?

I understand that socket support is more than likely being intentionally left out to keep in period with the aesthetic but can't help thinking how cool it would be if the little programs we make can go online.

The obvious problem would be with offloading processing of applications thereby turning pico8 into something it shouldn't be, but if sockets were properly limited as well, we could make some really cool stuff!

For instance, if you could simulate a low 'baud' rate or limit socket requests to once every 5 seconds with a small buffer size, or maybe even a choice between one or the other.

With this addition maybe I'd be able to write a BBS post from in-system instead of on the website. Or maybe just be able to watch my twitter feed!

P#11491 2015-07-07 15:21 ( Edited 2016-05-17 19:08)

Heh, this is one of those things I didn't want to post about unless somehow brought it up. It's on my wishlish as a post-1.0 thing, but I haven't done enough on it yet to be sure. So, standard blue-sky feature disclaimer applies.

I view online connectivity in 2 categories:

  1. bbs interaction. It wouldn't be possible to grab a twitter feed, but there might a limited way to grab post data and carts. This would allow things like making a custom bbs cartridge browser and possibly even collaboration tools. At the very least, there needs to be a nicer way to download and organise carts from the bbs locally.

  2. remote pico-8 interaction. There wouldn't be anything that resembles a lobby, but users would be able to host a session and invite others to join via a key (which contains the host ip). Each guest would either receive a copy of the cartridge and communicate via in/out packet streams, or operate as a dumb terminal. The api could potentially be quite simple (if inefficient), by always broadcasting to every connected user.

So, not useful for action games. But imagine the MMOGs!

while(true) do
  packet = receive()
  if (packet ~= nil) then
    print("data from user: "..packet.id) -- 1..n guests
    print("length: "..#packet.dat) -- should be 1
    print("user "..packet.id.." pressed button "..packet.dat[1])

  for i=0,5 do
    if (btn(i)) then
P#11505 2015-07-07 22:45 ( Edited 2015-07-08 02:47)



I'm really relieved and excited to hear that this is something you've thought about even if it's a long way off the roadmap.

I'm super excited for a more feature complete voxatron and pico8, keep up the awesome work!

P#11513 2015-07-08 01:43 ( Edited 2015-07-08 05:43)

Hey Zep,
is there a test build with that feature? any way I can help?

P#20622 2016-05-15 19:02 ( Edited 2016-05-15 23:02)

As someone who is just starting their journey into programming, anything with network connectivity is beyond my wildest dreams...

...but I would love to be able to browse BBS from within PICO-8.

P#20623 2016-05-15 21:14 ( Edited 2016-05-16 01:14)

Make sure the "key" includes a port number too, unless you're planning to do some NAT punching, zep.

I don't have router access to forward an arbitrary hardcoded port number, but I can host on a custom port as long as I can dictate it to the program.

P#20673 2016-05-16 20:16 ( Edited 2016-05-17 00:16)

Zep, to be fair, I'd be happy enough with opening a client socket to a port. :)

P#20696 2016-05-17 11:10 ( Edited 2016-05-17 15:10)

It'd be great if cartridges were capable of peeking and poking values to some shared address space in order to enable global score boards etc. Say, dunno, 16 bytes per cartridge?

(A hash value of the current cartridge code could be sent along for security purposes, or some cryptographic query/response protocol could be in place. The global memory could be written only when the cart author-approved hash is used. And only a limited number of requests could be issued by the clients per a unit of time, but those are all technicalities.)

P#20715 2016-05-17 15:08 ( Edited 2016-05-17 19:08)

[Please log in to post a comment]