Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: A Particle Simulation project, custom console update  (Read 8550 times)

0 Members and 1 Guest are viewing this topic.

Syntactic Fructose

  • Jr. Member
  • **
  • Posts: 80
  • Overflowing stacks and eating snacks
    • View Profile
A Particle Simulation project, custom console update
« on: May 30, 2014, 06:20:52 pm »
Edit 3:



Large update to the application, considered the first actual release for the project! There are a number of awesome new additions, check the changelog and give the program a try:

https://github.com/Syntaf/ParticleSimulator/releases

Or checkout the Github page and help contribute to the project!

https://github.com/Syntaf/ParticleSimulator

Edit 2:
A lot has changed since the last release!

Here's a short list of some of the changes from the latest release tab on the repo ;D:

  • Wrote a CMake build system! No more VS2012 clutter files
  • Experimental OpenCL support, thanks to finominis
  • Blending now uses GL_ONE, creating a range of awesome new particle colors
  • Fixed bug stopping events from being handled, not allowing people to quit
  • Code optimizations, big big speed improvements
  • Disabled depth testing, properly making texture alpha channels transparent
  • Drag increased by 1.5x
  • Particle count increased, specifically from 40,000 to 1,000,000 without any big performance loss
  • Window size increased but still maintains 1.33 ratio
  • Red Clamping value increased to turn make particles turn red at a lower speed

Edit 1:
Hi All,

I've been developing a particle simulation program using SFML and OpenGL for a couple months now, and recently finished a new physics system for calculating the next position of each particle. Problem is I didn't exactly implement it correctly, but I'm left with a pretty cool pulsating wave of pixels. The program now correctly simulates newtons second law of motion! Check it out at the repository here:
https://github.com/Syntaf/ParticleSimulator
The project is currently developed by myself and Finominis, but we are always looking for more people to contribute to the project!

or play around with the program using my pre-release
https://github.com/Syntaf/ParticleSimulator/releases/tag/v0.2-alpha
« Last Edit: August 12, 2014, 11:43:27 pm by Syntactic Fructose »

Jesper Juhl

  • Hero Member
  • *****
  • Posts: 1405
    • View Profile
    • Email
Re: A Particle Simulation project...with interesting physics
« Reply #1 on: May 30, 2014, 06:29:22 pm »
While I can totally relate to building something from scratch for the learning experience; if you just want something that works, why not just use something like Thor's particle system: http://www.bromeon.ch/libraries/thor/v2.0/tutorial-particles.html ?

Syntactic Fructose

  • Jr. Member
  • **
  • Posts: 80
  • Overflowing stacks and eating snacks
    • View Profile
Re: A Particle Simulation project...with interesting physics
« Reply #2 on: May 30, 2014, 06:37:45 pm »
While I can totally relate to building something from scratch for the learning experience; if you just want something that works, why not just use something like Thor's particle system: http://www.bromeon.ch/libraries/thor/v2.0/tutorial-particles.html ?

I'm fully aware that there are way easier solutions, I use this to test my knowledge from the site: "This Simulator is an ongoing project, and is a tool to test my knowledge and understanding of OpenGL and SFML."

Syntactic Fructose

  • Jr. Member
  • **
  • Posts: 80
  • Overflowing stacks and eating snacks
    • View Profile
Re: A Particle Simulation project...now with working physics!
« Reply #3 on: June 22, 2014, 05:28:24 pm »
project updated! and works as intended surprisingly enough. Added pre-release for people to play around with.

Peteck

  • Jr. Member
  • **
  • Posts: 55
    • View Profile
Re: A Particle Simulation project...now with working physics!
« Reply #4 on: June 22, 2014, 07:19:13 pm »
I made it freeze, don't know what actually I did. Was playing around with the pre-release and well, it froze!

Syntactic Fructose

  • Jr. Member
  • **
  • Posts: 80
  • Overflowing stacks and eating snacks
    • View Profile
Re: A Particle Simulation project...now with working physics!
« Reply #5 on: June 22, 2014, 07:28:07 pm »
I made it freeze, don't know what actually I did. Was playing around with the pre-release and well, it froze!

Well that's not supposed to happen... it just, completely stopped? Like zero movement?

Peteck

  • Jr. Member
  • **
  • Posts: 55
    • View Profile
Re: A Particle Simulation project...now with working physics!
« Reply #6 on: June 22, 2014, 07:40:15 pm »
Like zero movement?
Exactly, the program didn't crash! But the particles just stopped moving.

Syntactic Fructose

  • Jr. Member
  • **
  • Posts: 80
  • Overflowing stacks and eating snacks
    • View Profile
Re: A Particle Simulation project...now with working physics!
« Reply #7 on: June 22, 2014, 08:23:16 pm »
Like zero movement?
Exactly, the program didn't crash! But the particles just stopped moving.

Ahh I realize why now, It's the lifetime of the particle. I set the lifetime for all particles to 100 seconds, and afterwards they can no longer be manipulated. I never actually tested beyond 100 seconds so I completely forgot to change that value heh, it's more a placeholder for when I start developing a UI and allow the user to run multple simulations without restarting the application.

Looks like for now, you get 100 seconds of runtime before rerunning :P

Syntactic Fructose

  • Jr. Member
  • **
  • Posts: 80
  • Overflowing stacks and eating snacks
    • View Profile
Re: A Particle Simulation project, new and improved
« Reply #8 on: July 09, 2014, 04:42:58 pm »
New big changes in the repository

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10801
    • View Profile
    • development blog
    • Email
Re: A Particle Simulation project, new and improved
« Reply #9 on: July 10, 2014, 09:35:45 am »
New big changes in the repository
What exactly did you change? :D
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Syntactic Fructose

  • Jr. Member
  • **
  • Posts: 80
  • Overflowing stacks and eating snacks
    • View Profile
Re: A Particle Simulation project, new and improved
« Reply #10 on: July 11, 2014, 05:34:18 am »
New big changes in the repository
What exactly did you change? :D

Here's a short list of some of the changes from the latest release tab on the repo ;D:

  • Wrote a CMake build system! No more VS2012 clutter files
  • Experimental OpenCL support, thanks to finominis
  • Blending now uses GL_ONE, creating a range of awesome new particle colors
  • Fixed bug stopping events from being handled, not allowing people to quit
  • Code optimizations, big big speed improvements
  • Disabled depth testing, properly making texture alpha channels transparent
  • Drag increased by 1.5x
  • Particle count increased, specifically from 40,000 to 1,000,000 without any big performance loss
  • Window size increased but still maintains 1.33 ratio
  • Red Clamping value increased to turn make particles turn red at a lower speed


Syntactic Fructose

  • Jr. Member
  • **
  • Posts: 80
  • Overflowing stacks and eating snacks
    • View Profile
Re: A Particle Simulation project, custom console update
« Reply #11 on: August 12, 2014, 11:24:25 pm »
first actual release of the application, woo!

Ztormi

  • Jr. Member
  • **
  • Posts: 71
  • Web developer by day. Game developer by night.
    • View Profile
Re: A Particle Simulation project, custom console update
« Reply #12 on: August 22, 2014, 12:56:53 pm »
Beautiful! I love these kinds of projects.

 

anything