Progress Update 2018-05-13
This week I worked on refactoring RWE to decouple the concept of player commands from the local computer. More concretely this means that when you issue a command to a unit, the command is not directly given to the unit but rather placed into a queue to be issued at the appropriate future time in the simulation. At each time step, the simulation consumes the next set of commands in the queue for each player. This may be the empty set, if the player did not issue any commands for that time step. If the game reaches a point in time where the queue for a player is empty, the simulation is paused until the commands (or lack of commands) do arrive.
The reason for adding this logic is firstly to enable commands to come from the network, rather than just the local player’s computer, and secondly to accommodate network latency. Network communication is slow and unpredictable, so it’s important to account for this by building in some kind of delay or compensation that can be tuned based on the quality of players’ connections.
As mentioned in earlier posts, this week RWE also received some bugfixes and enhancements, mainly to cob support, which is what allows the Zarganeth and MKL to work. This also likely enables various other units to work rather than just crashing the engine.
Next week I will continue this work with the aim of having network players actually send and receive packets between each other in the game.
You guys seem to love the gifs so here’s one I posted on Discord a few weeks ago featuring the commanders from Zero. The black lasers are a placeholder because RWE doesn’t support other types of weapon yet.