How big can a level be ?

(dtrip) #1


I am making a game with the warrior walking from left to right killing enemies in swordfights one by one.
The enemies and projectiles and power ups are spawned of course.

It would be convenient for me if the level itself (floor, walls, backgrounds (no collisions, no physics)) was not spawned.
I plan to add a lot of simple decorative stuff (e.g. skeletons in the corner, chains, torches, statues, chandeliers)
just to spice things up (and also it is great fun to do this! :slight_smile: )

So there will be a significant amount of geometry outside the viewport. Does this deteriorate performance a lot ?

Will I have to spawn decorations like chandeliers, statues and other objects that require more faces ? Or can I just leave them there ?

Thanks for any insight!

(MichelleSea) #2

It depends on how many objects encompass “a lot”, among other things (like your poly counts and lighting setup).

Why not set up a procedural chunk-load system? Say you split your level into screen-long “chunks”. At any time, the only chunks that would exist are the currently occupied one, the one behind, and the one ahead. You could add chunks as the player gets near to them, and delete any that are too far away. Now you have a lot fewer objects in existence at any given time.

(Daedalus_MDW) #3

most modern hardware can easily handle millions of verts. yes, even intel can pack a punch in this.

BUT, its advanced shaders that will hurt the most. the easiest way to speed up shaders is setting specular to black or intensity 0. unchecking shaders in the render settings has a similar effect.

collision is another thing to be careful of.

dimensionally, you shouldnt exceed 10,000 bl units. precision starts to get a bit glitchy.

in the end, python is the slowest, so keep your logic optimized.

(BluePrintRandom) #4

almost infinite but that comes with some caveats

floating point math gets really odd the larger the value

so basically have the actor sit still and move the world,

(Nick Manchul) #5

The load on the video card comes from the render of the window - everything outside the window (outside the camera) does not load the graphics card.
Levels can be hypothetically infinity (as BGE allows), if you use LibLoad, and objects that are very far can be removed from the scene … one object can be loaded once, and then duplicated across the entire scene.

( #6

I did exactly this. I was also curious to maximum size both a Render and BGE scene can be. These are my findings:

(1) Render world for rendering an animation. I’ve gone up to 2000 x 2000 km squared. You can go up to a little more than 3000 x 3000 km sq, but I like to keep it at 2000 x 2000.

(2) BGE scene size. It depends on many optimization tricks and techniques. If you keep you scene simple (ie small vertex count, small texture sizes, small object count) and using tricks like hiding far away objects, etc, you can get quite huge.

I can’t give exact figures now, because I too am testing limits of BGE. But as said by Daedalus_MDW large scenes become “glitchy”. Gut feeling is you can easily have 100 x 100 km sq scenes, if you optimize everything.

(dtrip) #7

Wow, thanks guys!

Great insight about the floating point, I would had never thought of that. Sure if his coordinates are millions of meters
and you want accuracy of millimeters between them, you are starting to run out of available digits in the number to accomodate
the whole range of the number. Luckily my scene is a corridor 100 m long and accuracy of moving the weapons is of the order
ot a cm or an inch, so I don’t think I will have a problem there.

Generally my scene environment has about 20.000 verts, of which about 2-3.000 are visible at any time. Many of those
objects have been cloned with Alt+D which makes an instance of the same, instead of Shift + D whicih makes a full copy.
Also in the scene I have two warriors of 8.000 verts each, of which less than half is visible (because they wear armor and
because their “other side” is not visible anyway).

So worst case for me is to have say 40.000 verts in the scene of which 15.000 in camera of which 10.000 visible. Max distance
of anything from the camera is 11 meters. (it is a side scrolling 2.5D game)

The game currently runs smoothly on an ancient laptop I bought in 2012. I develop the game on this old laptop on purpose,
so that performance issues are readily visible.

Thanks, great insight on everything!

(Daedalus_MDW) #8

this isnt totally true, lights are forward rendered, so they all get processed. objects not centered on the origin might not get culled as expected.

(Fred/K.S) #9

How big can a level be ?

As big as you can believe it can be !!!

You’re the maker isnt it? So you must do what you feel is right offcourse ! ; )


(Fred/K.S) #10
  • The BIGGER the Harder
  • The smaller the easier !!!

And so it goes both ways, here you have 2 options to do the “actual” or to Fake the impossible !
So which one is it going to be?

My explanation

  • if you want a massive level you’ll either have to fake it and use clever techniques or methods… (To give it that huge sense of feeling)

  • if you want a more controlled environment you can do the actual scale of it using systems or strategically seting up that level in a particular way!!! (Controlled environments handle really well if done properly in BGE)


(JustinBarrett) #11

Myrlea is 20km across.