← All writing

Why Narrow Front’s battles are decided off screen

The 3D view draws the battle. It never decides it.

Game developmentGame designStrategy games
A low-poly WWII battlefield seen from above: German tanks and riflemen fight past blue-roofed farmhouses, a watchtower and a concrete bunker.
Everything on this road is drawn from what the simulation reports.

Every battle in Narrow Front is decided by the game’s rules before anything is drawn. The tanks, the smoke, the muzzle flashes and the camera all come afterwards, built from what the rules report. That was the first architectural decision I made for the game, and most of what went well later traces back to it. This piece is about why I made it and what it changed for the player. It isn’t a blueprint, and it leaves out how the rules themselves work.

In short

  • Every battle is decided by the rules first. The 3D view only shows what they report.
  • Orders are requests the rules accept or refuse, for the player and the computer opponent alike.
  • The split made testing fast and two-phone battles straightforward.

A battle you can trust on a small screen

Narrow Front is a real-time WWII strategy game played in portrait. Each battle is one narrow front between two headquarters. You spend supply on cards, send infantry into farmhouses, push armour up the road and call in support when an advance stalls. On a phone held in one hand, all of that happens in a tall, thin strip of screen under your thumb.

That shape makes trust important. A player glancing at a busy road has to believe what they see. If a squad is inside a house, it’s protected. If the game shows a strike as allowed, it lands. If a farmhouse changes colour, it really has changed hands. Any gap between the picture and the outcome feels like the game cheating, and on a small screen there’s no room to investigate why.

The simplest way I found to close that gap was to have one place that decides, and make everything else a view of it.

One source of truth for every battle

The rules of a battle run on their own, separately from the 3D scene. They take orders in and report what happened: who moved, who fired, who was hit, which house changed hands. The 3D view reads those reports and draws them.

The view never invents an outcome

An explosion can be as big as it likes, but it doesn’t decide who was hurt. Debris is decoration.

A shell’s flight is drawn to match a hit that has already been decided. Sometimes a health bar drops a fraction before the shell visibly lands, and I’ve accepted that, because the alternative is letting a particle effect overrule the battle.

The split also protects the player when their phone is struggling. Visual quality can come down to keep the frame rate steady, and the battle plays out exactly the same.

Orders are requests

Tapping a card doesn’t change the battle directly. It asks. The rules check whether the order is allowed right now, whether there’s enough supply and whether the target is valid, then accept it or turn it down. A refused order costs nothing and leaves no trace.

That sounds like an implementation detail, but players feel it. When the targeting overlay shows a strike as allowed, it’s asking the same question the battle will ask a moment later, so the answer can’t disagree. Players don’t lose supply to a tap that was never going to work.

What the player feels on the road

Most of the rules are things a player learns by playing, and the game’s own pages describe them in player terms. Infantry take farmhouses, and holding them pushes the front forward. Armour pushes up the road. Cover matters, and a squad in a house is far harder to dig out than one in the open. Suppression pins soldiers down, and a pinned squad isn’t much use to anyone. Destroying the enemy headquarters wins.

All of that is easy to say and hard to make readable. Because the outcomes come from one place, I could spend my effort on showing them clearly instead of keeping two versions of the truth in step. When a house falls, the view shows it because the battle said so, not because a building model happened to break.

A Narrow Front battle: rocket artillery streaks across farmland towards a tank beside a farmhouse, under the banner “Rockets away”.
Support called in on the road. The battle decides what the rockets hit; the view draws the smoke.

An opponent that plays by the same rules

The computer opponent sends the same kind of orders a player does, and the same checks apply to them. It can’t spawn a unit it can’t pay for or strike a target it isn’t allowed to.

Skirmish has five ranks, from Recruit to Ace, and battles of three, five or eight minutes, as the skirmish page describes. Harder ranks are tougher opponents and pay more, up to 175% experience and coins.

Skirmish at a glance

  • 5 ranks, from Recruit to Ace
  • 3, 5, 8 minute battles
  • 175% experience and coins at the top rank

Playing the same battle twice

I wanted a battle to restore exactly after the app is closed, and to play out the same way again when I’m chasing a bug. In practice that took more care than I expected.

Getting this right took deliberate work and tests that would fail loudly if it slipped. I’m careful about what I claim: the same build restoring and replaying a battle is tested. Identical results across every phone and platform isn’t something I promise.

What the split made possible

The biggest day-to-day benefit was speed. The rules can be tested without starting the 3D engine, so checks over many battles take seconds. A bug can be reproduced and the fix proved before it reaches a phone.

It also made two-player battles straightforward. On Android, two people can battle on two phones over the same Wi-Fi network or hotspot, with no internet connection. Two-phone battles use the same rules as a single-player match. The rules didn’t need to know a second phone existed.

And when the game got warm on the menu during development, the fix was mostly in the view. I wrote about that in keeping a Unity game cool on a phone.

What I’d keep

If I started another strategy game tomorrow, I’d draw the same line on day one.

The line I’d draw again

Keep the rules in one place that can run without the engine. Let orders be the only way in and reports the only way out. Treat everything the player sees as a view of that.

None of this is new. Plenty of strategy games have worked this way for decades. What I learned is that it’s worth doing from the very start, even for a small mobile game made by one person, because every later problem was easier to see with that line already there. You can play the result free on the games page, or read the Narrow Front case study for the rest of the story.

Sources & further reading

Another question worth following?

Explore the workGet in touch

A good project often starts here.

Leave me
a what if.

All the places to find me ↗
To Satyajit

There’s an app I wish existed.

Tell me who would use it and what they are trying to do. A rough sketch is plenty to start with.

Talk to me on LinkedInLet’s follow the question.