Robot War Engine

Progress Update 2018-05-20

This week, RWE learnt that some players in the game can be controlled by the network and can now communicate with these players. This means that it is now possible to play a network game in RWE. Note that this feature is still living in a separate network branch for now as the implementation still needs some polish before I’m happy with it.

Setting this up right now is quite tedious. In order to get this to work you must carefully ensure that all copies of RWE have the same data. Each player must swap network addresses and port numbers, then launch RWE with a carefully written set of command-line arguments to allow the two instances to connect to each other. In addition, RWE does not support any NAT holepunching techniques, so you must either be on the same local network or add appropriate port forwarding rules to your router.

In order to make this easier, the plan is to develop a separate launcher application that will take care of these issues and serve as the pre-game lobby, instead of the traditional TA battleroom. This will be easier/quicker to develop than adding these capabilities directly to the engine and will later serve as a platform for other features I have planned.

Here is the first network game of RWE in action. It’s being played in two separate instances of RWE running on the same computer, so I have neatly arranged the windows so you can see both. You’ll see it’s obvious that they are not quite in sync and that there is at least a second of lag issuing commands. This is because of clock drift between the two instances (one is running ahead of the other) which the network protocol does not attempt to correct yet. This will be ironed out in a future version. I also tested this between two separate computers over a weak wifi signal and results were not too bad.

Next week I’ll work on fixes and improvements to the network code and consider starting on the launcher.