Any particle engines available for BlitzMax?

BlitzMax Forums/BlitzMax Programming/Any particle engines available for BlitzMax?

SofaKng(Posted 2007) [#1]
I've just purchased BlitzMax and I'm wondering if any particle engines exist for it... (hopefully with some example particles)

Thanks,
John


sswift(Posted 2007) [#2]
My sprite system is not exactly a particle system, but it supports automatic animation of all the properties of a sprite including scale, rotation, position, color, and alpha. I've used it in my own games for particle effects, including explosions, sparkles, smoke, and wind.

The thing is that not being a particle system, it doesn't have "emitters" which you can attach to sprites to make them automatically emit particles. You need to create each new particle yourself at the right time in your game loop. So if you have a fireball on your screen, and you need it to emit smoke, then you need to store the pointer to it somewhere so you can get its position and then spawn animated smoke sprites at that location.


Dreamora(Posted 2007) [#3]
There are some. Check out the code archives (or the german codearchivs where several particle systems can be found)
I'm "currently" rewritting particle dreams as well to teach it some new tricks (timeline especially, spline and linear) and make it easier to use in a real usage environment.


Grey Alien(Posted 2007) [#4]
My framework has a particle engine similar to swifts i.e. you create the particles and then they go off an automatically animate (scale, move, rotate, fade etc) and also you can make animation phases e.g. fade in, move and stat at full brightness whilst rotating, then fade out. My games (check my sig) use this engine and it's pretty versatile.


SofaKng(Posted 2007) [#5]
Thanks for the replies!

sswift: Do you have any demos of your library?

Dreamora: Where are the German code archives?

Grey Alien: I'll check out your framework. Thanks!


sswift(Posted 2007) [#6]
I've only got some simple demos:
www.seamlesstexturegenerator.com/systems/Swift.Sprite.System.Demos.zip

Really, you can pretty much do anything you'd want to do with regards to animation. And you can do all sorts of things that would be impossible with an ordinary particle system because of the parent/child stuff built into my sprite system. If I ever made a particle system for myself, I'd just build it on top of and/or into the sprite system and use all the sprite animation stuff for it.

Heck for just regular sprite animation alone the sprite system is way worth it. It is hard to convey just how much the system does. I used it to make a puzzle game with lots of animation, and every single thing in the game is a sprite. And there's hundreds on screen at once. Months of work have gone into this system. It's super easy to use, and really well commented.


SofaKng(Posted 2007) [#7]
I'll definitely check it out...

This is not really related but I'll ask it anyways:

Does your system allow for resolution independant graphics?

For example, if I design my graphics for 800x600 then if the user is allowed to choose 1024x768 the graphics will no longer be drawn correctly. (for example, the point (50, 50) on an 800x600 will not be in the same place on a 1024x768 screen).

Any information you have on this would also be greatly appriciated.

Thanks again for your help!!


Grey Alien(Posted 2007) [#8]
btw, you can integrate sswift's system into my framework.


SofaKng(Posted 2007) [#9]
One last thing...

Do you have any examples of "particles" (I use quotes because as you said they aren't really particles but just animated sprites)?


sswift(Posted 2007) [#10]
"Does your system allow for resolution independant graphics?"

You could make it work with all square pixel resolutions by attaching everything to a parent pivot and scaling that pivot up for higher resolutions, but that solution would not work with resolutions that have a different aspect ratio because there's no way to deform rotated sprites along an arbitrary axis.

However, I'm pretty sure I heard someone mention once that they'd created a function that would allow you to set up BlitzMax so it behaves in the way you desire. If you found that function, I'm positive the sprite system would work with it.


SofaKng(Posted 2007) [#11]
Are your referring to Indiepath's Projectionmatrix module? (after searching this is what I'm come up with)

It seems like this is what is used to have resolution-independant graphics.


Grey Alien(Posted 2007) [#12]
yeah that's what you need or something like it. You could code it yourself by modifying the sprite drawing code.


CS_TBL(Posted 2007) [#13]
Aren't there like 1001 ways one can make a particle engine? I once made simple stuff like fountains, explosions etc. If there was ONE thing I learnt from it then it was that it's all too easy to make a far too limited implementation which is all-in quite depending on how you're going to use it.