Crowd Runner Example
Defold example with up to 32765 entities support with simple physics
Links:
- Github repo
-
HTML example
- Profiler is not working in HTML release build
- On mobile touch the screen to move
About
The example was created from this video:
And we tried to build the same stuff on Defold. For now it’s kind of example and benchmark to see how we can use a lot of entities at once time.
You can see the code comments and how it’s implemented here: https://github.com/Insality/crowd-runner-defold/blob/main/game/system.script
The example have two toggler:
-
Skip update
- the entities which far away from the player call update less frequently (up to zero times) -
Draw outside
- the entities which far away from player is disabled (only sprite component). You can check how it affects on game performance. Since the culling is introduced, seems it’s not very valuable, but anyway increase performance a little
Control:
WASD or touch the screen for move
P - Profiler
Or use on-screen buttons
Sprites generated by pixeldudesmaker: pixeldudesmaker by 0x72