Multiplayer ball bouncing game

after I saw this project by @calculator I decided to update one of my old projects with the MQTT library. here it is: multi-snap ball


click the flag to begin searching for a second player. once another player is found the game should start automatically. the ball will bounce between the players' screens by hitting the edge or hitting the portal.

the portal can be dragged, and pressing space will hide it (you can press space again to show it again) if you click on the ball it will bounce in a random direction. have fun!

instead of pressing the flag, you can press k to create a custom server with a server code, the game will start once someone joins by pressing j and entering the server code

I tried playing it with my sisters account but it seemed broken. her screen had 1 blue portal and my screen had 1 orange portal, is it supposed to be like that?

yes. was there a ball bouncing between the screens?


the portals are different colours because of the game Portal

wait so how does the game work then

once you connect to another snap! session, the green ball will bounce between them. it can also go through the portal and come out the portal on the other side. the portals are draggable, and if you manage to click on the ball it will turn in a random direction
(its not really much of a game, its just a little thing I made to show how to make it look like a ball is bouncing between two snap! sessions, and i added the portals to make it a bit more interesting.)

i see, but for some reason the other player's portal isn't visible

if you press space the portal hides itself. press space again to show it.
(look in the guide tag on the original post)

oooooooooooooooooooooooooooooo i see now

You can share server codes on the forums by using the K and J keys in the project

this is the first multiplayer game I've made, but I might make some more if I can find fast and reliable cloud variables

nah there arent any you can use mqtt

How do you know for sure there aren’t any?
Besides, MQTT is too slow

It doesn’t need to be super fast. Just not slow.

18001767679 has been looking for them for years, and the fastest ones are turbowarp an d mqtt

nothing passes 200ms here

That would probably be fine, but it needs to be reliable

What’s turbowarp?

The problem is that I need to transmit 24 x 18 2D lists
edit: actually, I just tested using MQTT and it is really fast.