Tank Combat Game - Week 4 Devlog


Tank Combat Game - Week 3-4 Devlog

What I’m Building

A modernized Battle City inspired tank combat game. Instead of just “protect the eagle,” I want varied missions, destructible terrain, multiple tank configurations, and eventually randomized stages.

This Week’s Progress

Input Adapter Pattern Implementation

Built a clean input system that separates “what the tank should do” from “how the player controls it.” This means:

  • Player tanks use keyboard input
  • AI tanks use different behavioral patterns
  • Future: gamepad support, network input, replay systems
  • All use the same underlying tank logic
// Same tank, different input sources
tank.inputProvider = new KeyboardInputProvider();
tank.inputProvider = new BerserkerAIInputProvider();
// Tank behavior stays identical

Physics & Destructible Terrain

  • Projectile pooling system for performance
  • Tile-based destruction with crater generation
  • Different tile types with properties (destructible vs indestructible)
  • Physics manager handles all collision logic centrally

Map Integration with Tiled

Got object-based spawning working with Tiled maps. Tanks spawn from map data rather than hardcoded positions. This enables:

  • Designer control over spawn locations
  • Multiple spawn types (player, AI, different teams)
  • Easy level creation workflow

AI Berserkers

Implemented chaotic AI tanks that roam the map destroying everything. They serve as both gameplay elements and stress tests for the physics system.

Technical Challenges Solved

Tiled Export Issues: External tilesets don’t play nice with Phaser. Solution: embed tilesets during export.

Input Architecture: Spent time designing a system that scales from single-player to multiplayer without rewriting core logic.

Collision Complexity: Different terrain types need different collision rules (water blocks tanks but not projectiles). Considering multi-layer approach for cleaner logic.

What’s Next

Planning to tackle terrain variety - water tiles that block tank movement but allow projectiles to pass through. This will likely require separate collision layers in Tiled.

The foundation is solid enough to start building actual game mechanics on top of. The input adapter pattern already proved its worth when adding AI tanks required zero changes to the core tank systems.

Development Philosophy

Focusing on architecture that won’t break when adding multiplayer, different control schemes, or AI opponents. Sometimes this means more upfront complexity, but it’s paying off as new features integrate cleanly.

The goal is creating a system flexible enough to support the variety of tank types and mission objectives I’m planning, without painting myself into technical corners.

Leave a comment

Log in with itch.io to leave a comment.