Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Sure I can give you a bit of insight.

Every room I have is it's own instance, that inherits from a base room class that defines its coordinates, map icon, and other information. I then have a big map scene where I put down all the rooms and then use a tool script to generate an array that contains the position in coordinates (generated from its global position) and the filename. This array I then use in my main game scene to create the world during runtime. How this works is that there is always a starting coordinate. that gets added first. then I create an array called "needed_rooms" which determines all the rooms that are connecting to the current room. Then I check if any of those are already loaded and if not I add them. 

The camera also gets a signal when the room is updated  (the signal contains the coordinates of the room ) and moves accordingly. 

The map works almost the exact same way, except I'm not loading rooms but map icons instead. (The conversion into 0:1, 1:1 coords is what allows me to have square rooms in the overlay map instead of 16:9 ones btw)

In retrospect it would have probably been better to use a custom resource that contains map data to save multiple iterations of the map at the same time.