logo
By Lawrence

5 minutes

Assemble the Game

Nothing new to paste. The scene has been complete since you added GameConfig. What is left is to see the whole thing running at once, and to check that the file you built is the file that ships.

Thirteen entities

World carries fourteen components, every director and every effect in the game:

"World": {
  "tags": ["world"],
  "components": {
    "KeyboardInput": {}, "MouseInput": {}, "SpaceDust": {},
    "NebulaSky": {}, "LensFlare": {}, "GameConfig": {},
    "WaveDirector": {},
    "MissionDirector": { "killQuota": 6 },
    "SpaceShooterScore": {},
    "SpaceShooterHUD": {}, "SpaceShooterFX": {}, "ShipDamageFX": {},
    "RoundReset": { "on": ["spaceshooter.player.killed"], "lingerSeconds": 3 },
    "AsteroidField": { "count": 110, "seed": 1337 }
  }
}

Around it: OilField, the second hazard field. Ambient and Camera, untouched since Course 1. Player, still eleven components. Enemy1 and Enemy2, the hand-placed pair. Station, the derelict landmark. And five pool blueprints: Bullets, Missiles and Debris from Course 2, plus Drops and Enemies from this one.

Thirteen entities. Eighty-two component placements. Course 2 handed you nine and fifty-two, so this course added four entities and thirty placements, and every one of them arrived in a lesson that said why.

The running game holds more than that list. The seventy-four asteroids and ten oil blobs are minted at load by AsteroidFieldSystem from two lines of config, and the thirty-two parked enemy slots are built by PoolSystem from one blueprint. Roughly 120 entities in play, from thirteen declarations.

Continue reading

Unlock the Full Course

Every lesson, the runnable examples, and the finished build — yours to keep.

$9one-time

Was this page helpful?

We read every note — tell us what's working and what isn't.

↑↓ NavigateEnter SelectEsc CloseCtrl+K Open Search