Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/blayung/ca-physics
A simple cellular automaton-based physics simulation written in c++.
https://github.com/blayung/ca-physics
cellular-automaton cpp physics physics-simulation sdl2 simulation
Last synced: about 1 month ago
JSON representation
A simple cellular automaton-based physics simulation written in c++.
- Host: GitHub
- URL: https://github.com/blayung/ca-physics
- Owner: Blayung
- License: gpl-3.0
- Created: 2022-05-31T15:58:47.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-05-10T20:43:45.000Z (9 months ago)
- Last Synced: 2024-11-08T18:52:04.847Z (3 months ago)
- Topics: cellular-automaton, cpp, physics, physics-simulation, sdl2, simulation
- Language: C++
- Homepage:
- Size: 225 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Cellular Automaton Physics Project
# DISLAIMER: I'M CURRENTLY REWRITING THIS PROJECT IN RUST, THE C++ VERSION WON'T GET ANY MORE SUPPORT. YOU CAN CHECK OUT THE RUST DEVELOPMENT BRANCH OVER [HERE](https://github.com/Blayung/ca-physics/tree/rust-dev).
## Features
* Simple 2d physics
* Gases physics
* Liquid physics
* Powders physics
* Particles: stone, wood, water, oil, sand, gunpowder, fire, lava, steam, smoke, flammable gas
* Time control, custom grid and particle sizes.
## Controls
**Scroll ->** Choose a particle
**LMB ->** Place a particle
**RMB ->** Remove a particle
**R ->** Reset the grid
**Q/Escape ->** Quit
**Left/Right arrow ->** Change speed
## Compiling (assuming you're on linux)
Clone the repo:
`git clone https://github.com/Blayung/ca-physics.git`
`cd ca-physics`Install sdl2 and sdl2 ttf (I use pacman for example):
`sudo pacman -S sdl2`
`sudo pacman -S sdl2_ttf`Compile the program:
`g++ main.cpp -lSDL2 -lSDL2_ttf`Run it:
`./a.out`