Skip to content

Repository files navigation


Game of Life & DLA Simulator

An interactive Java Processing simulator for Conway's Game of Life cellular automata and Diffusion-Limited Aggregation fractal growth.

Explore the Documentation »

Report Bug · Request Feature

Table of Contents
  1. About The Project
  2. Lessons Learned
  3. Getting Started
  4. Usage
  5. Contact
  6. Acknowledgments

About The Project

golDemo.mp4

Conway's Game of Life simulation demo — Watch/Download Video »


DLADemo.mp4

Diffusion-Limited Aggregation simulation demo — Watch/Download Video »


This repository contains **Game of Life & DLA Simulator**, an academic project developed in 2024 for the *Modelação e Simulação de Sistemas Naturais* course at **ISEL (Instituto Superior de Engenharia de Lisboa)**. The project was built in collaboration with **Martim Ramos**, who developed the Diffusion-Limited Aggregation module, while I developed the Conway's Game of Life module.

The primary goal of this project is to simulate and visualize natural emergent behaviors using simple computational rules. It explores two distinct natural simulation models:

  • Conway's Game of Life: A discrete cellular automaton where grid cells evolve over time based on their surrounding neighbors. Simple rules governing birth, survival, and death lead to complex emergent population patterns.
  • Diffusion-Limited Aggregation: A simulation model where particles undergoing a random walk collide and stick to stationary seeds. This process forms natural branching fractal structures similar to crystal growth and mineral deposits.

Demonstration videos for both simulation modules can be found in the preview/ directory of this repository and viewed above. For a deeper theoretical background and mathematical analysis, detailed documentation and academic reports are available in Portuguese within the doc/ folder.

(back to top)


Built With

  • Java
  • Processing

(back to top)


Features & Key Highlights

  • Conway's Game of Life Module: Implements standard survival, birth, and death rules on a grid where new cells inherit colors from living neighbors.
  • Diffusion-Limited Aggregation Module: Simulates organic cluster growth using random walkers that stop and stick upon contacting stationary seeds.
  • Interactive Canvas Controls: Allows users to click on the grid to create live cells and change states during runtime.
  • Real-Time Speed Adjustment: Supports pausing, resetting, and increasing or decreasing simulation speed using keyboard shortcuts.

(back to top)


Lessons Learned

  • Cellular Automata Modeling: Learned how to model grid-based systems and apply local state transition rules across discrete time steps.
  • Random Walk and Aggregation: Gained understanding of Brownian motion and how simple probabilistic rules generate natural branching fractals.
  • Processing Library Integration: Mastered using the Processing core Java library to render real-time animations, handle vectors, and manage frame loops.
  • Modular Simulation Design: Practiced separating simulation logic from graphics rendering using interfaces and clean object-oriented architecture.

(back to top)


Getting Started

Follow these instructions to set up a local copy of the project on your machine.

Prerequisites

  • Java Development Kit: JDK 8 or higher (Oracle JDK, OpenJDK, or Eclipse Temurin)
  • Java IDE: IntelliJ IDEA, Eclipse, or standard command line terminal

Installation & Running Locally

  1. Clone the repository:
    git clone https://github.com/GuilhermeGraca/java-gol-dla-processing.git
  2. Navigate to the project root directory:
    cd java-gol-dla-processing
  3. Compile and run using IntelliJ IDEA:
    • Open the project directory in IntelliJ IDEA.
    • Open src/setup/ProcessingSetup.java inside java/TP1_A51736_A51827/.
    • In the main method, uncomment either app = new JogoDaVida(); or app = new DLA(); to choose the simulation.
    • Run the ProcessingSetup.main() method.
  4. Compile and run via command line:
    javac -cp "java/TP1_A51736_A51827/core.jar" -d out java/TP1_A51736_A51827/src/setup/*.java java/TP1_A51736_A51827/src/ca/*.java java/TP1_A51736_A51827/src/dla/*.java
    java -cp "out;java/TP1_A51736_A51827/core.jar" setup.ProcessingSetup

(back to top)


Usage

  • Select Simulation: Open ProcessingSetup.java and instantiate either JogoDaVida or DLA in the main method before running.
  • Start or Pause: Press the Spacebar to toggle simulation execution or reset the grid.
  • Interact with Cells: Click anywhere on the Game of Life canvas to create live cells with dynamic colors.
  • Adjust DLA Speed: Press + to increase simulation steps per frame or - to decrease speed.

(back to top)


Contact

Guilherme Graça

(back to top)


Acknowledgments

  • ISEL — Instituto Superior de Engenharia de Lisboa: For institutional support and academic environment.
  • Modelação e Simulação de Sistemas Naturais Course: For the scientific and technical foundation that supported this project.
  • Martim Ramos: For his collaboration and development of the DLA module.

(back to top)

About

An aplication that simulates the Game of Life and another the simulates DLA (Diffusion-limited aggregation), made using Java with the library Processing, made in colaboration with Martim Ramos in the class of Modelation and Simulation of Natural Systems

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages