#Conway's Game of Life

1 messages · Page 1 of 1 (latest)

calm river
#

👋 Hey everyone! I’ve been learning Zig (and also Raylib), and made a simple implementation of Conway’s Game of Life:
Repo: https://github.com/cincip/game-of-life-zig

This is my first time working with a systems programming language and a game library, so I’d love feedback specifically on:

  • How I’ve organized the code (design/architecture, which files do what, etc.)
  • Any more “Zig-like” patterns or idioms I should use
  • General tips for writing clearer or safer Zig code

It’s still a WIP, so I’d really appreciate any suggestions. Thanks!

GitHub

A very simple implementation of Conway's Game of Life written in Zig. - cincip/game-of-life-zig

ivory leaf
#

I am no game dev, but in the step function in board.zig, you allocate an array and then memcpy to the table of the struct. That is okey but you could consider allocating it in the init, and instead of memcpy you could swap the pointers of the buffers.
I dont know i explained myself clearly

calm river
dapper rain