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.

Newcomers DBPro Corner / clone object

Author
Message
Chief Voyager
21
Years of Service
User Offline
Joined: 20th Mar 2003
Location: United States
Posted: 14th Apr 2003 02:34
something that looked cool to me that i noticed wasn't in classic is clone object. i know that it copies an object into memory, but what are the main advantages of it. seems to me like it would decrease load time since it is using something that is already loaded. but does it help performance elsewhere? (fps, perhaps?) i don't understand this stuff too much, that's why i'm asking. thanx.
You're ate up like a soup sandwich.
Dr DooMer
21
Years of Service
User Offline
Joined: 22nd Dec 2002
Location: United Kingdom
Posted: 14th Apr 2003 02:59 Edited at: 14th Apr 2003 02:59
Clone object makes an 'identical' duplicate of another object. Say that you want to make 100 identical objects: you could load each object seperately - the problem with this is that DB will physically load the object off the harddrive 100 times, so takes 100 times longer than making a single object.

You could also do this by loading the first object as a mesh, loading the image seperately and then using the make object command to construct 100 objects from the mesh and image stored in memory. Fine, and fast, but won't retain limb or animation data.

Clone object gets past the mentioned problems of the other two methods. You would load the first object as normal and then execute the clone object command on it 99 times. There you go: 100 identical objects with preserved limbs and animations, in only a little bit longer than it takes to load one object!

Of course, the other use is to hide the main object until you need it later. Let's say that half-way through the level, you'll meet a machine that creates an infinite supply of enemies. Rather than create loads of enemies at the start of the level, you'd load one and then hide it. That way, when the machine is found, you can keep cloning from this hidden enemy as often as you need. Also, since you loaded this 'reference' enemy at the start, there won't be the usual loading delay each time an enemy is made by the machine!

"I am a living, thinking entity who was created in the sea of information."

Login to post a reply

Server time is: 2024-09-20 06:26:49
Your offset time is: 2024-09-20 06:26:49