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 Professional Discussion / maximum number of objects

Author
Message
nruser
18
Years of Service
User Offline
Joined: 22nd Dec 2007
Location: Serbia
Posted: 2nd Nov 2011 16:24
in dbp help there is no specification waht is maximum number of objects that can be loaded with load object command, but in matrix1utils maximum is 262144 is this the dbp limit or i can load more than matrix1 allows?
Mobiius
Valued Member
23
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 2nd Nov 2011 16:31
You can keep loading them until you run out of memory. There is no fixed limit in DBP for this very reason.

My signature is NOT a moderator plaything! Stop changing it!
IanM
Retired Moderator
23
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 2nd Nov 2011 19:20
@nruser,
I picked that number because it's a reasonable maximum, although way too high for most people.

DBPro has a limit of 22,000,000 objects.

Your system limits, however, are substantially lower.

If you can get a game to run with over 260,000 objects, then good luck to you.

Rudolpho
20
Years of Service
User Offline
Joined: 28th Dec 2005
Location: Sweden
Posted: 5th Nov 2011 12:52 Edited at: 5th Nov 2011 12:53
Hmm... not that I've tried but wouldn't a large terrain (let's say 2x2 in-game kilometers) with a lot of ground clutter and other vegetation be quite likely to approach 260 000 objects?
You may hide / exclude them, thus not showing them all at once of course, but couldn't it be reasonable to be able to have them in memory still?


"Why do programmers get Halloween and Christmas mixed up?"
IanM
Retired Moderator
23
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 5th Nov 2011 14:18
Why would you do it that way?

Even with something as simple as randomly created cubes the load time is increased, and rendering time is increased. At those numbers, excluding objects dynamically starts to have an impact on your game performance, and so do the visibility checks themselves. If your objects have any complexity at all, they will not only put pressure on your system memory, but also on your graphics memory and at some point will force your graphics card to retrieve object vertex and texture data from system memory during rendering, again slowing the rendering further.

One way to deal with your scenario is to link your ground clutter to blocks of terrain, and link their visibility to that of the terrain. When that terrain is visible, you create your ground clutter using instancing. When it isn't, you delete the ground clutter objects, or reuse them for another terrain block that has come into view.

Using basic simple techniques like that and others, you simply don't need large numbers of objects.

Mobiius
Valued Member
23
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 5th Nov 2011 15:19
My game engines only provide the user with 65500 objects, of which I have never exceeded.

260,000 is more than enough.

My signature is NOT a moderator plaything! Stop changing it!
Rudolpho
20
Years of Service
User Offline
Joined: 28th Dec 2005
Location: Sweden
Posted: 5th Nov 2011 18:09
Ah, didn't think of instancing in that context. Sounds smart enough


"Why do programmers get Halloween and Christmas mixed up?"
Benjamin
23
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 5th Nov 2011 18:18
Quote: "Hmm... not that I've tried but wouldn't a large terrain (let's say 2x2 in-game kilometers) with a lot of ground clutter and other vegetation be quite likely to approach 260 000 objects?"


I don't think there's any game that has such a large area loaded into memory at one time.



Support a charitable indie game project!

Login to post a reply

Server time is: 2026-07-10 23:13:10
Your offset time is: 2026-07-10 23:13:10