guilhemSmith / mod1

Terrain and water simulation. Made within the 42 cursus.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

mod1

mod1 is a simple water simulation demo written in rust by gsmith.

It use the pipe model to store the pression between each cells of the water heigthmap.
The water height and pressure evolution run on the cpu so the map has a resolution of only 100x100 cells.

waves

Compilation from sources

On macOs and Linux

rain

Usage

Launch

cargo run --release -- <mapfile> or ./target/release/mod1 <mapfile>, will launch the demo with the specified mapfile.

example: cargo run --release -- resources/demo1.mod1

There are multiple map file in the resources folder, you can edit them or make your own.
A map file should contain only one point per line, each point corresponding to 3 float number separated by spaces.

controls

input effect
left-click move the camera around
w add water on the side of the map (wave)
t add water on low level terrain (tide)
r add rain
d drain water on low level terrain
+ increase strength of water command
- decrease strength of water command

tide

About

Terrain and water simulation. Made within the 42 cursus.


Languages

Language:Rust 91.1%Language:GLSL 8.9%