[Phaser 2] Mini Pool

#1

A game we developed exclusively for minijuegos.com. The server side uses Colyseus.

42

6 Likes
#2

Very impressive! Well done.

#3

This might be too sensitive for a public answer; but, I was wondering why you chose Colyseus above all other possible solutions.

#4

It’s actually my first multiplayer game. I did it to gain experience in multiplayer development. I considered doing it directly using node and websockets but colyseus seemed simple enough. I code my games in TypeScript and colyseus works with TS. The state synchronization that colyseus offers is quite handy. No need to send messages all the time because the framework informs all clients when the state of the room has changed. Basically the client needs to check the changes on the state and act accordingly.

Which other options would you have tried for a game like this?

#5

Nicely done. Looks superb :ok_hand:.
Stumbled upon your issue on p2.js while searching for determinism of p2 physics. So, did you use p2 or coded your custom physics? How did you solve syncing?

I’m using p2 in my multiplayer carrom(somewhat similar to pool) game. And using Socket.io for networking. Have you thought about using socket.io? How was your experience with Colyseus? Would love to know your thoughts.

#6

I read in the Phaser Multiplayer Gaming System page 86; there’s an atrocious bandwidth overhead when using Socket.IO. Quoting the author . . .

  • WebSocket Results: 2 requests, 1.50 KB, 0.05 seconds
  • Socket.IO Results: 6 requests, 181.56 KB, 0.25 seconds

I wonder why folks are still using this???

#7

Maybe because it’s easy to use atleast in simple use cases.

I think author is referencing to this answer on SO. And as per the test performed in that answer 180KB is for the socketio client library, which is downloaded only once. imo it’s not a fair comparison cause here socket.io provides many functionalities and fallback mechanism while plain websocket don’t have any of these.

Though I will definitely look forward to using Colyseus.io in next projects. Looks promising.

#8

Appreciate the update and quick response.