Particles...?

BlitzMax Forums/MiniB3D Module/Particles...?

SLotman(Posted 2009) [#1]
I just start experimenting with MiniB3d, trying to find a replacement for the dying Blitz3D :(

I've got everything up and running, added all "fixes" I could find in this forum, and even changed everything so it would compile as superstrict.

Then, I tried to port the EPS Particle System from B3D to miniB3D (since I'm used to it on B3D, and also, it has a pretty good editor)... but after coding all night, I failed :(

At one time, I even saw the particles running... but it got slower and slower in a short period of time, to a point where the engine was running at 0 FPS. So I tough it was some kind of mistake I made, and started re-writing it from scratch... and this time, not only it slows down, but nothing appears on screen :(

So... have anyone tried porting the EPS to miniB3D? Or do you guys know a better system, with an particle editor already available?


slenkar(Posted 2009) [#2]
I made my own particle system by learning from JFK's in the code archives



its very simple and shouldnt be difficult to convert


heres the XML file that describes different effects



EXAMPLE



Kryzon(Posted 2009) [#3]
Does MiniB3D have the same surface "problem" that Blitz3D has (meaning, for every sprite created a new surface is also created, which slows everything down considerably)?

Or it is optimized automatically by the engine?


SLotman(Posted 2009) [#4]

I made my own particle system by learning from JFK's in the code archives


Thanks, but that's not what I'm looking for :(

I can write a particle engine from scratch... I even did a 2D one on "pure" Blitzmax some months ago.

My point is that the EPS particle from B3D already have a pretty good editor, which helps a lot when making a game. I even altered it to load models, so I can see exactly how the particle will look like when implemented in game.


Does MiniB3D have the same surface "problem" that Blitz3D has (meaning, for every sprite created, a new surface is also created)?

Or it is optimized automatically by the engine?


I have no idea. It shouldn't. Even on Blitz3D, the EPS system uses quads, instead of sprites, so no problems there.


SLotman(Posted 2009) [#5]
Here, I ported it AGAIN, and you guys can test it out.
Why the frame rate keeps dropping, I have no clue. On B3D the same emitter runs without any problem :(

Edit: it looks like particles are not being released? I'm completely lost...

Success! I wasn't removing the particles from particles list :)


simonh(Posted 2009) [#6]
Does MiniB3D have the same surface "problem" that Blitz3D has (meaning, for every sprite created a new surface is also created, which slows everything down considerably)?

Or it is optimized automatically by the engine?

Yes, BlitzMax MiniB3D works the same as Blitz3D - one surface per sprite.

In iMiniB3D (iPhone version), I've added a batching system to improve sprite performance, but I've yet to add this to the BlitzMax version.