Game Development Community

Many big explosions and the lack of performance

by Alexander Bierbrauer · in Torque Game Engine · 08/19/2004 (9:27 pm) · 30 replies

Hi there,

I'm on coding a small bomberman clone for learning the torque engine. While working on this, I've run into a performance problem:

When a player drops a bomb, it will explode after X seconds. While exploding the bomb creates X additional explosions in x+,x-,y+,y- (bomberman explosions are exploding like a cross) direction... so... there could be up to 20 explosions for just one bomb.

These kind of explosions are reaching the boundaries of torque ! I should also notice that I'm using the "god view" camera of the advanced camera resource. So, the whole gaming area is always shown.

I'm thinking now about other solutions for creating such explosions. Should I use billboarded sprites or should I switch from Torque 1.2.2 to HEAD (any performance increases??). Anyone has some nice ideas ??


regards, alex
Page«First 1 2 Next»
#21
08/22/2004 (4:08 pm)
Max 5 is fine
#22
08/22/2004 (10:39 pm)
I have the source file somewhere on my hard drive... God only knows where it is. I'll see if I can dig it up.

The GB stuff should work in GOD view mode.. we are adding in all the advanced camera stuff to Beaver Patrol, So I'll check it.

Does the explosion look correct if you are not in god view mode?
#23
08/23/2004 (7:45 am)
Somehow I managed to fall asleep before sending that file over Gonzo.... but it doesn't matter anymore becuase I figured it out. In the "export control" tab of the sequence helper I forgot to select "IFL animation". Now its working just fine.
#24
08/23/2004 (7:53 am)
Sweet. I would still love to see a copy.
#25
08/23/2004 (3:08 pm)
here you go

The animation (series of textures) was a real quick one, that's why its quit ugly ;), but you get the idea. You can actually just replace the images and use the dts file as is, or you can open the max file, see how its done and make your own, same to me, its all yours.
#26
08/23/2004 (10:05 pm)
Hi there again,

@Ward: you were right, the explosion was on the ground.. after increasing the z-value it works ;)

but.... I didn't got the billboarding working right:

www.polyfrag.com/tmp/explosion.jpg
I didn't understand everything what you said above (I'm not native...) but.... like you said: billboards are always facing towards the camera and like you can see in the above screenshot the explosion doesnt' have the correct angle ! I'm still using the Advanced Camera class... but this time in ThirdPerson-Mode (@LaRoche: it isn't working in other modes too. I didn't patch my torque-version with the gb-stuff.. but I'll do it today and try it again).

So... does the DTS shape use billboarding by default or do I have to tell torque (the projectile data or the explosion itself) that it should use billboarding for the DTS ? If yes, how and where ?? 'Didn't find any information in the docs so far....
#27
08/23/2004 (10:09 pm)
Uhh... you can't see the wood 'cause of lots of trees. I just found the faceViewer variable in ExplosionData... setting it to true does the magic.

Thanx a lot people !
#28
08/24/2004 (1:02 am)
Ward

While your explosion is one way of doing it, and it's far better than I can do, it's not exactly what Stefan and I were looking for. Here's a series of shots that explain the difference...


Here are a couple of pics of your billboard explosions impacting a wall...

ubenhacked.kicks-ass.net/torque/exp_pics/pic1.jpgubenhacked.kicks-ass.net/torque/exp_pics/pic2.jpg



Notice how half the explosion disappears in the wall? From a distance and unobstructed, the billboards look fine, but closer up or dealing with another object, the effect needed is more complex. Here is a series of the Tribes2 explosion without it's materials(DTS only, no images)...



ubenhacked.kicks-ass.net/torque/exp_pics/pic3.jpgubenhacked.kicks-ass.net/torque/exp_pics/pic4.jpgubenhacked.kicks-ass.net/torque/exp_pics/pic5.jpg

Notice how the explosion is 3 dimensional? This explosion allows you to do away with the "faceViewer variable" in the explosion which allows for it to look different nearly every time you set one off. And here's the same explosion with the graphics inserted back into the folder...


ubenhacked.kicks-ass.net/torque/exp_pics/pic6.jpg

Notice how the explosion has 3d effect and doesn't get buried in the wall? And most importantly, if you look back at the first few photo's, you'll notice you cannot see the bricks in the building textures behind the explosion, in the last pic you can see them through the explosion. The overall effect is fantastic. If you could figure out how to do that, that would be the bomb.
#29
08/24/2004 (2:52 am)
Oh, but that's quit easy to make too... the idea is probably the same, but instead of using a plane maybe use one half of a sphere, or use multiple billboards and place one in front of the other, and scale em during the animation. All things you can try... the general idea is the same tough. Maybe if I have some time today I can see if i can make you one, but I have a ton of things todo today, so I don't know.
#30
09/18/2004 (3:36 am)
This resource should be able to be modified to suit your needs. If you fix the support for animations, you will find yourself with some cool explosion effects.
Page«First 1 2 Next»