Back to Portfolio

3D Conway's Game of Life

Real-time cellular automaton renderer built from scratch with OpenGL

Project Overview

This is a real-time Conway's game of life renderer built with OpenGL. A main focus of this project is to build an interactive Cellular Automaton system and use it to bring the Conway's game of life to life (i.e. make The Conway's game of life visual and interactive). Another large focus of this project is to be the most optimal possible in terms of rendering and calculus.

Key Features

Rendering Features

  • Instanced Rendering for optimal performance
  • VAOs, VBOs and EBOs implementation
  • Face culling optimization
  • Z-Buffer depth testing
  • GLSL 330+ shader programming
  • Camera movements with mouse & keyboard

Engine Architecture

  • OpenGL 3.3+ graphics API
  • GLFW for inputs and display window
  • ASSIMP for model loading
  • STB.stb_image.h for image loading
  • Custom cellular automaton system
  • Real-time pattern simulation

Conway's Game Patterns

  • Still lifes pattern visualization
  • Oscillators pattern animation
  • R-pentomino pattern evolution
  • Pattern stabilization tracking
  • Interactive pattern manipulation
  • Real-time generation counting

Visual Results

Technical Implementation

The engine utilizes instanced rendering to efficiently display thousands of cells simultaneously. Each cell is represented as a 3D cube, with the cellular automaton logic running on the CPU while leveraging GPU optimization for rendering. The implementation focuses on performance optimization through modern OpenGL techniques including vertex array objects, buffer objects, and efficient shader programming.

Conway's Game of Life Patterns

The simulation accurately implements Conway's Game of Life rules, showcasing various pattern types including still lifes (patterns that don't change), oscillators (patterns that repeat), and complex evolving patterns like the R-pentomino. The R-pentomino is particularly interesting as it evolves for 1103 generations before stabilizing, demonstrating the engine's ability to handle long-running simulations efficiently.

Source Code & Contribution

This project is open source and available on GitHub. The codebase demonstrates advanced OpenGL programming techniques, efficient cellular automaton implementation, and modern C++ development practices. Contributions are welcome through the standard GitHub workflow.

View on GitHub

Applications & Impact

This project demonstrates expertise in real-time graphics programming, cellular automaton simulation, and performance optimization. The techniques developed can be applied to other simulation systems, making it valuable for developers working on similar real-time visualization projects. The project showcases the ability to build complex graphics applications from the ground up using modern OpenGL.