Skip to content

Sample Scenes

Four scenes ship with Massive Swarm System. Each shows a different configuration of the same core components: no new gameplay modes, just progressively more complex setups to copy from.

Open any scene from Assets/CreativeSpore/MassiveSwarmSystem/Samples/FullDemo/Scenes/ and press Play.

MSS Agent Archetype Sandbox

A flat tuning lane for dialing in one archetype's feel. Agents spawn at one end, travel the length of the lane past a few obstacles, get recycled at the far end, and respawn back at the start, so the swarm keeps moving while you edit values.

What's in it: A SwarmRectSpawner at the start (point A) driven by a SwarmSpawnerDirector in Maintain Population mode; a capsule-shaped Swarm Target at the far end (point B); a SwarmArrivalZone at B that returns arriving agents to the pool; and a row of obstacle cubes mid-lane on the Obstacle layer. It runs on its own MSS Sandbox SwarmSettings and MSS Sandbox Archetype (both under Samples/FullDemo/Settings/), with the stats overlay on.

Use it when: You want to watch how one archetype moves, spaces out, and rounds obstacles while you tweak its Behavior and Movement profiles in the Inspector during Play. Because the lane keeps a steady stream of agents on screen, each change shows its effect on the next wave without restarting.

MSS Pyramid Level

A multi-level Egyptian environment built around a player character (Egypt Player), with static defences scattered through it. A SwarmSpawnerDirector in Continuous mode feeds three spawners and ramps the pressure up as the session runs. A baked Surface Flow Field lets agents navigate the stepped pyramid geometry, routing around obelisks and ruins.

What's in it: Pyramid steps, obelisks, fire pits, stairs, and a ruins floor, all baked to plain meshes (the source was authored in ProBuilder but the shipped scene has no ProBuilder dependency). The player is a SwarmTarget that moves freely, and a Cinemachine camera follows it. Alongside the player sit 13 turrets and two hearth structures, each a SwarmTarget of its own with a health pool, and the turrets shoot back. The player's target Priority is set above theirs, so the swarm prefers the player but will happily chew on whatever is closest.

Difficulty ramp: The director starts with 8 agents alive and raises that ceiling by 4 every second. The hard cap is 8000, which a normal play session never approaches, so what you actually see is a crowd that keeps thickening for as long as you leave it running. Lower Max Alive Increase Per Second on the director to slow it down, or turn Increase Difficulty Over Time off to hold a flat count.

Use it when: You want to see how the Surface Flow Field handles multi-level terrain, or you need a reference for a player-chasing horde that also has to deal with fixed structures.

MSS Tower Defense

A level where the swarm continuously attacks a set of static destructible targets (a hearth structure and multiple turrets) rather than a moving player. A SwarmSpawnerDirector drives a single SwarmRectSpawner from one end of the map.

What's in it:

  • MSS Base Hearth: the primary SwarmTarget, a destructible structure with a health pool. Agents make this their primary destination.
  • MSS Turrets: additional SwarmTarget objects arranged across the level. Each turret has its own health pool and a ProjectileWeapon component, a self-contained ranged weapon that finds the nearest targetable agent and fires pooled projectiles at it.
  • A baked Surface Flow Field covering the play area (46 × 69 cells, 1-unit cell size) guides agents around the level geometry.
  • Three Cinemachine cameras provide different view angles.

This scene has no player character. The swarm pursues static targets, and the turrets deal damage back via projectiles.

Use it when: You want a reference for a target-defense setup: multiple SwarmTarget objects on non-player entities, combined with the Surface Flow Field for structured environments.

Adapting Tower Defense for your project

The hearth and turrets are standard GameObjects with SwarmTarget and DestructibleCombatTarget (a sample-only helper script). Replace them with your own structures. Anything with a SwarmTarget component becomes a valid swarm destination.

MSS Surface Flow Field

An interactive navigation showcase. 400 Anubis guardians stream around a static S-shaped wall maze toward one target you drag with the mouse, re-routing live as it moves. That is where the scene opens, not the ceiling: the overlay slider takes it anywhere from 50 to 600. This is the smallest scene that puts the Surface Flow Field on its own, with no combat or multi-level terrain in the way.

What's in it: A baked Surface Flow Field over the wall maze, a pooled swarm of guardian agents, and two removable sample scripts. On the Swarm Target object, PointerDragTarget drags the target across the ground plane under the cursor while the left mouse button is held. Turn on its Clamp To Drag Area option to pen the target inside a rectangle. On its own Demo Overlay object, SurfaceFlowDemoOverlay draws a corner panel with the stats readout (active agent count, pooled visual count, and frame rate) plus two live controls: a Swarm size slider that drives SwarmSpawnerDirector.MaxAlive (raising the value lets the director refill over time; lowering it despawns the excess immediately), and a When the target is unreachable: popup that switches the Surface Flow fallback mode at runtime without modifying the settings asset, and the three options match the fallback behavior table on the Navigation page. The fallback effect is subtle here: most agents in the open S-maze stay routable, so the difference shows most clearly when you drag the target fully outside the field bounds. PointerDragTarget uses the Input System package.

Use it when: You want to watch the Surface Flow Field reroute a crowd in real time, or you need a minimal reference for wiring a cursor-dragged target. Moving the target is all the field needs to recompute its route, so it doubles as the simplest example of dynamic re-pathing. Drag the target outside the walls and the crowd jams against them instead of leaking through, because obstacle blocking keeps agents contained even where the flow field has no route.