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 Discussion / Speed: multiple objects Vs multiple limbs

Author
Message
Kelebrindae
21
Years of Service
User Offline
Joined: 15th Sep 2003
Location: Where cheeses are scarier than dragons.
Posted: 14th Apr 2004 19:35
Looking at the Tank demo code, I've noticed that the trees are created as multiple limbs of a single object, and not as multiple objects.
There must be a good reason for that, since Lee Bamber is the author of this demo; I believe he knows what he's doing...

So ? Drawing a big object with 100 limbs is faster than drawing 100 objects ?

Ideas: memories of things which did not occur yet...
muscles
21
Years of Service
User Offline
Joined: 12th Apr 2004
Location:
Posted: 14th Apr 2004 21:21
not necessarily. it probably just saves on load time.
(try loading and positioning one hundred trees. then try loading and positioning a single, large, high-poly object. see which one takes longer...)
Kelebrindae
21
Years of Service
User Offline
Joined: 15th Sep 2003
Location: Where cheeses are scarier than dragons.
Posted: 15th Apr 2004 12:54
Yes, but creating and saving one big object made of all the trees of the level is not very "dynamic"...

Supposing that the trees are all identical (that's the case in the Tank demo), it's probably a better choice to load one mesh (i.e. one tree) and duplicate it to create multiple objects or mutliple limbs. This way, you can change the position of each trees at runtime (to put them on a randomized matrix, for example).

So, the loading time is the same if you use multiple limbs or multiple objects (you only load one mesh).
This makes me think there must be another reason why Lee Bamber used multiple limbs rather than multiple objects.

Anyone's got another explanation ? Or a benchmark, perhaps ?

Ideas: memories of things which did not occur yet...
BatVink
Moderator
22
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 16th Apr 2004 02:55
Maybe he was asking himself the same questions as you, and started playing?

BatVink
http://facepaint.me.uk/catalog/default.php
AMD 3000+ Barton, 512K Ram, 120 Gig Drive space, GeForce 5200 FX 128 Mb, Asus A7N8X Mobo.

Login to post a reply

Server time is: 2025-05-23 16:33:50
Your offset time is: 2025-05-23 16:33:50