⚔️ Trench Defense

Hold the line. Build the dev. (Both at once.)

Wave-based trench warfare defense game built as a father-son learning project. Early Flutter prototype in development; a Roblox/Lua rewrite is the long-term direction once the first-time-coder son is comfortable with the basics. Code clarity over clever tricks, always.

🛠️ Early Development Flutter Prototype Roblox / Lua Rewrite (Planned)
⚔️
TRENCH DEFENSE
TOWER DEFENSE

In development — not yet playable.

The Project

This one's personal. Trench Defense is a father-son project — a way to learn game development together by building something real. The code prioritizes readability and clear reasoning over performance tricks, because the goal isn't just a working game, it's a first coder who actually understands why things work. Every script is commented to explain the reasoning, not just the mechanics. Every architectural decision is documented so the lessons stick.

Today: early Flutter prototype in development — wave-based defense mechanics, building system, and resource management are being built out. Flutter was chosen first so the architecture and game logic could be designed without the complexity of a full game engine. Not yet playable.

Next chapter: a Roblox/Lua rewrite is planned. Roblox lowers the barrier to actually seeing something run — no licensing, no build pipelines, no packaging hell. You write Lua, hit Play, and your game runs. The platform handles multiplayer, physics, and rendering. That lets us focus on game logic, system design, and the fundamentals of programming without drowning in infrastructure.

The Core Loop

01
Wave Incoming
Enemy wave is announced. Use the prep time to build and reinforce defenses.
02
Enemies Advance
AI enemies spawn and march toward your position across No Man's Land.
03
Hold the Line
Shoot, throw grenades, call in mortar fire, and repair defenses as they take damage.
04
Wave Cleared
Earn resources based on performance. Upgrade weapons, build new defenses, prepare for the next wave — harder than the last.

Game Systems

🏗️

Building System

Place sandbags, bunkers, barbed wire entanglements, and gun emplacements to customize your defensive line. Each structure has health, cover value, and resource cost.

💣

Combat System

Rifles, grenades, mortars. Each weapon has distinct range, damage, and ammo economy. Resource management — running out of ammunition mid-wave is a real consequence.

🤖

Enemy AI

Wave-based spawning with increasing difficulty. Enemies pathfind around obstacles, target weakened defenses, and scale in number and health as waves progress.

📦

Resource Management

Ammunition, building materials, and reinforcement call-ins are finite. Spend wisely between waves. Hoard supplies or build heavy — both are valid strategies.

🔓

Progression

Earn points to unlock better weapons and defensive structures as waves advance. Early waves teach mechanics; later waves demand mastery.

🎚️

Difficulty Tiers

Normal, Hard, and Nightmare presets adjust wave size, enemy scaling, and resource availability. Same map, very different runs.

Code Philosophy

The Flutter prototype keeps server-authoritative game logic separated from rendering and input. The planned Roblox rewrite will follow Roblox best practices — server logic in ServerScriptService, client UI and input in StarterPlayerScripts, shared modules in ReplicatedStorage. Important game logic like enemy health and combat resolution runs on the server where it can't be tampered with.

Every system is modular and independently testable. Game balance values live in config tables — tweaking difficulty never requires touching game logic. Comments explain why decisions were made, not just what the code does. The goal is a first coder who finishes the project understanding architecture, not just syntax.