794 shaares
95 liens privés
95 liens privés
When we started developing our recently-released mini-strategy game 2 Planets, we wanted to add networked multiplayer support. Since the game is a side project and would be released for free, we didn’t want to spend much time and money on maintaining dedicated servers. Instead, we chose a simple peer-to-peer networking setup where both players would connect to the other player’s machine directly.
Setting up your own
You’ll need the following:
- The excellent HolePuncher Godot plugin and server by Cregg Hancock
- A server or service allowing you to host a small python application (e.g. Heroku or Vercel)
- Basic networking and server administration knowledge. Using a service like Heroku, you can get a python server up and running pretty easily, but you’ll still need some experience to configure everything correctly.
- An understanding of Godot’s multiplayer API for connecting clients using the IP obtained from the rendezvous server and synchronizing the game state.