logo

Babylon.js Market

$9.00

E-mail it

Hazards and Missions with Arcade ECS

Course 3 of the three-part Wingman build-along. Starting from the finished Course 2 dogfight, you add hazards and a mission: shootable asteroids, an oil blob that shoots back, an escort convoy and gate track, and the wave, mission, and score directors — until the scene matches the complete WingmanFlight game.

What We Will Cover

  • Starts from the finished Course-2 dogfight and adds the hazard + mission layer
  • Every code block is the actual published component source
  • OBB-hitbox asteroids, a return-fire oil-blob hazard, an escort convoy, and a gate track
  • World-singleton directors that turn dangling combat events into win / lose / score
  • Ends in the complete WingmanFlight game, entity for entity

This is Course 3 of the three-part Wingman build-along — the final course. You begin from the exact scene you finished in Course 2: your GLB fighter armed and dogfighting two enemy pilots that orbit and shoot back. Lesson by lesson, you compose the shipped Wingman hazard and director components into a real mission. You seed the field with oriented-bounding-box asteroids and add AsteroidCollisionSystem, which makes ramming one fatal while gunfire chips and shrinks it; you add an oil-blob hazard that ejects a lethal drop when hit; you fly a waypoint gate track and escort a snake-style freighter convoy that retraces the head's path; then you add the world-singleton directors that act on the combat events — a MissionDirector that turns kills, deaths, freighter loss, and track completion into win and lose, a Score that tallies kills into points, and a WaveDirector that spawns enemy waves from a pooled set and triggers a surge at a gate. Finally you add GameConfig and assemble the finished game. Every runnable code block is a verbatim slice of the live component source — nothing is invented. Most components are mirrored in CodeLibrary; MissionDirector and Score are vendored-only because they collide with unrelated CodeLibrary components. The finished scene equals the real WingmanFlight scene, entity for entity: the free-flight mission — asteroids, oil blobs, a station, and the four directors — that the escort track and convoy you built along the way get folded back out of, so the escort systems ship idle in the cabinet, ready for a level that seeds them.

Was this page helpful?

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

↑↓ NavigateEnter SelectEsc CloseCtrl+K Open Search