JS Lemming's Particle Engine

Whether you're a newbie or an experienced programmer, any questions, help, or just talk of any language will be welcomed here.

Moderator: Coders of Rage

Post Reply
User avatar
Falco Girgis
Elysian Shadows Team
Elysian Shadows Team
Posts: 10294
Joined: Thu May 20, 2004 2:04 pm
Current Project: Elysian Shadows
Favorite Gaming Platforms: Dreamcast, SNES, NES
Programming Language of Choice: C/++
Location: Studio Vorbis, AL
Contact:

JS Lemming's Particle Engine

Post by Falco Girgis »

So, in the news you talk about making a whole new one that'll allow more particles onscreen at a time.

I don't see any limitations with the one that's already made. What're you going to try to make better? What do plan to do to speed it up?
User avatar
JS Lemming
Game Developer
Game Developer
Posts: 2383
Joined: Fri May 21, 2004 4:09 pm
Location: C:\CON\CON

Post by JS Lemming »

Well, I want a tun of blood spray with no slow downs what soever... AND the particles will probably be images, not colored squares.

Now here are my ideas for speeding up some stuff.

First off, allocating memory everytime a particle is generated just seems stupid. I'll just use a set array of about 1500 (maybe more) cells to store the pointers to the particles. I'll need to keep track of which cells are in use though.

Here is the big speed up in my opinion. Why should I update all the blood every frame? If I only update part of the array each frame, I could simply calculate where all the other particles should be after a certain amount of time. And I bet the human eye wouldn't even see a difference.

That's what I have so far.
Small girl at the harbor wrote:Look Brandon, that crab's got ham!
User avatar
Falco Girgis
Elysian Shadows Team
Elysian Shadows Team
Posts: 10294
Joined: Thu May 20, 2004 2:04 pm
Current Project: Elysian Shadows
Favorite Gaming Platforms: Dreamcast, SNES, NES
Programming Language of Choice: C/++
Location: Studio Vorbis, AL
Contact:

Post by Falco Girgis »

I'm just the type of person who would rather use a linked list than allocate this big ass array that isn't ever guaranteed to be completely used and isn't guaranteed to be enough.

What happens if you have like multiple things bleeding assloads?

I'll go with the static arrays and stuff for 90% of the things, but I think particles in an engine like this where there is not a set amount of things that could be using it really needs to be dynamic.

That's just me though.

Your idea for speeding it up, I don't know. If you actually can't visualize a difference, then go for it.

But from the sound of it, you're acting like the engine we currently have is slow. It isn't. I could pull 3,000+ dynamic particles from the DC without slowdown at all. Maybe images might slow it down a bit, but I wouldn't know how much.

I'd just have to see your idea in action. Hell, it could be great. I don't know.
Post Reply