Crowd Runner Framework: Math Gates, Crowd Battles & Finish Stairs


Saved progress through a small interface: PlayerPrefs by default, your own save ... PERFORMANCE ... FEEL ... Bright, rounded casual look, portrait first and fitting landscape screens such as a ...


by hardartcore


Price History +

Build a crowd runner in Unity: math gates, crowd battles, obstacles, finish stairs, coins and upgrades. Hundreds of units, Burst jobs, zero GC. Three demo levels included.

• Unity 6000.6+, URP 17.6+ (the unit shader and the demo are URP; the C# systems are pipeline-independent)

• Packages: com.unity.burst, com.unity.collections, com.unity.mathematics, com.unity.inputsystem, com.unity.ugui

• Assemblies: CrowdRunner.Runtime, CrowdRunner.Editor, CrowdRunner.Demo, CrowdRunner.Demo.Editor, test assemblies

• Jobs: FormationLayoutJob, UnitFollowJob (IJobParallelForTransform), NearestTargetJob, ResolveKillsJob, HazardHitJob

• Default unit cap 500 per swarm (configurable); pools sized up front

• Unit mesh: about 620 triangles; shader "Crowd Runner/Unit" with ShadowCaster, DepthOnly and DepthNormals passes

• Input: Input System (drag, A/D, arrows) through an ISteeringInput interface

• Saves: IProgressStore (PlayerPrefs and in-memory stores included)

• WebGL: supported; Burst is not available on WebGL, so jobs run as plain C# there

• Demo content: 3 levels, 10 generated sound effects, Nunito font, procedural scenery (no textures but a 2x2 checker)

• Includes full C# source

Everything a crowd runner needs, built for hundreds of units.


Crowd Runner Framework gives you the whole genre as clean, tested, reusable systems: a swarm that grows and shrinks through math gates, enemy armies that fight it unit for unit, saws, sweeping bars and spike traps, the multiplier staircase finish, coins, upgrades and saves. Levels are data assets, so making a new level is filling in a list, not building a scene.


It is made for mobile from the ground up. Units are pooled GameObjects placed by Burst-compiled jobs, battles and hazards are resolved by Burst jobs with squared-distance checks, and the stick figure units run in the vertex shader. No physics, no colliders, no Animator per unit, and no garbage per frame in the gameplay loop.


Press Play in the demo and you have a game: a start screen with an upgrade shop, three levels, toasts, a results card with confetti, sound and an autopilot that plays the levels by itself.


GAMEPLAY

• Player swarm: drag or keys to steer, spiral or grid formation, lane clamping, up to 500 units (configurable)

• Math gates: add, subtract, multiply, divide; linked pairs and full-width gates; colour-coded presets

• Crowd battles: armies engage at a set distance, charge, and trade units one for one on a tick

• Enemy formations: idle, patrolling or charging, with patrol paths you drag in the Scene view

• Obstacles: spinning saws (optionally sliding), sweeping bars and spike traps with a warning wobble

• Finish stairs: the crowd climbs multiplier steps (x1.2 to x5), paying units per step; the last step sets the reward

• Coins along the track, collected by the crowd's formation


PROGRESSION

• Levels as data: gates, enemies, obstacles, coin lines and the finish in one asset

• Level sequences that loop forever, with a level number that keeps counting

• Coins, end-of-level rewards and upgrades (start units, income) with growing prices

• Saved progress through a small interface: PlayerPrefs by default, your own save system in minutes


PERFORMANCE

• Burst-compiled C# jobs for formation layout, unit movement, battle contact and hazard hits

• Object pooling with prewarming, so nothing is instantiated during play

• No physics or colliders anywhere: gates, battles, hazards and coins use simple maths

• No per-frame garbage in the gameplay loop, checked by allocation tests

• Stick figure units animated in the vertex shader: SRP Batcher and GPU instancing friendly


FEEL

• Feedback Player: sounds and haptics for gates, coins, battles, hazards and stairs, from a pooled set of AudioSources

• Haptics through a one-method interface: the built-in vibration, or plug in your favourite haptics plugin

• Count labels, death effects and confetti


DEMO

• Three levels that introduce each feature, ending with an 80-unit boss army

• Start screen with an upgrade shop, sound and vibration switches, progress bar, coin counter and results card

• Autopilot: dodges obstacles, collects coins and picks the best gate (great as an attract mode)

• Bright, rounded casual look, portrait first and fitting landscape screens such as a web page

• Generated placeholder sounds, free to use

• The whole demo scene is rebuilt by a menu item, so you can read exactly how it is put together


FOR PROGRAMMERS

• Clean, commented C# in assembly definitions and namespaces

• C# events for code and UnityEvents for designers on every system

• Editor tools: Gate Spawner inspector, patrol path handles, gizmos, level gizmos, default asset generators

• EditMode and PlayMode tests, including zero-allocation tests


REQUIREMENTS

• Unity 6.6 (6000.6) or newer, Universal Render Pipeline 17.6+

• Burst, Collections, Mathematics, Input System and uGUI (TextMesh Pro), installed as package dependencies


THIRD-PARTY

Includes the Nunito font (SIL Open Font License 1.1) in the demo. See "Third-Party Notices.txt" in the package.


Documentation: https://hardartcore.com/unity_assets/crowd-runner-framework/

Support: support@hardartcore.com