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 / Gradual Loading of Objects

Author
Message
Chris K
21
Years of Service
User Offline
Joined: 7th Oct 2003
Location: Lake Hylia
Posted: 26th Oct 2003 11:38
I've made a game for the alienware competition but it's got a bug I really need to fix: In the game I need to load the alien model, texture it, start it animating etc mid-gameplay. I'm coding in DB 1.13 so I don't think I can use clone object, or instance object commands. The only thing I can think of is whether there is anyway of loading the object slowly over a few seconds, maybe. This would stop the jolt that it is getting now. Download the game here to see what I'm talking about :- http://www.geocities.com/alienware_competition

Any help would be very greatly received.

...and like that; he's gone...
Hell IVIonkey
22
Years of Service
User Offline
Joined: 1st Apr 2003
Location: Outer Limits
Posted: 27th Oct 2003 02:23
I didn't play the game, but why don't you just load all the objects you'll need in the game and then hide the ones you won't be seeing until they're "created."

If you need to dynamically load up an undetermined number of models, load about 50 of them and use an array to keep track of them all. In the array, store the model on/off, positions, AI states, and other character-specific variables. When you load your aliens, hide the ones that aren't turned on initially by the array. When one is destroyed, hide it and alter the array. When one needs to be created, linearly search for open spots in the array to set the variables for an alien, then show him.

Chris K
21
Years of Service
User Offline
Joined: 7th Oct 2003
Location: Lake Hylia
Posted: 27th Oct 2003 14:18
Thanks, at the moment I'm not reusing defeated enemies, just loading new ones, that will probably speed up the code a load.

...and like that; he's gone...

Login to post a reply

Server time is: 2025-05-21 11:52:22
Your offset time is: 2025-05-21 11:52:22