Hi,
I'd like to share with you some progress on my new game development and some thoughts.
I always thought of particle effects as a very important part of any game. Basically any game without good sparks and other effects just doesn't feel too well IMO. Just look at Killzone 2 - it looks fantastic how the sparks bounce around the screen. Those little things bring up the awesome level a lot.
I always wanted to have my own sparks that look real. I asked my friend once if he could make something like that for me. Make it yourself, he said. I loled to myself cuz I didin't know shit about programming and it was just was too abstract to thing about. Couple month later I decided to start learning AS3 in order to make my own games. I said to myself that If I could make a spark effect I could do a game. So I started thinking of how should it work. It's really an easy thing from the math point of view - some more or less basic trigonometry but damn, making it work was super hard for me as I'm a bad coder. After one week it was done. Horrible design, bad performance, no flexibility, no basic stuff around it, hell it wasn't even a class.
My first particle test This is the very first basic pseudo physics I made(refresh to see it again) . Here is the functional spark effect and first shitty collision test after many changes and optimization I got the finished effect(collision still WIP). The version of this code was used in BlacknWhit. It was really bad and making a different effect required me to write a new function - but it looked cool for me and I was very happy that I made something that I thought was impossible for me. Funny - I know, particles are nothing complicated and there are many full particle engines billions time better but the point is that it was important for me. Thankfully I learned a lot through the process and I've even finished my 1st game(too ashamed to show it here ;) ) .
I still lacked basic AS3 knowledge - the whole game was created in one class, inside Flash editor (5000 lines - a horror), with ifs, loops and functions. With the new game I mentioned a week earlier I decided to make something actually good. I wanted a very good particle system so I stared with rewriting everything from ground up. Everything - except the maths more or less, was done differently. Classes, constructors, parameters, arrays - all stuff that should be. The effect was great - from 200 particles max. in old version, now I have more than 1000 with different types. With one function I can create almost any effect you want - just change some parameters. Take a look at version 2.0.
Unfortunately when implementing an 'impulse' functionality (imagine a shock wave from explosion that pushes all particles on screen ) it turned out that I messed up something with the arrays. I was trying to fix it, but nothing helped to satisfy my plan. I rewrote everything again.
Now everything works excellent. I had some problems at start but with many design changes and many lessons learned I finally made it. version 3 beta 1(i know that except the impulse it looks the same but the code is brand new).
So I have a nice little system that manges particles on the screen. I have a good base to make a good game now(so I hope). Similar code will handle everything from bullets to enemies.
From plans the full version 3 will have:
- magnets
- gravity points
- smoke and fire in separate classes
- new parameters for better control and new effects
- better performance
- basic collision detection (in v3.1)
I also want to implement bitmap caching which will have a huge performance impact, but I don't think I know enough to do it now. (v3.5) For Intruder game purposes I'd like to have Box2D integration(v4.0 (I also thought of making something smaller cuz I need only ragdolls and basic box collisions - look at Soldat's physics)), I did some experiments but don't know so far how will it turnout. Now I'll focus on making the actual game and version 3.0.
From other news I have a new secret animation project in mind, in Flash! Funny how you can change your mind sometimes. My Blender plans are still actual anyway.
That's all I wanted to say today. Wows it turned out to be pretty long, hope that someone will actually read this.
Cheers!
Godliest
The 3rd version looks good and promising. The only strange thing I found was the half the time (or maybe even more often) the sparks had a tendency to get caught in the platforms. Such cute cat : >
mmankt
my kitty says thank you;)