Skip to content

Getting Started

Space Rock Shooter Template is a Blueprint game project. Open it from FAB, press Play on DemoMap, then adjust the included Blueprints.

  1. Add Space Rock Shooter Template from FAB and create/open the project.
  2. The editor opens DemoMap (Content/SpaceShooterTemplate/Maps/DemoMap).
  3. Press Play (PIE).

Config/DefaultEngine.ini sets Editor startup map and Game default map to DemoMap.

flowchart TD
  Launch[Play DemoMap] --> HUDStart[WBP_PlayerHUD start tab]
  HUDStart -->|Start Game Btn| GMStart[BP_SpaceRockGameMode Start Game]
  GMStart --> Ship[BP_Spaceship active]
  GMStart --> Spawn[Start Asteroid Spawn]
  Spawn --> Loop[Rocks spawn up to Max Asteroids To Spawn]
  Ship -->|Hit rock| Lives[Spaceship Lives minus 1]
  Lives -->|0 lives| Over[Game over tab]
  Over -->|Restart Btn| HUDStart
UI elementBehaviour
Start GameStart Game on game mode → ship active, spawning on, in-game HUD tab
Exit GameQuit application
Cannon selectionSingleShot or TripleShot passed into Start Game
High scoreLoaded from save slot SpaceShooterSaveGame
LivesDefault Spaceship Lives = 3; updated via Show Life Hearts
InputAction
Move Forward (axis)Thrust along facing
Move Right (axis)Rotate
Fire (action)Internal Fire Weapon → active cannon Fire

Default firing: bEnable Continuos Firing = true, Refire Time = 0.2 s.

Ships and asteroids wrap at the play boundary using BP_ObjectMacros screen-wrap helpers.

Content/SpaceShooterTemplate/
├── Blueprints/
│ ├── BP_SpaceRockGameMode
│ ├── BP_Spaceship
│ ├── BP_SpaceRock
│ ├── BP_Projectile
│ ├── BP_ObjectMacros
│ ├── Enums/ Structs/ SaveGame/ SpaceshipCannons/ Widgets/
├── Maps/DemoMap
├── Meshes/ Materials/ Textures/ Sounds/
└── StarterContent/Particles/
Property / functionDefaultPurpose
Max Asteroids To Spawn30Concurrent rock cap
bCan Spawn AsteroidstrueMaster spawn toggle
Random Time1.03.0 s (Event Graph)Delay before next Spawn Next Asteroid
Default Pawn ClassBP_SpaceshipPlayer ship
Start GameHUD entry point
MapExample (Small → ExtraLarge)
Asteroid Speeds1400, 800, 400, 100
Asteroids Score10, 20, 30, 40
Child Asteroids0, 3, 4, 5 (split count)
Health (class default)100
PropertyDefault
Speed10000
Damage100

BP_SaveGameManager → slot SpaceShooterSaveGame, struct ST_SaveGame (High Score).

Custom object channel Asteroid (ECC_GameTraceChannel1 in DefaultEngine.ini). Required for projectile hits and ship collisions.