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.

Dark GDK / is ObjectExist Slow?

Author
Message
MirrorLink
15
Years of Service
User Offline
Joined: 25th Jun 2009
Location:
Posted: 26th Jun 2009 02:05
Hey guys,

I just want to know the functions "exist" (like dbObjectExist) execution worst-case time.

'cause i would use a variable to store the interval of object currently being used and delete only these objects but i found no need for this variable since i got the exist function, so i would just delete by intervals everytime i load a specific entity in the game.

i would do something like

enum objectScopes
{
globalBegin = 0,
mainCharacter = globalBegin
gloabalMiscellaneousBegin,
globalMiscellaneousEnd = 9,
globalEnd = miscellaneousEnd,
sceneStart = 10
sceneMapChangeSpheresBegin = sceneVariablesStart,
sceneMapChangeSpheresEnd = 14,
sceneModelBegin = 15,
sceneModelEnd = 49,
sceneEnd
}

And for exemple, when deleting a whole scene, delete from it's start to it's end even if some of the reserved id's i gave were not used.
But this would be slower than keeping a variable in the current scene telling me the offset of the objects used in the scene.

I speak broken english so i truly don't know if i made myself clear, but that's it XD

thanks a bunch!
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 27th Jun 2009 00:39
The function itself is very quick, but you will be carrying out a lot of checks that are unnecessary.

That's not really too much of a problem when you are at the end of the scene and deleting the objects, but try to avoid doing that when in the middle of your game loop.

Login to post a reply

Server time is: 2024-10-01 05:55:03
Your offset time is: 2024-10-01 05:55:03