The mysteries of networking code

I am almost done the load/save code.  This will be a HUGE milestone, because not only does it provide the foundation for the full multiplayer code, but it allows long term play of Rank: Warmaster.  This is crucial since any testing so far was always a brand new game because it had to be.  I am leveraging the networking code as the load/save code.  Because there are almost 60 structures types that need to be sent, this is rather complicated, needless to say.  Until earlier this month, the basics were being sent by hand.  No longer.  I am rather proud of a “byte code” concept that I came up with to move structures simply.  By defining an entire structure, not only can it be broken down generically and sent, but it can be reassembled the same way on the other side with minimal data transferred.   Another advantage is that it reweaves itself back into the client system as if it was natively created there.  This allows me to send entire waves of information and it finds the right spot to go to on the other side.  Without this new means of data transfer, I would still be doing things by hand and I would be months away from finishing this piece of the game.

 

This has already been tested in deep space, and that worked perfectly.  While I had reported earlier about getting the multiplayer code running, which was true, this is now sending the entire game state, including the cities and buildings, damage, and other background information, which is far more complicated (including the individual tech trees).   I am greatly looking forward to seeing everything in action!

 

No feedback yet
Leave a comment

Click here to log in if you already have an account on this site.
Your email address will not be revealed on this site.
BadExcellent
(Set cookies so I don't need to fill out my details next time)
(Allow users to contact me through a message form -- Your email will not be revealed!)

What goes tick tock?
Please answer the question above.