Finally I got to the main implementation and use of the VFC model for the NetRumble game.
In order to keep the class as simple and separated from the specific game (Net Rumble) as possible, I used interfaces which must be implemented by the game objects that are intended to be pivots. I’m already using it on the asteroids and the player’s ships.
It’s working just as expected for the asteroids and the ships movement. From the first tests I did it’s clearly observable the difference in the movement of asteroids and, specially, ships. Using the scale parameter to choose the area shown in each player it’s possible to see the enemy ships further away and analyze their behavior depending on the consistency zone in which they are. The jumps in the positions of the ships are very frequent in the outer areas and their movement is smooth in the inner areas, where consistency requirements are tighter. The tightest area of the game should include all or most of the player’s original view of the game.
There’s still one issue I have to deal with in order for the game to run correctly. At this moment I’m using the ship pivot for the input and for the position. The player input includes the movement and the firing of projectiles. I need to change the way the firing is handled and create a new message type for projectiles. Then, the projectile would become a pivot and would be sent to all players accordingly.
Soon I’ll try to post a video feed of the gameplay for you to observe the given behavior. I’ll also now start making some tests to check how much bandwidth is used with and without the use of VFC and collect other useful information about the communication.