Day 3 - let there be spawn points!

Multiplayer is proving to be incredibly frustrating with Godot. Managing the multiplayer authority has been a struggle. The actual attribute syncing part is pretty easy - once it works. Just add whatever attribute you want sync’d to the MultiplayerSyncromizer list of attributes.

Spawn Point Design

The design for the spawn point is to create a scene object (SpawnPoint) which can be dropped anywhere in the world. The SpawnPoint contains 3 child nodes:

  • Marker3D
  • CSGBox3D
  • MultiplayerSynchronizer (this will be going away)

The server will maintain a list of spawn points, and which ones have been used. As clients join, they are assigned to a spawn point. Where things get weird is because the server isn’t the multiplayer authority on each client’s car - they are. So in order to move the car to the spawn, an attribute needs to be set via RPC. Each Car object has a set_location RPC that the server can call which will move the car to the desired location.

This kind of works. Each car, when placed in the scene, is correctly dropped on a new spawn point. Unfortunately, along the way I somehow broke syncing - the car positions aren’t being updated as they move around!

One step forward, two steps back. Welcome to game development! 🤦‍♂️

Art Assets

We realized that having some art assets that aren’t complete junk would make the development process feel a little more exciting. The fix was easy - Use Kenny’s art packs! The’re completely free - which is insane to think about. The entire collection is available in one convenient package for $20 on Itch. Do yourself a favor and check out what building blocks are available. Browsing the asset packs may actually get the creative juices flowing as well.