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 / Managing object numbers

Author
Message
mr Handy
17
Years of Service
User Offline
Joined: 7th Sep 2007
Location: out of TGC
Posted: 10th Feb 2013 15:59
Hi. I have a quick question. I often saw "find free object" function. Is it nesessary? I mean is it not good if my objects will be 1,100,100,1231,2354345,etc instead of 1,2,3,4,5,etc? Is it affect perfomance?

*** Merry Chuckmas! ***
Ortu
DBPro Master
17
Years of Service
User Offline
Joined: 21st Nov 2007
Location: Austin, TX
Posted: 10th Feb 2013 20:32
its useful when loading and deleting objects dynamically, any time it doesnt matter what specific number an oject is assigned to. i have never noticed it to impact performance

29 games
19
Years of Service
User Offline
Joined: 23rd Nov 2005
Location: not entirely sure
Posted: 10th Feb 2013 22:13
In addition to Orto's post, using a "find free object" function (or simillar) allows for easier object management when loading levels for a game, which is especially handy when hundreds or even just dozens of objects are being used. It makes saving the level data easier as object numbers are automatically assigned as they are loaded in.



The demo is a driving game (one of my 20 line challenges) and instead of using a "find free object" function I just simply increment the object number "ob" and then assign this to the objects as they are created. This means that I don't have to store any information about how many objects are in the level.

I've noticed that most people use some kind of "find free object" function. Some people write their own but I believe there is one that comes with IanM's utility pluggins. Which ever way you do it, it simply makes handling large numbers of objects easier.

one of these days I'll come up with a better signature
Ortu
DBPro Master
17
Years of Service
User Offline
Joined: 21st Nov 2007
Location: Austin, TX
Posted: 10th Feb 2013 22:32
aye, as far as performance, i was refering to ianMs matrix1 version

29 games
19
Years of Service
User Offline
Joined: 23rd Nov 2005
Location: not entirely sure
Posted: 10th Feb 2013 22:58
Yes, I remember someone mentioning that IanM's matrix1 pluggin is the fastest way of doing the "find free object" method.

one of these days I'll come up with a better signature
Ortu
DBPro Master
17
Years of Service
User Offline
Joined: 21st Nov 2007
Location: Austin, TX
Posted: 10th Feb 2013 23:35 Edited at: 10th Feb 2013 23:35
it also has find free image, sound, memblock, file and so on, really complete

mr Handy
17
Years of Service
User Offline
Joined: 7th Sep 2007
Location: out of TGC
Posted: 11th Feb 2013 10:45
Thanks! So it does affect perfomance (i mean plugin). Good.

*** Merry Chuckmas! ***

Login to post a reply

Server time is: 2024-11-23 18:12:58
Your offset time is: 2024-11-23 18:12:58