Particle madness

posted in Cypher's Journal
Published December 11, 2005
Advertisement
In between studying for finals I'm still working on the particle system (and now the game). The particle system doesn't handle multiple textures yet, but got a nice speedup thanks to a suggestion by Reltham to split the primitives into batches of ten thousand or something, instead of spitting out all 50+k in one shot. While making that optimization, I ended up learning quite a bit more on how vertex steams work. Since then I played around with stretching the particles based on velocity a bit, which turned out really nicely (click for executable):


Right now I'm also working on the game logic/sprite system. In the past, I always kept graphics and game logic in the same class, but one thing I want to do for this game is to seperate the two as much as possible. So, right now I've got the old particle list, which stores an array of sParticle structs (Position, Velocity, Colour, Type, and a couple other things I'm forgetting) and takes care of all of the drawing based on that. The sprite list stores an array of sprites (note: I may or may not use an array in the final version, I'll get to that later) and performs operations on those. The sprites aren't too complex, with cSprite being a base class for all sprites, and then various types of sprites derived from that class. Anyways, the way I have my sprites talking to their respective particles right now is just storing an address to the position and velocity members of the associated sParticle in the particle list which is fairly convenient.

Anyways, sprite storage. Right now I'm using an array (newb doing a bit of pre-micro-optimization over here), but I also haven't implemented removal of entities from the array yet so right now I can get away with it reasonably safely. I'll likely move over to a linked list system later because an immense amount of sprite removal will be occuring which linked lists do fairly well.



Going to real life matters, I recently saw Serenity and holy crap is it badass. Really felt that a large amount of it was good. Also, does anyone else think that Caylee looks a LOT older in the film than in the show? I know it's been a nice three year gap between production of the show and the movie, but she looks like she aged 10 years in that time.

Final exams have also started for me. I've got my first tomorrow (I'm writing this over a study break) even though the exam season started last monday. "Thankfully", after tomorrow I'll have another 7 day break. Then I get to have 4 exams in 3 days. Whoopee. As a result, I likely won't do much work on my game.
Previous Entry We're back!
Next Entry Direct3D10
0 likes 2 comments

Comments

Jesse Chounard
The particles look nice. After letting it run awhile, they seem to disappear, though I have no idea why.
December 11, 2005 07:46 PM
Cypher19
That's just a lifetime stat I had on them (left over from when I was just spewing particles in the post below). If they've existed for a certain amount of time they just go *poof*.
December 11, 2005 08:56 PM
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Profile
Author
Advertisement
Advertisement