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 / delete limb issue

Author
Message
smerf
19
Years of Service
User Offline
Joined: 24th Feb 2005
Location: nm usa
Posted: 8th Aug 2017 06:41
im trying to delete some limb from my object and when i run a loop in only deletes every other object. However by adding a second loop I seem to be able to eliminate more limbs but not all. Any help is appreciated thank you.
A child's dream never dies.





Scorpyo
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location: italy
Posted: 8th Aug 2017 07:45
Are you trying to delete several lava limbs on one object or to delete the lava limb on many objects?
revenant chaos
Valued Member
17
Years of Service
User Offline
Joined: 21st Mar 2007
Location: Robbinsdale, MN
Posted: 8th Aug 2017 12:14 Edited at: 8th Aug 2017 12:17
Looks like the problem is that when limbs are deleted the following indices are shifted back by 1 to fill the spot. Try looping backwards through the limbs:
chafari
Valued Member
17
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 8th Aug 2017 14:11
Hi there.
Revenant chaos is right...when we remove a limb all limbs will change limb order.

Try this.

I'm not a grumpy grandpa
LBFN
17
Years of Service
User Offline
Joined: 7th Apr 2007
Location: USA
Posted: 8th Aug 2017 14:24
smerf,

Wow, you have 600 limbs on an object? I can't say I've ever had even close to that. Is this a level or something? Just curious.



So many games to code.....so little time.
smerf
19
Years of Service
User Offline
Joined: 24th Feb 2005
Location: nm usa
Posted: 8th Aug 2017 17:25
Thanks guys, Wasnt expecting a a quick reply with a simple solution yet alone 4. Makes since though since limbs have to always be in order. Yes lbfn I am making an map generator that makes a 3d model from from a color map. Saves a map as a mesh, looks a bit like minecraft but its mere coincidence. 1024 limbs with animated texture runs over 1k fps atm pretty impressed with dbpro. Wanted a quick n easy way to generate rough models for a game and for the guys to all be able to use the same simple system nothing beets the speed.
A child's dream never dies.





Attachments

Login to view attachments
Scorpyo
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location: italy
Posted: 8th Aug 2017 18:25 Edited at: 8th Aug 2017 18:32
I would go like this:
Check how many limbs of the required kind are there
Store that number
Use that number to cycle through the object limbs as many times as needed to delete them



Of course if you need to delete thousands of limbs from the same object the process might become lenghty
smerf
19
Years of Service
User Offline
Joined: 24th Feb 2005
Location: nm usa
Posted: 8th Aug 2017 20:39
yeah once the model is loaded for the first time all objects of same type will be pulled from the original and a new object with limbs will be made for each type so all i have to do is draw a map and ut will generate and seperate my model into groups for each small map so theres easy control. i wouldnt ever scan limbs during gameplay.
A child's dream never dies.





Mage
17
Years of Service
User Offline
Joined: 3rd Feb 2007
Location: Canada
Posted: 10th Aug 2017 17:40
Quote: "yeah once the model is loaded for the first time all objects of same type will be pulled from the original ..."

This is something I can appreciate. Managing assets and optimizing.

Login to post a reply

Server time is: 2024-04-16 23:12:52
Your offset time is: 2024-04-16 23:12:52