Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / Object Destruction

Author
Message
Ashley Staggs
16
Years of Service
User Offline
Joined: 18th Sep 2009
Location:
Posted: 18th Sep 2010 16:15
Is it possible at all in darkBasic Pro to have an object (in my case a house) and slowly destroy it.

Basically i need to destroy the house when a laser hits it 3 times. Each time the house is hit parts of it fall off.

It this at all doable?

Thanks
Syncaidius
21
Years of Service
User Offline
Joined: 22nd Mar 2005
Location: United Kingdom
Posted: 18th Sep 2010 20:37
Theres several ways you can do it. The easiest is to create the house parts as seperate objects, place them together to form the house then have each part move/fly off as the laser hits it. You could do this with the help of a physics engine or some of your own nifty code.

The second method, although quite advanced (to me anyway), would be to have your own destruction engine that generates and handles parts flying off objects as things hit them.

There are probably hundreds of ways to do it, so to answer your question, yes it is completely possible.

Quel
17
Years of Service
User Offline
Joined: 13th Mar 2009
Location:
Posted: 18th Sep 2010 21:27
Syncaidius told you the hardest (though done in the most professional ways the most awesome) methods, you could also just simply animate the four sides as they blow up / being destroyed some other way, and play the side which is hit...
chafari
Valued Member
20
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 19th Sep 2010 01:43
That can be done as well with a single object, if we prepare the object house in a 3D editor.You can download the example I made for this example. The method works adding several bones to our house in order to scale them to 0,0,0 to make it disappear depending on some condition.In the example below, you destroy the object little by little just pressing numbers from 1 to 8.

I hope it can help somehow.




Cheers.

I'm not a grumpy grandpa

Login to post a reply

Server time is: 2026-07-22 12:41:17
Your offset time is: 2026-07-22 12:41:17