New playable vehicle!
New playable vehicle?
The goal has always been to make an arena game with unique abilities and vehicles to choose from so luckily for me the framework to implement a new vehicle and ability was pretty much already done... Well not quite... Introducing a vehicle with a much more agile and fast-phased driving style revealed some issues with the synchronization between the server and clients. The solution I originally had relied on the client sending both its position and inputs to the server, then the server would take those inputs and calculate the movement as well to confirm the player's location and if the positions don't match up it will slowly slide the position towards where position received from the client is. This works very well for slow-moving objects with a set amount of acceleration, braking force, turning rate, and speed. But for the new vehicle, the server could not keep up even if the adjustment was tuned to approximate the position by half the player speed each tick which opens up for speed hacking.
So I reworked how both the server and client do their game loop by introducing a few tricks:
- Deterministic tick time: The game-loops only update in a set interval to always get the same results and avoid discrepancies due to rounding errors
- Authoritative server: The client no longer tells the server where it is, it only shares its inputs so the server can determine where all the players are and the client interpolates toward their real location.
- Server prediction: When the servers receive a new update it predicts how far the players should have moved in the time between sending the request and the server receiving it. This cancels out the feel of input lag created by interpolating the client to their server location
New content
- New vehicle: The Missile Car
- New abilities: Freefire and Energy Ball
- New Upgrades: *Upgrades reworked* All old upgrades are replaced with new vehicle-specific upgrades
- Sprites: Missile Car sprites, Upgrade sprites, Ability Particles for EnergyBall and Dash and UI elements
Backend
- Better server-client syncronization
- Better system to implement upgrades
- Better system to implement vehicles
- Better system to implement abilities
- Optimizing server: Gameloop about 20% faster, Request handling about 40% faster
- New movement system
- Deterministic Tick
- Unlock system: Complete a game to gain access to the Missile Car
- Created my own Profiler to keep track of performance
- Much better player on player collision, not perfect yet but it should be serviceable
- SO much much more...
Hope to see you in the arena, the test server is finally back up!
Files
Get Tank Arena Online - open network test
Tank Arena Online - open network test
Fight warmachines in a competative online arena!
Status | In development |
Author | Voidspell Games |
Genre | Strategy, Action |
Tags | 2D, Multiplayer, Tanks, Top-Down |
Languages | English |
More posts
- Successful networking test!!!54 days ago
- Network test!62 days ago
Leave a comment
Log in with itch.io to leave a comment.