A top-down wave shooter prototype: mouse-aimed shooting, zombie wave spawning, and the design differences between top-down and first-person combat.
This project is a top-down zombie wave shooter built entirely in Blueprints with Unreal Engine 5, developed following this Udemy beginner course. The core loop is simple: survive waves of zombies with a single weapon. Its value as a learning project comes not from complexity but from the clarity with which it exposes the foundational systems of a top-down shooter — camera setup, mouse-to-world aiming, wave management, and zombie AI — without the noise of more elaborate features.
You can watch the prototype in action here: YouTube
Top-Down vs. First-Person: A Different Set of Problems
The zombie FPS project covered earlier in this series and this top-down prototype share the same enemy type and genre, but the perspective change is not cosmetic — it restructures nearly every system. In first-person, the player aims with the camera and has no spatial awareness of their own character. In top-down, the player sees their character from above, aims with the mouse cursor projected into the world, and has full spatial awareness of the arena and all enemies simultaneously.
This changes the design requirements significantly. First-person relies on the camera as the primary spatial reference; top-down relies on the world projection of the mouse cursor. First-person combat is about reaction speed and aim precision at a point in screen space; top-down combat is about spatial positioning relative to multiple threats visible at once. The zombie AI that works for first-person — pursue the player in a straight line — produces a different experience in top-down, where the player can see every zombie’s position and path, making simple pursuit much easier to avoid.
Top-Down Camera Setup
The top-down camera is a fixed overhead view — a spring arm attached to the player character with a steep downward pitch and a high arm length, keeping the camera far above and looking almost straight down. The camera does not rotate with player input; it remains fixed in world orientation. This gives the player a consistent spatial reference throughout the session — north is always up on screen, which makes navigation and threat awareness intuitive.
The character moves relative to world axes (WASD maps to world directions), not relative to camera orientation. This is the correct mapping for a fixed-camera top-down game: since the camera doesn’t rotate, world-relative movement is consistent. In a rotating camera top-down game, movement would need to be camera-relative instead.
Mouse-to-World Aiming
The most technically distinctive aspect of top-down shooters is the aiming system. In first-person, the player aims by moving the camera — the crosshair is always at screen center. In top-down, the player aims by moving the mouse cursor, which must be projected from 2D screen space into the 3D world to determine a target direction.
The implementation uses DeprojectScreenToWorld (or GetHitResultUnderCursorByChannel in Blueprints) to cast a ray from the camera through the mouse cursor position and find where it intersects the play plane — typically a flat collision plane at the character’s height. The intersection point is the aim target in world space. The character rotates to face that point each frame, keeping the gun always pointed at the cursor regardless of where the character is moving.
This decoupling of movement direction and aim direction is what defines the twin-stick / mouse-aim shooter feel: the player can run in any direction while independently controlling where they shoot. It’s a simple mechanic to implement but one that produces a fundamentally different control feel from any first-person scheme.
Shooting and Hitscan
The weapon fires via hitscan from the gun’s muzzle point toward the aim target. Since the aim target is on the ground plane and the muzzle is slightly above it, the trace direction is slightly downward — this needs to be accounted for to ensure hits register correctly at range. A common mistake is to trace from the muzzle toward the cursor world position directly, which produces traces that intersect the ground plane before reaching distant targets; the correct approach traces along the aim direction computed from the muzzle to a point at the cursor’s XY coordinates but at muzzle height.
Fire rate is governed by a cooldown timer, and muzzle flash and sound fire on each shot for feedback.
Zombie AI and Wave Spawning
The zombie AI is the simplest form of pursuit behavior: move toward the player’s current position each frame. In top-down, this produces a visible, readable threat — the player can see every zombie converging on them and plan accordingly. The AI doesn’t need navigation mesh pathfinding for an open arena; direct velocity toward the player is sufficient and cheap.
Wave spawning controls the pacing of the experience. Waves spawn from fixed or randomized points at the arena edges, with each wave releasing a set number of zombies. When all zombies in a wave are eliminated, a brief delay precedes the next wave — giving the player a moment to breathe before the next escalation. Wave difficulty scales by increasing zombie count, spawn frequency, or zombie movement speed, keeping the pressure rising over time.
The wave manager tracks active zombie count via a counter decremented each time a zombie dies. When the counter reaches zero, the next wave timer begins. This is simpler than tracking individual zombie actors and robust to any death cause — the counter doesn’t care how the zombie died.
Health, Death, and Game Over
The player has a health value decremented when a zombie reaches melee range and attacks. When health reaches zero, a game over state is triggered — stopping zombie spawning, disabling player input, and displaying a result screen. The result screen shows the wave number reached, giving the player a concrete score to compare across sessions.
Zombie death triggers a death animation (or a simple dissolve), removes the zombie from the active count, and optionally drops a pickup — health or ammo — at the death location. Drop probability is a configurable float, making loot frequency easy to tune without touching the kill logic.
Reflection
The top-down zombie shooter is the most complete beginner project in the series — it has a full game loop with a clear win/lose condition, escalating difficulty, and enough systems to feel like a playable game rather than a tech demo. Its simplicity is an asset: every system is readable and understandable without prior context, making it an ideal starting point for understanding how Unreal game systems connect.
The mouse-to-world aiming technique is the most transferable takeaway. It appears in every top-down, isometric, and RTS game that uses mouse-directed actions, and understanding the DeprojectScreenToWorld mechanic — projecting 2D input into 3D space — is foundational for UI interaction, strategy game mechanics, and any system where the player’s cursor needs to interact with the world geometry.
Leave a comment