Saturday, June 28, 2014

Stickarena

I've been remembering how to make online games by making Stickarena, a real-time action game made with html5 using canvas, websockets and a nodejs server.


The game is about hitting other players with a stick, winning/losing medals on every victory/defeat, which creates money that can be used to build a village and improve the player.

All the processing is done by the server at 30 fps, only sending the information that has changed every 100ms simplified in an optimal way though I still haven't got the time to go deep with the "snapshot system".

On the client side the information is send every clock (16ms) but only if something happened (like player input). Though the server works at 30fps, thanks to the prediction system I can show the action at 60fps. I've also implemented lag compensation and movement interpolation to avoid weird movement behaviors.

I think all the base is done, I have been fightning to get an external nodejs server up without success, so I probably not going to bother anymore as I did this only to practice game networking.

No comments:

Post a Comment