Skip to content

brad-colbert/atank

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

image
ATank is a multiplayer (networked), overhead view, tank battle game inspired by XTank.

Overview

This multiplayer tank combat game delivers intense battles in a sprawling, maze-like arena. You command a heavily armed tank, navigating corridors, dodging enemy fire, and striking with precision to eliminate opponents before they take you down. Success demands a sharp mind, quick reflexes, and precise control of your tank’s movement and firepower.

Every opponent you face is another human player, each piloting a custom-designed tank with one goal—your destruction. Careful strategy, split-second decisions, and mastery of the battlefield are key to staying alive and emerging victorious.

The game pushes the limits of its hardware to maintain smooth, real-time combat between multiple players. While customization is more constrained than in modern games, players can still tweak tank attributes and battlefield layouts, ensuring each match remains fresh and unpredictable. Whether fighting in chaotic free-for-alls or structured team battles, every game is a fast-paced test of skill, adaptability, and tactical thinking.

Status

2025/03/04\

Game Architecture Overview

The game follows a client-server architecture, where multiple clients (player-controlled tanks running on 6502-based computers) connect to a central server that manages game state and synchronization. This setup ensures smooth multiplayer gameplay while minimizing computational demands on the resource-limited clients.

Server Role

The server is responsible for:

  • Game State Management: Maintaining the authoritative state of the game world, including tank positions, projectiles, collisions, and environmental changes.
  • Synchronization: Sending updates at 20Hz to ensure all clients have a consistent view of the battlefield while minimizing network overhead.
  • Hit Detection & Resolution: Determining when projectiles hit tanks or obstacles and processing damage or destruction events.
  • Game Rules & Logic: Enforcing game rules, handling respawns, match progression, and scorekeeping.
  • Client Communication: Receiving player inputs, validating them, and broadcasting necessary updates to all connected players.

Client Role

Each client (a player’s 6502-based computer) is responsible for:

  • Rendering: Drawing the game world, including tanks, projectiles, and the maze, based on the latest updates from the server.
  • Input Handling: Capturing player controls (movement, firing, etc.) and sending them to the server with minimal delay.
  • Prediction & Smoothing: Estimating movement and actions between server updates to reduce perceived lag while keeping gameplay responsive.
  • Sound & Effects: Handling any local audio or visual effects that enhance the experience but do not affect core gameplay mechanics.

Network Model

  • The game operates on a low-bandwidth model, with clients sending only essential input data to the server and receiving compact updates in return.
  • Clients operate as thin clients, meaning the server has authority over all game mechanics, reducing the risk of desynchronization or cheating. This architecture ensures that even with the limitations of 6502-based hardware, the game remains fluid and responsive, with the server handling most of the computationally expensive tasks while clients focus on smooth rendering and player interaction.

References

XTank (https://github.com/lidl/xtank)

Below are some screenshots from XTank. Pasted here for reference for developers.

XTank Intro Screen

image

XTank Gameplay Screens

image

image

image

About

A multiplayer tank battle game for 8-bit machines (think XTank)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •