CodeBase - Easy to Use 3D Explosion Generator
Return to the CodeBase listing
Category: 3D Effects
Version: 1.0
Information
Uploaded: 6th Jan 2007 17:23
Modified: 9th Feb 2007 14:11
Author: Trek
Summary
Function-based code allowing easy explosion generation and animation in your games.
Full Description
In preperation for the current production I'm working on, I decided to make several functions which would allow me to make an explosion with a custom position, size, angle, animation, and animation speed with a single function call and then allow me to animate all my explosions with another single function call. <br /> <br /> I also didn't want to be bothered with deleting my explosions when they were done or making sure I didn't have problems with their object numbers interfering with my other object numbers. This code, accomplishes all those objectives in a very easy to use and efficient way.<br /> <br /> First you simply setup the generator with a function call specifying what range of object numbers you want to be allocated for the explosion objects. Then, you simply put a single function call in your main loop to update the explosions. Now, whenever you want to trigger an explosion, you simply call a TriggerExplosion() function and pass it the specifics of the explosion you want to occur.<br /> <br /> The code is also highly commented for easy use and future customization. No credit is required if you use this code but is definitely appreciated.<br /> <br /> You must download the attached image file and include it in the same directory as the code in order for the example to run but not if you would simply like to include the functions in your own program.<br /> <br /> If you're interested in some of my company's productions check out www.TrekSoftware.org<br /> <br /> Also, if you have any questions about this code snippet, you can sign up on the Trek Software forum linked to on my website and ask your questions there.
Comments
No comments yet.