Flow Test
Flow Test v0.1
What started as an attempt to intuitively create a fluid simulation mutated into watching pretty colors spread across the screen. There's not much optimization going on under the hood so this may lag your device quite severely, if so hit the reset button (or ctrl+R) to return to the initial state. It's also not exactly an accurate simulation, see "How it works" below.
How to use
Click or tap on the window to add energy to an area of cells. Clicking or tapping and dragging will trigger multiple cells. Use the menu at the top to reset the simulation, toggle arrows representing the flow, or toggle the values of all cells. Click the bottom edge of the panel to hide it.
Tips
Try pausing the sim, drawing on the screen, and unpausing to get simultaneous flow effects. Use different energy level settings to create complex flows and patterns.
How it works
The window is divided up into 30 x 30 pixel cells. Each cell is a Node2D containing a float and an array of its 8 cardinal direction neighbors. Every frame each cell checks its neighbors in random order and either adds or subtracts half the difference of the value between it and its neighbor's cell values:
this cell value += ((neighbor cell value - this cell value) / 2)
That value is then converted to a position on a Gradient and applied to the cell square. Do that every frame and you get pretty transitions as higher energy areas flow into lower areas. Is that simulating diffusion or fluid? Ehhh not so much, but it looks cool.
Future plans
- Add new gradient options
- Add controls for changing diffusion rate
- Make an actual fluid simulation
- Convection and gravity
- Make an actual game out of this???
- Nicer looking UI
- ???
| Updated | 10 days ago |
| Published | 23 days ago |
| Status | Prototype |
| Platforms | HTML5 |
| Author | turkeydonkey |
| Genre | Simulation |
| Made with | Godot |
| Tags | 2D, Godot, Math, No AI, Physics, Touch-Friendly |
| Average session | A few minutes |
| Languages | English |
| Inputs | Mouse, Touchscreen |
| Accessibility | One button |
| Content | No generative AI was used |
Development log
- How to actually create a fluid simulation10 days ago
- Flow Test v0.1 released!23 days ago



Leave a comment
Log in with itch.io to leave a comment.