# \[Phaser 2\] Mini Pool

**URL:** <https://phaser.discourse.group/t/phaser-2-mini-pool/455>\
**Category:** Showcase\
**Created:** [December 23, 2018, 6:40pm UTC](https://phaser.discourse.group/t/phaser-2-mini-pool/455 "2018-12-23T18:40:37Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![enriqueto](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/enriqueto/32/84_2.png) [@enriqueto](https://phaser.discourse.group/u/enriqueto)\
**Post date:** [December 23, 2018, 6:40pm UTC](https://phaser.discourse.group/t/phaser-2-mini-pool/455/1 "2018-12-23T18:40:37Z")

</div>

A game we developed exclusively for [minijuegos.com](http://minijuegos.com). The server side uses [Colyseus](http://colyseus.io/).

[![42](https://global.discourse-cdn.com/free1/uploads/phaser1/original/1X/b780e137920ea39b6080312a383189ca759c8a62.jpeg)](https://www.minijuegos.com/juego/mini-pool-io)

---

<div class="post-metadata">

**Author:** ![B3L7](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/b3l7/32/25_2.png) [@B3L7](https://phaser.discourse.group/u/B3L7)\
**Post date:** [December 24, 2018, 5:09pm UTC](https://phaser.discourse.group/t/phaser-2-mini-pool/455/2 "2018-12-24T17:09:12Z")

</div>

Very impressive! Well done.

---

<div class="post-metadata">

**Author:** ![PBMCube](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/pbmcube/32/93_2.png) [@PBMCube](https://phaser.discourse.group/u/PBMCube)\
**Post date:** [December 25, 2018, 1:22pm UTC](https://phaser.discourse.group/t/phaser-2-mini-pool/455/3 "2018-12-25T13:22:03Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![enriqueto](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/enriqueto/32/84_2.png) [@enriqueto](https://phaser.discourse.group/u/enriqueto)\
**Post date:** [December 26, 2018, 9:05am UTC](https://phaser.discourse.group/t/phaser-2-mini-pool/455/4 "2018-12-26T09:05:09Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![theNeedle](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/theneedle/32/745_2.png) [@theNeedle](https://phaser.discourse.group/u/theNeedle)\
**Post date:** [March 15, 2019, 12:45pm UTC](https://phaser.discourse.group/t/phaser-2-mini-pool/455/5 "2019-03-15T12:45:08Z")

</div>

Nicely done. Looks superb 👌.  
Stumbled upon [your issue on p2.js](https://github.com/schteppe/p2.js/issues/312) 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](http://Socket.io) for networking. Have you thought about using [socket.io](http://socket.io)? How was your experience with Colyseus? Would love to know your thoughts.

---

<div class="post-metadata">

**Author:** ![PBMCube](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/pbmcube/32/93_2.png) [@PBMCube](https://phaser.discourse.group/u/PBMCube)\
**Post date:** [March 16, 2019, 7:58pm UTC](https://phaser.discourse.group/t/phaser-2-mini-pool/455/6 "2019-03-16T19:58:24Z")

</div>

I read in the [**Phaser Multiplayer Gaming System**](https://leanpub.com/rrgamingsystem) **page 86;** there’s an atrocious bandwidth overhead when using [Socket.IO](http://Socket.IO). Quoting the author . . .

- WebSocket Results: 2 requests, 1.50 KB, 0.05 seconds
- [Socket.IO](http://Socket.IO) Results: 6 requests, 181.56 KB, 0.25 seconds

I wonder why folks are still using this???

---

<div class="post-metadata">

**Author:** ![theNeedle](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/theneedle/32/745_2.png) [@theNeedle](https://phaser.discourse.group/u/theNeedle)\
**Post date:** [March 16, 2019, 8:56pm UTC](https://phaser.discourse.group/t/phaser-2-mini-pool/455/7 "2019-03-16T20:56:44Z")

</div>

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

> [@PBMCube](#):
>
> - WebSocket Results: 2 requests, 1.50 KB, 0.05 seconds
> - [Socket.IO](http://Socket.IO) Results: 6 requests, 181.56 KB, 0.25 seconds

I think author is referencing to [this answer on SO.](https://stackoverflow.com/a/38558531/8570496) 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](http://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](http://Colyseus.io) in next projects. Looks promising.

---

<div class="post-metadata">

**Author:** ![PBMCube](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/pbmcube/32/93_2.png) [@PBMCube](https://phaser.discourse.group/u/PBMCube)\
**Post date:** [March 16, 2019, 10:52pm UTC](https://phaser.discourse.group/t/phaser-2-mini-pool/455/8 "2019-03-16T22:52:36Z")

</div>

Appreciate the update and quick response.
