• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

Performance regarding rooms

B

Bernard Polman

Guest
If I create 100 or even 1000 rooms and the game picks only 5 in one playthrough, will that have any negative effect on game performance? Is there a limit on how many rooms I can create with room editor?
 
A

Aura

Guest
If I create 100 or even 1000 rooms and the game picks only 5 in one playthrough, will that have any negative effect on game performance?
Game performance depends on how complex operations you are performing in the current room. You'd want to limit the number of instances too. Plus there're dynamic resources and data structures (and other things) that take up memory, so you'd want to destroy them when you don't need them anymore or you'll get a memory leak that'd slow down and eventually crash your game. Number of rooms shouldn't affect the performance. ^^

Is there a limit on how many rooms I can create with room editor?
No.
 

Jobo

Member
GMC Elder
Only one room is loaded at a time, so the number of rooms in your game will not affect performance - only package size. However, and this touches the same waters Aura dipped into, you will want to organize your texture groups according to your rooms and shared resources. Just because you don't use room 2 doesn't mean you won't load textures used in it; if they're on the same texture page. To keep memory usage low, have a texture group for shared textures that are present in largely every room and separate groups with room-specific textures (e.g. backgrounds or boss graphics). You can then flush your textures (draw_texture_flush I believe) when you change rooms -- NB: this may cause a delay as all the shared resources have to be re-loaded. A function to unload specific texture groups would be nice.
 
Top