Handling different themes (performance)

Hi, we are developing our gameplay now. We have all the designs and assets ready. The main question is how do we go about handling different themes. for eg. in our 2d platformer game, we have 5 different themes, trees, mountains etc. Each themes is using different assets and different designs, how do we handle that?

e.g use different scenes for different themes? or how? any help will be highly appreciated. Thankyou.

Performance can mean a lot of different things, and the answer for how you should handle this depends on what your concerns are. For example, you could do different additive scenes for each theme. This would reduce memory footprint and reduce the amount of time it takes to launch the game. But compared to just loading everything when the game launches, it will take additional time to load each level when they use different themes.

If you load all the assets when the game launches, it will take longer to initially load, but players are more tolerant of that, and loading individual levels will be faster because all your themes are already in memory. Loading everything up front will increase your memory footprint, but it depends on your target platform/devices and really how much memory your themes take up as to whether than is a problem or not.

So just in those two examples, neither is objectively better performing overall, but each is better performing in different areas. I’d take a guess at what you think your performance concerns will be, implement a system which addresses them, and then reimplement if you end up needing better performance in other areas. But don’t go crazy trying to address theoretical performance issues you haven’t even seen yet. Often you spend weeks or months addressing a problem that doesn’t or never will exist.

2 Likes

Themed levels is easier to make by using different scenes since it is easier to design a themed level per scene rather than one huge game area with all themes. Especially when using sprite atlases where one atlas contains all elements of one theme.

2 Likes

Thankyou guys for replying. Really means alot.

so in our game the gameplay stays the same, whats changing is the backgrounds and sprites and we are using parallax scrolling on each theme.
there are a total of 5 themes, I was really interested in how other devs do it? like do they make different scenes for each themes or how? If for e.g we make only one scene for the gameplay and if the other 4 themes are not in the camera view and are disabled would that still effect the performance of the game?
Im just getting started on creating long backgrounds for infinite platformer(2d) so my knowledge is very limited.

could you guys point me to the right article or tutorial or something? like i was reading and i read about using quads and stuff for platformer.