Wednesday, September 4, 2013

Weekly Update 09/04/2013

Gravitum:
The ship has sailed! Go check it out now at Kongregate or Newgrounds


M.I.N.T (Mecha, Infantry, and Tactics):
Development work has resumed on this now that Gravitum is wrapped up, and I've completed switching the client to use a command style architecture. This was mostly to allow easy synchronization of network logic and client animation.

Imagine you request to move your mech to some new area. Simple request in theory, but under the scenes this really sends a move request to the server or listen server in the case of single player. The server than validates if the move is legit (No easy cheating like in some MP strategy games that have authoritative clients.), then runs the simulation on the server.

Which in this case starts out as three steps to the northwest. Each step is taken, and on the second step an enemy unit is spotted, and a reaction fire happens, resulting in a critical strike to your mech and your mech exploding.

The server now needs to inform the client of this. So we end up creating a new command queue packet, and place in it a move NW command, another move NW command, an Add Unit X at Y command, a Unit X does attack Y to your unit, along with a damage amount, and finally a remove unit command, telling you to remove your mech as its been destroyed.

The client receives this, and knows based on the command queue packet that there is a total of 5 actions/commands attached to this, and so it waits for all of those to arrive if they haven't. Then it can just play out each command in order and get perfect synchronization.

No comments:

Post a Comment