Skip to content

neutmute/TankWar

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

83 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Tank War

An experiment in using SignalR & Websockets.

Battle other players in real time, controlling your tank's turrent using two sliders to control your angle and power.

Each change to a slider is transmitted via signalR to the server. Those settings are used to calculate the projectile motion of a shell upon firing. View the action in a different browser window via the ViewPort which is receiving and rendering the updated shell positions on every game tick. As many viewport windows can be opened as you wish.

The server runs the game loop, ticking time forward every 25ms. The canvas and sprites are rendered using sprite.js.

Tweak game parameters and control the game using the admin page.