Secretchronicles / TSC

An open source two-dimensional platform game.
https://secretchronicles.org/
GNU General Public License v3.0
204 stars 50 forks source link

Port particle system to SFML #437

Open Quintus opened 9 years ago

Quintus commented 9 years ago

The cParticle_Emitter class needs to be ported from raw OpenGL2 to SFML, probably utilising its vertex array features. There’s an example on the SFML tutorial pages.

Valete, Quintus

ghost commented 9 years ago

Can you refactor it in a way that it doesn't allocate the memory for every single particle on its own?

Am 14.06.2015 um 13:22 schrieb Marvin Gülker:

The |cParticle_Emitter| class needs to be ported from raw OpenGL2 to SFML, probably utilising its vertex array features. There’s an example on the SFML tutorial pages http://www.sfml-dev.org/tutorials/2.3/graphics-vertex-array.php#example-particle-system.

Valete, Quintus

— Reply to this email directly or view it on GitHub https://github.com/Secretchronicles/TSC/issues/437.

datahead8888 commented 9 years ago

You mean that it is running new and delete on each particle to spawn and destroy them rather than maintaining a pool of available particles (which is what it should do), correct?

ghost commented 9 years ago

Correct.

Am 14.06.2015 um 16:35 schrieb datahead8888:

You mean that it is running new and delete on each particle to spawn and destroy them rather than maintaining a pool of available particles, correct?

— Reply to this email directly or view it on GitHub https://github.com/Secretchronicles/TSC/issues/437#issuecomment-111835315.

datahead8888 commented 9 years ago

The priority is getting it ported to SFML. If this is easy to do and doesn't pose a risk, I don't have a problem with it unless someone else raises concerns. Sometimes things sound doable and turn out to be otherwise, but we will see.

I'm not sure if I'll have time to work on this or not yet; otherwise it will fall on Quintus/Luiji or whoever else helps out with the SFML port. I will be very tied up through June 24.

datahead8888 commented 8 years ago

I tentatively have started this task, analysis for now.

Quintus commented 8 years ago

Status update on this. With the switch to the new SFML porting approach, we are able to keep the old particle system. However, as part of the longterm goal of deeper architectural changes, I leave this issue open.

Valete, Quintus