games in real time

bosh77

New Member
Joined
Oct 26, 2019
Hi, how can I create an online multiplayer game, where apps can communicate with each other in real time? Is there any example or module with which you can do this?
 
Last edited:

adamredwoods

Member
3rd Party Tool Dev
Joined
Jun 23, 2017
I don't think there's a specific module, but here's a limited example: https://www.cerberus-x.com/community/threads/how-to-use-realtime-co-for-a-turn-based-multiplayer-game.639/

Cerberus X can use websockets, which is a good way to go, not sure if it uses WebRTC.
https://webrtc.org/getting-started/overview

You can do just fine with websockets game, but the difficult part is deciding on a server to maintain game sessions and state. If someone drops off for 3 seconds, how is the game handled? Using a self-hosted (or on AWS, Vultr) server is one way:
https://github.com/colyseus/colyseus

I think there are hosting game servers out there, Google Cloud seems to have one: https://cloud.google.com/game-servers
It would be possible to forego a server, but the two (or more) machines would have to know each other's IP addresses.
 
Top Bottom