[ask] how to make 3D explosion

Previous topic - Next topic

genbasic

i want to make 3D game with glbasic, but i dont know how to make cool 3D explosion or even 3D particle in glbasic.
any one can help me? ( + sample code will be help alot  :nw: )

( sry for my english )

Kitty Hello

Hemlos has a particle engine somewhere on the forums. If you don't know about that, first try to focus on the main game before you implement the killer features.

matchy

A simple way is to create or import a 3D star object (still or animated) and animated a fire-like texture, with rotation and scaling it up and down...ka-boom!!  :good:

genbasic

tq for reply.

Quote from: Kitty Hello on 2010-Nov-10
Hemlos has a particle engine somewhere on the forums. If you don't know about that, first try to focus on the main game before you implement the killer features.

i see.. but to much slow i running the sample code from that engine. maybe i must try some else or not using particle for 3D explosion ( using 3D particle too much kill CPU resource ).
but thx for help..    =D

Quote from: matchy on 2010-Nov-10
A simple way is to create or import a 3D star object (still or animated) and animated a fire-like texture, with rotation and scaling it up and down...ka-boom!!  :good:

sound nice, ok i will try it..  :good:

Hemlos

The only thing is, i dont think i published the 3d version.

One thing you must keep in mind about particles.....use as few as possible.
My samples are purposefully over-built with way too many particles for anything practical, not to mention its 2d.
They just show off the fact that a thousand objects can move around on thier own paths.
I recommend (depending on size) to use 12-128 particles for brief explosions.
You can use 12 for the fire particles, 12 for the smoke, keep the particle lifetime short too...1 second.

Heres a faster solution, although it "looks" more rigid, it will run faster than a particle engine.
Make a 3d bezier rotation around a point, 360 degrees for each frame, this is the template path, so rotate it 12 time or so, to make it seem circular.
Move small billboards along the template bezier coordinates, randomly timing the spawning will look best. Spawn them all within a second, and about 100ms apart(roughly).

Bing ChatGpt is pretty smart :O