Skip to content

Demo: Lots of Cubes

This demo demonstrates a simple case how to update the state of a large number of Entities, and how to bring this data into a Game Engine.

Source Code

This demo is available for the following:

MonoGameGodotFlaxUnigineStrideRaylibNeoAxis
MonoGameGodotFlax EngineUNIGINE UNIGINEStrideRaylib-csNeoAxis Engine NeoAxis Engine

Video (Godot Version)

INFO

All motion is 100% CPU simulation (no GPU). The point is not that this could be done faster on the GPU, the point is that it can be done fast on the CPU. 🦊

State is stored in Components on the Entities:

  • 1x Vector3 (as Position)
  • 1x Matrix (as Transform)
  • 1x int (as a simple identifier)

The state is transferred into the Game Engine in bulk each frame using Stream.Raw in order to submit just the Matrix structs directly to the Engine's data structures for this task.

This static data is then used by the Engine's Renderer and to display the Entities.

Video (Stride Version)

fennecs is released under the MIT License. Neofox is released under the CC BY-NC-SA 4.0 License.