Hi everyone,
after countless hours of learning from Chili, I decided, it is time to made my first project. It is simple top-down fluid simulator. It isn't perfect, but I hope you'll like it You can add fluid by clicking in window.
I hope the code is readable but if you don't understand something, I will explain it to you.
I was inspired by Creeper World, which is game where you basically fight against fluid.
Any suggestions are welcomed. Also there is a bug which causes some pixels to freeze and i don't have faintest idea how to find this bug, so if you're bored then you can try to find it
Thank you Chili for tutorials, jokes, advices etc. Btw. never stop being Chili: D
P.S. I recommend to run the simulator in release mode!!!
Update: So here is new version of my simulator. I found my bug so there shouldn't be any more inactive pixels. There is little change, you can add fluid by right click. Btw. I don't like the way how I made option, main menu and slider classes, but I'm too lazy to make it batter
some sort of fluid simulation
some sort of fluid simulation
- Attachments
-
- Fluid physics 1.1.zip
- You can change a lot of things :)
- (1.22 MiB) Downloaded 176 times
-
- Fluid physics.zip
- (1.11 MiB) Downloaded 201 times
Last edited by erisdar on August 6th, 2014, 9:53 am, edited 1 time in total.
Re: some sort of fluid simulation
Neat simulation bro! I like your class design. This is the kind of code I hope that my viewers will learn to produce from watching my stuff.
P.S., did you check out my mass/spring network simulation?
P.S., did you check out my mass/spring network simulation?
Chili
Re: some sort of fluid simulation
This is a pretty cool simulation! Your code is easy to understand. You should add features like changing colors. Changing fluid spread speeds based on the type of fluid. Add Gravity so then the liquids move towards the bottom.
CraigSpaz
Re: some sort of fluid simulation
Chili: I saw your simulator, but I'm still getting used to programing with vectors, so it was pretty hard to understand. I found interesting document about fluid dynamics for games, so I'm trying to understand it and I will use it to make my simulator better.
Craigspaz: First of all, I want to create the most efficient and bug free fluid mechanics and then I will add terrain, gravity etc.
Craigspaz: First of all, I want to create the most efficient and bug free fluid mechanics and then I will add terrain, gravity etc.