Firework program - Help
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]
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]
Member of the NeHe team | PhD Student at Heidelberg Collaboratory for Image Processing | ProCamera Developer
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]
[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.
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.
Member of the NeHe team | PhD Student at Heidelberg Collaboratory for Image Processing | ProCamera Developer
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
Hope this helps
Personally i prefer using simple physics instead of a precomputed arc, it provides for a much more realistic motion.
www.flashbang.se | www.thegeekstate.com | nehe.gamedev.net | glAux fix for lesson 6 | [twitter]thegeekstate[/twitter]
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement