Gaming Guides 5 min read Updated 2026-12-02

Tower Defense Basics, Explained with Elematter

Tower defense fundamentals through Elematter’s real rules: tower range and targeting, element matchups, fragments, 13 lives and sending waves early.

By FrivWeb Team
Tower Defense Basics, Explained with Elematter

Tower defense games share a few core ideas: enemies walk a fixed path, you spend currency on towers beside it, and every enemy that gets through costs you. Elematter keeps those ideas compact, and its source code spells out the exact numbers behind each one.

The setup

You start with 13 lives and 500 elemental fragments, the game's currency, shown next to the ∴ symbol. Enemies enter from the left edge and follow one winding path to an exit at the bottom of a board made of 40-pixel tiles. Click any tile that is not part of the path to build a tower. Each enemy that reaches the exit costs one life. Lose all 13 and the game shows "You lost." and starts over. Survive all 20 waves and your score is 100 points for each remaining life plus the fragments you still hold.

1. Range decides where a tower belongs

TowerCost: build, upgrade 1, upgrade 2Damage by levelRange by level (px)+50% against
Earth200, 250, 31315 / 21 / 3075 / 85 / 95Air
Water300, 375, 46915 / 21 / 3065 / 69 / 72Fire
Air250, 313, 39110 / 12 / 1485 / 102 / 121Water
Fire250, 313, 39120 / 33 / 5575 / 85 / 95Earth

Water fires the most often and Fire the least, and each upgrade also shortens the time between shots. With 40-pixel tiles, a Water tower reaches less than two tiles while a fully upgraded Air tower reaches about three. A tower only does damage while enemies are inside its circle, so short-range towers belong where the path passes them on more than one side: inside a bend, or between two parallel stretches of path. Hover over or select a tower to see its range.

2. Know what each tower shoots at

Earth, Air and Fire towers always aim at the enemy in range that has traveled farthest along the path, which is the one closest to costing you a life. Water towers pick a random enemy in range instead. Each Water hit also slows its target to half speed for a short time, longer at each upgrade level, and repeated hits add to that time. Because Water spreads its shots around, it tends to slow a whole group. Put Water where the path enters your main cluster of damage towers so slowed enemies spend longer under fire.

3. Element matchups

A tower deals 50% extra damage to its counter element. The waves come in blocks: waves 1–5 are mostly Earth (wave 1 is eleven Earth enemies), 6–10 mostly Water, 11–15 mostly Air and 16–20 mostly Fire, and each block mixes in more of the other elements as it goes. The bottom bar shows the element mix of the next wave, so you can prepare before it arrives.

A wave 1 enemy has 70 health. A level 1 Fire tower hits Earth enemies for 30, so three shots finish one; a level 1 Earth tower needs five shots at 15. The bonus multiplies base damage, though, so it helps strong towers most. Against Water enemies, a level 3 Air tower hits for 21 with its bonus, while a level 3 Fire tower hits for 55 with no bonus at all. Air's real value is its reach.

4. Fragments, upgrades and reclaiming

  • Income: each enemy pays 30 fragments in wave 1 and one more for each later wave, up to 49 in wave 20. Waves 5, 10 and 20 open with a boss that has twenty times the normal health, moves at half speed and pays triple.
  • Rising pressure: enemy health goes up by 25 with every wave, enemies move a little faster, and in later waves they enter closer together.
  • Upgrades: each tower can be upgraded twice. Good spots next to bends are limited, so upgrading the towers you already placed there is how you add damage where it counts. A Fire tower goes from 20 damage to 33, then 55.
  • Reclaiming: clicking a tower and choosing reclaim refunds 75% of everything spent on it, rounded up. A fully upgraded Fire tower cost 954 fragments and returns 716, which makes it practical to swap elements between blocks of waves.

5. Lives, score and sending waves early

Once you press Play, the next wave starts by itself as soon as the current wave has fully entered and the field is clear. The Send Next button calls it immediately and pays a bonus of 50 fragments plus 10 for each wave already started, and that bonus drains toward zero while you wait. The ×1, ×2 and ×3 buttons only change how fast the game runs.

The final score counts 100 points per life and one per fragment, so each life you keep is worth as much as 100 fragments. Send early when your towers are clearly ahead, and hold back when enemies already get deep into the path.

Same idea, no towers

In SpacePi, also by Jack Rugile, you defend a growing base by drawing lines with the mouse instead of building towers. Each line drains your Power meter in proportion to its length, and the meter refills over time. Among other things, the level score adds 100 points per line drawn, the total length of your lines and 500 for every hit your base takes, and lower is better. The lessons carry over: block close to the threat with short lines and keep some Power in reserve.

More planning games are in our strategy games.

More guides

All guides