Game Development Community

reducing the size of the explosion

by Srivathsa · in Technical Issues · 06/20/2009 (2:49 pm) · 1 replies

i'v managed to increase the rate of fire of the weapon.. now the problem is, when i fire a lot of bolts, it creates lot of explosions, and my game becomes very slow. So, is there a way i can reduce the size of the explosion or do anything to keep my game from lagging??

B.T.W, if i want the explosion to look like something else, which image should i change?? pls reply..

#1
06/21/2009 (8:40 am)
Explosions are made up of lot's of particles, usually several emitters at once being normal. The stock crossbow explosion for example, has a fire emitter, a smoke emitter, and a spark emitter. It also throws out debris which in turn has a couple of emitters, one for the trail and one for the debris explosion. It also has two sub-explosions and makes use of dynamic lights. You would have to disable some of the emitters and/or change the emitter ejection rate/density if it's proving to be too much. Start by disabling the sub-explosions since both of those are made up of two emitters apiece. You'll have to explore the explosion datablock to see how all of these pieces are put together.

If you want your explosion to look like something else I would suggest examining each component effect of the explosion. View and modify each emitter/particle of the explosion in the particle editor. It may take some practice before you learn what the different settings do -- but it's well worth it when you have a "library" of self-created particle effects to call upon. The actual particle image used in the effect itself is set by the "textureName" field in the particle datablock. You can change that texture to any other that you wish. The default particles are located in "~/data/shapes/particles".