itch.io is community of indie game creators and players

Devlogs

Shard War: Netcode for GameObjects

Shard War
A browser game made in HTML5

I decided the prototype could use a little realtime magic!

Having previously used Mirror/FishNet I decided to take a small risk and try out Unity's newest multiplayer solution: Netcode for GameObjects


Opinion: it's pretty good, I was able to get my own realtime relay server working within a few hours, and have got the core battle system working with 2 players, and simple matchmaking.

The unity transport protocol only works with sockets, but there is a web-socket implementation which I will give a go at implementing soon.

Some gotchas that tripped me up:

  • If using an external hosting solution, have the server listen on 0.0.0.0, it will bind to all available addresses on the target machine and then you can just connect to the public, internet facing IP as usual.
  • On the server set the Application.targetFrameRate = 30; to stop it eating all your CPU resources.

Check out the latest build for a preview of the multiplayer, it still has a fair few bugs but is definitely playable :)

Files

  • ShardWar-Prototype-Windows.zip 36 MB
    Nov 28, 2022
Download Shard War
Leave a comment