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
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.
- 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.
- 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.
Follow these instructions to set up a local copy of the project on your machine.
- Java Development Kit: JDK 8 or higher (Oracle JDK, OpenJDK, or Eclipse Temurin)
- Java IDE: IntelliJ IDEA, Eclipse, or standard command line terminal
- Clone the repository:
git clone https://github.com/GuilhermeGraca/java-gol-dla-processing.git
- Navigate to the project root directory:
cd java-gol-dla-processing - Compile and run using IntelliJ IDEA:
- Open the project directory in IntelliJ IDEA.
- Open
src/setup/ProcessingSetup.javainsidejava/TP1_A51736_A51827/. - In the
mainmethod, uncomment eitherapp = new JogoDaVida();orapp = new DLA();to choose the simulation. - Run the
ProcessingSetup.main()method.
- 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
- Select Simulation: Open
ProcessingSetup.javaand instantiate eitherJogoDaVidaorDLAin themainmethod 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.
Guilherme Graça
- LinkedIn: guilherme-graça
- GitHub: @GuilhermeGraca
- Project Link: https://github.com/GuilhermeGraca/java-gol-dla-processing
- 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.