Two players or more game communication

Hamied Abou Hulaikah

Well-Known Member
Licensed User
Longtime User
Challenge game between multiple online players.
I think about using MQTT pub/sub model for communication/interaction, I think it is better than traditional client/server communication, any suggestion?
 

ilan

Expert
Licensed User
Longtime User
had a look at socket.io and i think it could be also a good option.

i will make more tests and put my feedback on it but it looks promising for simple games.

 

ilan

Expert
Licensed User
Longtime User

Hamied Abou Hulaikah

Well-Known Member
Licensed User
Longtime User
jServer is traditional client/server communication, that is means many factors can affect its speed/performance.
socket.io is my second option after mqtt, it has more features, but I'm not familiar with it deeply.
 

ilan

Expert
Licensed User
Longtime User
socket.io is my second option after mqtt, it has more features, but I'm not familiar with it deeply.

i am also not familiar with socket.io and MQTT so i would start study socket.io.
what i have seen it does not look to complicated. i tried the chat example they offer and it looks really good. performance was very good but again i tried it on the same network so i need to make more tests.
 

Hamied Abou Hulaikah

Well-Known Member
Licensed User
Longtime User
Using MQTT or socket.io need us to carefully planning of game workflow, or when players size increase we'll lost control.
 

ilan

Expert
Licensed User
Longtime User
Using MQTT or socket.io need us to carefully planning of game workflow, or when players size increase we'll lost control.

you can always limit the player amount if this is an issue. again it depends a lot on what kind of game you want to do.
a multiplayer poker game will be much simpler than a car racing game.
 

ilan

Expert
Licensed User
Longtime User
Chat has low connection traffic, multiplayer game has a massive connection traffic for controlling everything in the game.

yes i know but i saw that people did really nice games with socke.io
first I will try to run socke.io with b4j and after that, i can try to make a simple box2d game like PONG and from there make more complex games.

we have already socket.io for b4a and b4i but its an old version so i hope it will get updated soon and we can also make b4x apps using socket.io that connects to a b4j webserver or maybe nodejs server (what is already possible)
 

Hamied Abou Hulaikah

Well-Known Member
Licensed User
Longtime User
I hope b4x to fully support latest era of socket.io, it is amazing like mqtt.
@ilan; we'll wait your new library of socket.io :)
 
Top