I am making a game with a very big map. I have split the map into 5x15 parts where each part has the same size as the scene (1920x1080). What would be best practice when using such a big map?
I guess it won’t be memory efficient to have all of the parts on the scene at the same time, so I guess I’ll want to create and remove the map parts dynamically, while moving around with the player on the map.
I’ve had a look at tile maps, but that is something else. This is not a fictional map with reoccuring pixel graphic objects. This is a real map of the Baltic Sea, where every part is unique.
in the wiki you can find these two recommendations:
The smaller the images dimensions are the shorter the rendering time gets.
Images bigger than 2000px may not work well especially on mobile devices where they may not load.
For a more in-depth explanation how rendering works, you can also check Silver-Streak’s reply here:
What I get from this information is that it really depends on several factors. Is your game for PC or mobile? What else happens on the screen? Each game is different and you probably have to try different solutions. As long as you are not encountering any problems it can be also a waste of time to optimize something that actually works.
As you wrote, tilemaps are not helpful in your case but you could import the parts of your map as TiledSprite. To prevent tiling you just set the measurements according to the image size. Tiled sprites are just background objects that don’t do anything in the game. (Edit: It doesn’t matter from the rendering perspective whether the background is a sprite or tiled sprite object).
Do you mean the scene or the viewport? I guess the latter otherwise you would not be able to load the parts of the map dynamically.
Thanks for your answer. The game will run on a specific PC (not a high end PC though) at an exhibition, where the player will physically move around on a huge map (painted on the floor) and getting coordinates in realtime using uwb (with the mqtt extension).
I think that I mean the scene (in game properties) and not the viewport, since I haven’t decided the zoom level of the camera. But I will be moving outside the scene.
More specifically I was wondering if there is a good solution for the dynamic creation of the map parts. Like when the player is over/in collision with one part → create the other parts surrounding that part and delete all the others. Or maybe some other way? Maybe I should work strictly with coordinates? Or some other method?
My guess is that there is not the one way to do it. I would probably use coordinates, having colliders is more the visual approach and could be helpful if you are running the game on devices with different resolutions (which you apparently not intend to do).
In a first step I would build the map entriely in the scene and see if that causes any problems. If so, I would start to reduce it down to the point when it runs in an acceptable way and create the other parts of the map dynamically. For the dynamic creation it could be also helpful to have even smaller slices.
With viewport I mean the window or frame that we see in the editor and which changes with the resolution (basically showing what we will be on the screen). I tried to find the Gdevelop-term for this (mask?) and it seems there is sometimes some confusion what the term “scene” is referring to. In the tutorials and also in some forum posts it is implied that scene is the window or frame, but I was under the impression that scene is the entire level or world within a… well…scene. Anyway, after reading your first post again it was quite obvious what you mean.