Advertisement

Firework program - Help

Started by April 10, 2008 09:46 PM
6 comments, last by openX 16 years, 7 months ago
Hi, everybody. I am having trouble with using OpenGL particle system to write a firework program. Can you help me ?
Hey, did you look at this? http://nehe.gamedev.net/data/lessons/lesson.asp?lesson=19

If you're somewhat more familiar with OpenGL then you might look into point sprites..

If these both hints do not help you, perhaps just specify your problem some more, we wont just start coding a fireworks demo and send it to you [wink]
Advertisement
I also learned much from lesson 19 and I also built my FireWorks' explosion successfully. But i want to use a point at the ground to shoot it in the night sky and then explosion. Please help me quickly and tell me about timer in C++ in this program. Thank you very much. ( i have to complete this program next monday => help me )

[Edited by - openX on April 12, 2008 1:10:59 AM]
Kazade has posted a Cross-platform timer here: http://www.gamedev.net/community/forums/mod/journal/journal.asp?jn=351511&reply_id=3097340

So you want to shoot a rocket up to the sky and let it explode there?

Then you might use the kind of particle system from lesson 19, move the center of it along the path you want your rocket to fly, then disable this particle system and start a new one showing the explosion, and make the particle spring be at the position where your rocket flew to.
thank Caste, i will try again.
Hey, to get the arc for the launch of the rocket, you might want to try quadratics, freshmen algebra. Find the axis of simetry (x=-b/2a) and then plug it into a quadatic formula (Forgot the exact form for a object thrown up) I think it is h=-4.9^2 + 32T + Original Height. Try a google for quadratic projectiles. Then move the firework along this parabola, and have the emitter at the vertex (Peak)
Hope this helps
Advertisement
Personally i prefer using simple physics instead of a precomputed arc, it provides for a much more realistic motion.
Can someone create for me some types of nice firework. I have made attempts and i have some but i need more. Thanks !

This topic is closed to new replies.

Advertisement