Cog Yang
Cog Yin
Image 0
Image 1

CA Engine

0

A cellular automaton engine written for some personal and group projects.

Project Favicon
Zimo
Mar 11, 2023

CA Engine

This cellular automaton engine was initially developed for specific individual and group projects and was never publicly released, as it was not designed for general use. With some minor changes and code organization, it could potentially become a finished product, although there are no immediate (or long term) plans to pursue this.

The engine facilitates the creation of a rectangular grid of cells with customizable behavior. It supports continuous updates, known as 'ticking,' for a subset of cells referred to as ticking cells. In addition to cells, the engine allows the definition of entities, which are ticking objects that can occupy none, one, or multiple cells. Entities cannot overlap, meaning two entities cannot occupy the same cell. This might be better understood with some Minecraft concepts. The cells are equivalent to blocks; the ticking cells are equivalent to block entities; and the entities are just entities where it got the name.

The engine is bundled with several types of entities that offer core functionalities:

  • Moving Entities: Equipped with a pre-written movement function allowing them to change position.
  • Growing Entities: Can change the number of cells they occupy.
  • Utility Entities: Do not occupy any cells and are used for special purposes such as rendering the grid or spawning other entities.

The grid is rendered in JSON format, which can be read by a renderer script to produce PDF frames and video files of the animation.