Hi, I’m working on a platform game which will be playable on mobile and pc. I’ve added the game mechanics and now it’s time to make levels. I’ve some questions to who made big projects. I’m making a platform with huge levels, is it good to use tilemaps made with “Tiled Program” or by use the gdevelop editor to add tiles?
Plus, do I should make different scenes for levels or an external layout which can be used in each one (but I don’t know how to change it for each level)?
Tile maps should be more performant, but what is the most practical for you is probably the best.
If you are making more than one level than you should definitely use external layouts, especially if the code is the same for every level. Check the wiki and the video on the page:
https://wiki.gdevelop.io/gdevelop5/interface/scene-editor/external-layouts
I second OongusBoongus, and also consider external event sheets as well for multi level if you have a lot of repeating setups (ie player movement, basic scene setups, etc)
Hello GoodReason,
If I’m not mistaken tilemaps are not compatible with lighting layers. If you are going to use tilemaps for otmization, will be good you read about it in the wiki.
Using just one scene you will have all the code running all the time. Several scenes, even if they repeat a large part of the code, you can link only the external events that interest you. But if it is more practical to have only one scene you can use some variables to “disable” external events or part of your events as an optimization mode. This is how I do it in my game.
When the player pass to another level I destroy all objects, call the external layouts to make the new level and change the variables about the enemies to disable some of them and active another ones.
Here, I have a Group called “Caverna” (is the first level) and all the subevents are children of the event that is checking the variable Gerador.Etapa. So, if this variable do not correspond my game will not read all the subevents (and there is a lot of them).
I believe that taking these precautions there will be no optimization problems using only one scene. (I’m just basing it on my experience with my only game)
Hi guys, sorry but I had problems with my connection these days. So External layouts are better for game performance, as I can see. About external events I’m using them already. And thank you veru much asterisko, you’re idea is pretty good for game performance. I’ll have to change the level selection system, as I’m using multiple scenes.
I think using multiple scenes is probably better for optimization and, maybe, organization. But it depends how your game works. I use a single scene for the levels because they are built randomly from chunks of external layouts. I started having optimization problems until I found someone here on the forum giving tips about optimization like I commented before (using variables to “disable part of the code”). This made a huge difference for me.
But think carefully about the choice. It seems to me that it’s not just about the optimization, but about the whole construction of your game.
So, do you suggest me to use one scene to each level? Even if the game has 50+ levels?
If you don’t use 50 scenes, you’re going to use 50 external layouts, right? So what would be the difference?
I understand as best performance the game that FPS remains high and doesn’t freeze or slow down. The number of scenes/external layout certainly has nothing to do with it, but the way they work (events, size of the images on the screen, etc). Maybe the wiki can help you about it: How to debug poor game performance [GDevelop wiki]
And I’m sorry, but I can’t choose this for you because, as I said before, it depends on how your game works and how you prefer to build it. But if that reassures you, I believe that in both choices you can be successful with great performance.
Oh thank you very much. I’ll use different scenes then!