Space Rock Shooter Template

Space Rock Shooter Template is a complete Blueprint game template for a top-down asteroid shooter. Fly a spaceship inside a bounded play area, destroy rocks for score, pick a cannon loadout, and chase a persistent high score.
The project ships as a standalone Unreal project. All gameplay lives under Content/SpaceShooterTemplate/.
Architecture
Section titled “Architecture”flowchart TB
subgraph ui [UI]
WBP_PlayerHUD
WBP_HitDamage
end
GM[BP_SpaceRockGameMode]
Ship[BP_Spaceship]
Rock[BP_SpaceRock]
Proj[BP_Projectile]
Save[BP_SaveGameManager]
GM --> WBP_PlayerHUD
GM --> Ship
GM --> Rock
Ship --> Proj
Rock --> WBP_HitDamage
Ship --> Save
GM --> Save
What is included
Section titled “What is included”| Area | Path | Purpose |
|---|---|---|
| Demo map | Maps/DemoMap | Playable level — editor and game default map |
| Game mode | Blueprints/BP_SpaceRockGameMode | Spawning, boundaries, score, session flow |
| Player pawn | Blueprints/BP_Spaceship | Movement, firing, lives, screen wrap |
| Asteroids | Blueprints/BP_SpaceRock | Size maps, damage, splitting, VFX/SFX |
| Projectiles | Blueprints/BP_Projectile | Missile actor (Speed 10000, Damage 100) |
| Cannons | Blueprints/SpaceshipCannons/ | BP_SingleShot, BP_TripleShot (extend BP_BaseCannon) |
| Save game | Blueprints/SaveGame/ | Slot SpaceShooterSaveGame, struct ST_SaveGame |
| HUD | Blueprints/Widgets/ | WBP_PlayerHUD, WBP_HitDamage |
| Macros | Blueprints/BP_ObjectMacros | Screen wrap, deproject, vector helpers |
| Enums | Blueprints/Enums/ | ECannonType, ESpaceRockSize |
Gameplay loop
Section titled “Gameplay loop”sequenceDiagram
participant HUD as WBP_PlayerHUD
participant GM as BP_SpaceRockGameMode
participant Ship as BP_Spaceship
participant Rock as BP_SpaceRock
HUD->>GM: Start Game (cannon type)
GM->>Ship: Set Cannon Type + Start Spaceship
GM->>GM: Start Asteroid Spawn
loop While Current Asteroids < Max
GM->>Rock: Spawn at screen edge
end
Ship->>Rock: Projectile hit
Rock->>GM: Add Score
Ship->>Ship: On Component Hit (lose life)
GM->>HUD: Game over tab
- Start screen — cannon selection (
SingleShot/TripleShot), high score, lives. - Start game — Start Spaceship, Start Asteroid Spawn, HUD switches to in-game tab.
- Play — thrust/rotate, fire; rocks and ship wrap at play bounds.
- Score — rock destruction calls Add Score; WBP_HitDamage shows points.
- Lives — default Spaceship Lives =
3; zero lives triggers game over. - Restart — Restart Game resets the session; high score saves via BP_SaveGameManager.
Shipped defaults (quick reference)
Section titled “Shipped defaults (quick reference)”| System | Key defaults |
|---|---|
| Spawning | Max Asteroids To Spawn 30; spawn delay Random Time between 1.0–3.0 s |
| Ship | Spaceship Lives 3; Refire Time 0.2; Acceleration 1000; Turn Rate 250 |
| Rocks | Health 100; four sizes with score 10–40 (see Blueprint reference) |
| Save | Slot SpaceShooterSaveGame; High Score in ST_SaveGame |
Guides
Section titled “Guides”| Page | Description |
|---|---|
| Getting started | Open the project, controls, content layout |
| Overview | Step-by-step customization guides |
| Blueprint reference | Properties, functions, enums |