Multi Player Rocks - a 2D exploration of networking in Godot 4

I’ve created two simple ‘games’ with Godot 4, playing around with networking.

Multi Player Rocks is the SERVER (for now) where you can fly a ship around and see the rocks - and not a lot else.

Multi Player Observer is a simple CLIENT that lets you see an overall view of all the rocks (in green) and one player (white). If you move the player, its position should update in the observer client.

Next step would be to make the mp-rocks-01 be a client too and connect to one server, then have multiple ships flying around, but I’m not there yet.

2 Likes

Project looks good visually, for sure, but I’m not quite sure what the objective would be here. Considering game is in quotations, I wouldn’t necessarily call this a playable experience (since you mentioned it’s for exploration and showcasing). However, this could make for a nice PvP game revolving around either shooting rocks into other players or having players hit rocks, but as it stands, this is a really nice demonstration!

I’m trying to answer some questions here - what’s the best way to create a multiplayer 2D game with lots of rocks, a few player ships, some alien ships, planets etc.

I’m using RPC to communicate, however I seem to remember that’s not the only way to do that with Godot.

Some of the more tricky questions I have:

  • How do I use physics between server and client - use RigitBody2D in the server and CharacterBody2D in the client, so the two remain in sync?
  • Is blasting out updates for all 140+ objects the best way to keep everything in sync between server and client?

I’m using this as a stepping stone for something bigger, however I see no reason why others shouldn’t see how I’ve got this working and adapt if for their use as well.

This is an interesting learning exercise - by trying stuff out.

1 Like