Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
A jam submission

Conway's Game of LifeView game page

Submitted by Nuzumi (@MSewerniak) — 6 days, 9 hours before the deadline
Add to collection

Play game

Conway's Game of Life's itch.io page

Git Repository
https://gitlab.com/Nuzumi/conwaysgameoflife

Performance Strategy
This implementation works by creating an entity for each cell. cells have current alive/dead value and index that represents position in array to read/write data from/to. On cell creation I precalculate all 8 neighbors indexes and store those in dynamicBuffer. Cells are displayed using raw image and texture2d. Here is : https://blog.unity.com/engine-platform/accessing-texture-data-efficiently nice article about efficient ways of accessing texture data.

Main update loop:
IJobEntity to write current state of cell to nativeArray
IJobEntity to read data of neighbors from nativeArray and determine cell state
IJobEntity to write data to texture2D

Currently the second step takes the majority of the frame budget.
I also added the option to manually toggle cells on and off.

Results on my machine (i5-9400F, 16GB ram, 4070)
2048 cells ~50fps
4096 cells ~12fps

Leave a comment

Log in with itch.io to leave a comment.

Comments

No one has posted a comment yet