Skip to content

njelly/TofuECS_CGOL

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TofuECS_CGOL

An implementation of Conway's Game of Life, made in Unity using the TofuECS framework.

This is a very simple Unity project. The key takeaways should be that all ECS code is kept inside an Assembly Definition that allows unsafe code and prevents any UnityEngine references. This helps keep the project and the code organized by maintaining a clear separation of game logic (ISystem instances) and the rest of Unity, which should only contain view logic.

SimulationRunner provides an example of how you can initialize a Simulation, register components, and respond to state changes (in this case, update a texture on a sprite when a cell on the board toggles its value).

BoardSystem isn't a very typical example of an ISystem implementation. The only component in the game is bool rather than something user-created, Query is not used, and entities aren't utilized. However it does show how TofuECS can be very fast when iterating over buffers directly.

About

An implementation of Conway's Game of Life, made in Unity using the TofuECS framework.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages