SFML community forums

General => SFML projects => Topic started by: Syntactic Fructose on October 22, 2014, 03:16:58 am

Title: Particle Simulator in C++/SFML/OpenGL
Post by: Syntactic Fructose on October 22, 2014, 03:16:58 am
After a couple months of tinkering around with SFML and OpenGL here's my finished product!

At first look(left: default color scheme, right: random color scheme):

(http://i.imgur.com/DaPWowN.gif)(http://i.imgur.com/WNB2BEY.gif)

Download and View more on Github: https://github.com/Syntaf/ParticleSimulator

What Exactly Is This Doing?
The simulator currently combines mouse input with newtons second law of motion d = (1/2)at2 + vit. Particles continually accelerate towards the mouse point while the user holds down LMB. Once released, a constant drag force is applied until the particles eventually grind to a half, making for some pretty near formations in the simulation!

Can I Change Stuff?
Of course, just about every variable can be modified during runtime to change the environment the particle live in. The console positioned to the left of the program handles all input and commands so you can create your own custom world and play around with the particles. You are able to manipulate the:

these commands can be changed at anytime during runtime(except particle count, that is called in the cmd args) by using get and set. An example would be:
> get drag
20.0f
> set drag 50
> get drag
50.0f
to see all available commands, make sure to take advantage of the help <> command

Future Ideas Or Suggestions
I am always open to suggestions on to improve this program. If you have any suggestions, issues or comments leave them here or on the github page, either way works! Better yet, join in, I can never have enough contributors to the project.
Title: Re: Particle Simulator in C++/SFML/OpenGL , now (pretty much) finished!
Post by: eXpl0it3r on October 22, 2014, 09:04:49 am
Looks really cool. :)

Do you have some binaries by any chance? :D
Title: Re: Particle Simulator in C++/SFML/OpenGL , now (pretty much) finished!
Post by: Syntactic Fructose on October 22, 2014, 09:14:23 am
Check under the release tab on github(or https://github.com/Syntaf/ParticleSimulator/releases). These are compiled using x64 , so if anyone still by chance uses 32 bit I could possibly recompile it myself and upload an additional release.
Title: Re: Particle Simulator in C++/SFML/OpenGL , now (pretty much) finished!
Post by: zmertens on October 23, 2014, 06:44:54 am
This is great! It works really well. I like how its interactive.
Title: Re: Particle Simulator in C++/SFML/OpenGL , now (pretty much) finished!
Post by: TheKingArthur on October 23, 2014, 05:45:56 pm
Great ! Looks very beautiful !
Title: Re: Particle Simulator in C++/SFML/OpenGL , now (pretty much) finished!
Post by: xerca on October 24, 2014, 08:49:53 pm
This is so amazingly beautiful