multiplayer, 3rd person camera prototype, ice spell and ice tower

Last week was a public holiday in Germany and I could spend some more time in the development of  my game. I achieved quite a lot, much more that I have every thought could be possible. In total I spend +40 hours last week.

I implemented the foundation for the multiplayer mode for my game. You are able to play with multiple player simultaneously. The game runs with the server-client model. One player starts a server and the other players can join the server. The server is in charge of handling the main components of the games like spawning waves.  I implemented the Entity interpolation algorithm of the source engine that is powering games like Counter Strike to compensate lagging of movement. Next to that I wrote a generic script that takes care of replication. You can define in the editor a property (e.g. hp, mana) that must be synchronized with other players.  You can decide if a property should be send reliable (TPC) or unreliable (UDP) . Property are only replicated if their value changed. The script does even take care to replicate everything to player that join a running game. If for instance a player joins, the current hp is send to the new player and you don’t have to worry about it. Interactive components like casting a spell are even more complex, you must synchronize casting animation and so on. I have implemented this in a very generic and even simple way to extend it in the future. I basically serialize a object like the spell, send it to all other player and execute it.  The executed version at the other player has slightly different behavior  than the person who actually cast the spell.

Most tower defense games employ either a isometric camera or a top down view. My game should take this to the next level so I implemented a prototype to bring the player closer to the action with a 3rd person camera.

The effect of the fireball has been replaced with a new one that looks much better. I added the iceball spell and the ice tower. In conjunction with the new ice spells, I have rewritten the fire one in a generic way. So I just have to tweak some parameter in the editor to create a fire or ice spell. That was also useful for the multiplayer support: I have only one piece of code that takes care of synchronizing the iceball and fireball.

The sneak preview video of this week is much longer. I even did some video editing to put everything together. I hope you enjoy it.

3rd person camera prototype



New ice tower


Multiplayer test with 4 games running on my laptop