L
lord_berto
Guest
Titled says it. of coarse u can check if an object is in view,
and you can even loop through all Ur objects or tiles. But things become problematic when you start increasing
your room size. it'll be loooots of checking if ur room is 10,000x10,000.
well i figured out how to check for only the important area (the player's surrounding area) and now rooms are not only fast in 10,000 , or 20,000 or 40,000 pixels big. I made a room that is of 180,000 pixels big, filled it with textures and tree objects and runs on average 1700fps, with a high of 5000~fps Just as if my room was to be only 1024x768 pixels big.
Its a cool system i made and you decorate your level just like you would, meaning u place everything (except the background, which you should draw yourself) and tada!
this would mostly be useful for open world games.
here are some tips if you consider coding this yourself.
-Never use the default background settings, draw the background in repeating tiles using a for loop, but only in the player's surround area,
-dont use a constant for-loop to check if an object or tile is in view in the step event, check it only ONCE every few screen_widths that your player progresses
- Disable background color in the room settings
And for those of you wondering I tested this on a top down shooter that i am working on for mobile.
good luck!
and you can even loop through all Ur objects or tiles. But things become problematic when you start increasing
your room size. it'll be loooots of checking if ur room is 10,000x10,000.
well i figured out how to check for only the important area (the player's surrounding area) and now rooms are not only fast in 10,000 , or 20,000 or 40,000 pixels big. I made a room that is of 180,000 pixels big, filled it with textures and tree objects and runs on average 1700fps, with a high of 5000~fps Just as if my room was to be only 1024x768 pixels big.
Its a cool system i made and you decorate your level just like you would, meaning u place everything (except the background, which you should draw yourself) and tada!
this would mostly be useful for open world games.
here are some tips if you consider coding this yourself.
-Never use the default background settings, draw the background in repeating tiles using a for loop, but only in the player's surround area,
-dont use a constant for-loop to check if an object or tile is in view in the step event, check it only ONCE every few screen_widths that your player progresses
- Disable background color in the room settings
And for those of you wondering I tested this on a top down shooter that i am working on for mobile.
good luck!