In This Enemy Design Log
Why the First Waves Were Too Easy
The earliest version of Allied Frontline Defense had enemies, towers, waves, and victory conditions, but it did not yet have enough pressure. Enemies were destroyed too quickly, late waves did not force new decisions, and the player could often rely on a small number of familiar tower placements. A tower defense game can look busy and still be strategically flat if the enemies do not ask different questions.
Difficulty is not simply about raising health. If every enemy becomes a larger health bar, the game becomes slower but not necessarily better. The player needs to read different threats and respond with different defenses. Fast enemies pressure early coverage. Armored enemies punish overreliance on machine guns. Aircraft punish a ground-only build. Splash-vulnerable clusters reward artillery or mortar placement. Counter-fire enemies threaten the towers themselves. The key is to make the player adapt without making the battlefield unreadable.
The first balancing pass increased armor, reduced light-fire effectiveness against vehicles, improved slow resistance for heavier targets, delayed field repair on tougher enemies, increased wave scaling, and reduced reward pacing. That created more resistance, but it was only the beginning. A better difficulty curve needed more enemy types, more wave shapes, and a longer mission structure. The game moved from six-wave missions to twelve-wave missions so that each mission could build pressure gradually.
The goal of twelve waves was not to make the game twice as long for its own sake. It gave the mission room to introduce enemies, combine them, and then stress the player's assumptions. Early waves teach. Middle waves test. Late waves punish incomplete coverage. If the player ignores anti-air, the Air Raid mission exposes it. If the player has no heavy armor answer, Armor Push becomes dangerous. If the player builds too close to the first bend and neglects repair, counter-fire enemies can disable key towers.
Building a Wider Enemy Roster
The enemy roster eventually grew from basic infantry, trucks, tanks, and aircraft into a broader set: scout cars, heavy tanks, bombers, storm infantry, half-tracks, assault guns, and fighter aces. Each addition had to justify itself. A new enemy that behaves exactly like an existing one only adds visual noise. A useful enemy changes the shape of the wave or the player's build priority.
Scout cars brought speed pressure. They are useful because they can slip through weak early coverage and punish slow tower placement. Heavy tanks brought endurance. They force the player to invest in armor-piercing or late heavy weapons instead of relying on fast-fire towers forever. Bombers expanded the air threat from small aircraft into larger, more durable flying targets. Storm infantry created a tougher infantry pressure that made splash and rapid-fire coverage matter in a different way.
Half-tracks and assault guns became especially important because they could fight back. These enemies made the road dangerous in both directions. A half-track passing near a weak tower could damage it. An assault gun could become a moving threat that forced repairs or better placement. Fighter aces extended the aircraft family so anti-air had more than one target profile. The result was a more layered wave language. The player could no longer ask, "Do I have enough damage?" The better question became, "Do I have the right damage in the right places before the right enemy mix arrives?"
Spacing was another major issue. At one point, enemies appeared with almost no gap between them. A tight column can make a wave feel dense, but it can also make individual enemies impossible to read. The fix introduced minimum spawn spacing per enemy type and wider wave gaps. Infantry could still feel like a squad. Vehicles could still feel like a convoy. But the player needed enough visual separation to identify what was approaching and which towers were responding.
Enemy leak damage also needed to be meaningful. A light scout slipping through should hurt, but a heavy tank or bomber reaching the exit should feel more serious. This made enemy type matter even after the defense failed to kill it. The player learns from the leak: was the problem speed, armor, air coverage, or tower survival? Good difficulty feedback tells the player what went wrong without requiring a long explanation panel.
Making Aircraft Feel Different From Ground Units
Aircraft were one of the hardest enemy types to make feel right. Early aircraft behaved too much like offset ground units. They followed fixed routes, hovered over predictable regions, and did not feel free enough. Later attempts gave them more route variation, but the movement became visually shaky and the aircraft body looked worse when drawn only with rough canvas shapes. The final solution combined generated aircraft sprites with smoother route logic and minimal overlays.
The air system moved toward per-aircraft free routes. Aircraft could enter from different edges, exit from different edges, and pass through interior control points that varied from one unit to the next. That created a broader activity field above the battlefield instead of one repeated air lane. The planes also gained smoothed banking so they did not jitter through turns. The generated aircraft image was restored for visual quality, while shadows, contrails, and propeller cues helped sell motion.
Altitude was another subtle but important issue. If the aircraft body and its shadow sit too close together, the plane looks like it is sliding on the ground. The fix separated the visible aircraft body from a softer ground shadow. Projectiles and hit points also moved toward the visible aircraft body rather than the shadow. This made anti-air fire look like it was targeting the plane instead of shooting at a mark on the terrain.
Aircraft orientation needed special handling. Some planes appeared to fly backward or upside down when their direction changed. The fix was to mirror leftward flight rather than rotate the whole sprite into an inverted state. This kept the route direction, bank motion, shadow, propeller overlay, and visual heading consistent. It was a small rendering correction, but it mattered because aircraft are high-salience enemies. When a plane looks wrong, the player sees it immediately.
Adding Enemy Counter-Fire: Towers Became Part of the Battlefield
The most important gameplay expansion was enemy counter-fire. Before counter-fire, towers were permanent investments unless the player sold them. That is a familiar tower defense model, but it can make defense planning too static. Once a strong layout is found, the player mainly watches it work. By allowing certain enemies to damage towers, Allied Frontline Defense made the defensive line itself vulnerable.
The first version of counter-fire focused on Half-Track, Assault Gun, and Bomber enemies. These units could fire at towers, deal damage, create splash pressure, and eventually disable defenses. Towers gained durability, health bars, smoke states, disabled states, and a Repair action. This changed the player's priorities. A forward tower might deliver early damage, but it could also become exposed. A compact cluster of towers might output strong firepower, but it could be vulnerable to splash. Repair became an active field decision, not a decorative button.
Counter-fire also made enemy movement more meaningful. The route was no longer only a path to the exit. It became a firing lane. Enemies passing near a tower could threaten it. Bombers created pressure from above. The player had to consider where enemies could shoot, not only where towers could shoot. This is a small step toward a more tactical defense game while still keeping the core browser game readable.
The repair action had to fit the command panel. The panel had already been reorganized because the build order grew too tall. Battle actions moved to the top so Start Wave, Pause, Upgrade, Sell, and Repair remained accessible. This was important because counter-fire adds urgency. If the repair button is hidden below a scroll area, the feature becomes frustrating. A mechanic that requires timely response needs a UI position that respects that timing.
Using Damage Effects as Readable Feedback
Low-health enemy effects were added after the core difficulty and counter-fire systems were working. When enemies fall below half health, they can show smoke, flame, sparks, and hit flashes. The effect grows stronger as health drops. This gives the player a visual sense of progress without requiring them to stare at health bars. A smoking half-track says, "This target is wounded." A burning bomber says, "Anti-air is working, but finish it."
Explosion cleanup served the same purpose. An older explosion sprite showed a faint square background, which broke the battlefield illusion. The fix replaced it with procedural canvas particles: circular flash, shockwave, sparks, and smoke puffs. This removed the rectangular artifact and made destruction feel integrated with the game world. It also proved that not every effect needs a generated sprite. Some effects are better drawn procedurally because they need to blend cleanly with any map.
The enemy system is now much stronger than the original version because it supports different kinds of pressure. Ground enemies create route pressure. Aircraft create coverage pressure. Armored units create damage-type pressure. Counter-fire creates tower survival pressure. Low-health effects create readability. Twelve-wave missions create pacing. Together, these systems make Allied Frontline Defense feel less like a target gallery and more like a battlefield that changes over time.
The main lesson is that enemies should be designed as questions, not just as obstacles. A scout car asks whether the defense can handle speed. A heavy tank asks whether the defense can pierce armor. A bomber asks whether anti-air coverage is ready. A half-track asks whether exposed towers can survive. A damaged enemy asks whether the player can finish the target before it leaks. When those questions appear in a fair sequence, difficulty becomes more interesting rather than simply harsher.
How I Would Plan Future Enemy Waves
The next version of the enemy system should keep the idea that each mission has a personality. Bunker Road can remain the mixed baseline mission, where infantry, vehicles, and early aircraft teach the whole ruleset. Armor Push should lean harder into heavy ground threats, repair pressure, and anti-armor investment. Air Raid should make anti-air coverage essential, but it should still include enough ground pressure that the player cannot simply build flak everywhere. Those identities help replayability because the same tower roster feels different under different mission demands.
Future waves should also use clearer introductions. When a new enemy type appears, the first appearance should be readable. The player should see the unit, understand its threat, and have time to react. Later waves can combine that enemy with others. For example, a half-track can first appear as a small counter-fire warning. Later, it can appear behind storm infantry, then alongside assault guns, and finally under bomber pressure. That escalation teaches the player instead of surprising them with a sudden unfair spike.
Aircraft deserve their own pacing rules. A single fighter is a reminder that anti-air matters. A bomber wave is a resource test. Mixed fighters and bombers create target priority pressure. A late wave with freer routes can expose gaps in coverage. However, aircraft should not become random chaos. Their freedom needs limits that preserve readability: smooth route curves, visible altitude, correct facing, clear shadows, and enough spacing that several planes do not merge into a single unreadable shape.
Counter-fire should also scale carefully. If too many enemies damage towers at once, the player may feel punished for building anything. If too few enemies do it, repair becomes irrelevant. The best use is to create moments where the player sees a tower under threat and has a meaningful response: upgrade, repair, sell and rebuild, change future placement, or add supporting towers. Counter-fire is strongest when it creates decisions, not when it simply deletes the player's work.
The enemy system now has enough pieces to support more campaign structure. Future rewards could unlock a tower earlier, give a temporary repair discount, improve starting supplies, or add a mission modifier. But the foundation should stay the same: enemies are readable questions, waves are controlled lessons, and difficulty comes from combinations rather than from invisible stat inflation. That is what made Allied Frontline Defense more playable as the enemy roster grew.
Testing future waves should also happen at several player skill levels. A starter layout should survive the first wave if the player makes reasonable choices. A stronger layout should still feel pressured by midgame combinations. A late layout should need upgrades, repairs, and anti-air coverage rather than one dominant tower type. This prevents balance from drifting toward either extreme: a game that beginners cannot enter, or a game that experienced players solve once and never revisit.
The most useful wave screenshots are the ones that show failure pressure before total collapse. If a tower is smoking, a bomber is still alive, and a tank is close to leaking, the screenshot tells you the game is creating readable tension. If everything is dead near the entrance, the wave may be too easy. If everything leaks while the player cannot tell why, the wave may be too harsh or too unclear. Enemy design should be judged by that middle state where the player still has a chance to respond.
That is why the beta now benefits from having more than one kind of threat on screen. A single powerful enemy tests damage output. A mixed wave tests planning. A damaged tower tests recovery. A freer aircraft route tests coverage. A wounded enemy with smoke and fire tests target priority. The more clearly those pressures appear, the more the player can learn from each attempt and come back with a better plan in the next wave.