Hi again, everyone.
I find myself with a bit of a problem with my game I am working on. The game has 5 dungeons, with five levels each, which are randomly generated at the beginning of play, and then all map data saved to a single file, since I do not want to fill the player's save directory with 25 different files for each character they create.
This file is then used to read in the specific data of only the floor of the current dungeon they are in. This will also serve as the autosave file, so that when a player returns to the floor from somewhere else, all the level and enemy states remain as they left them on the previous visit.
My problem lies in loading the data relevant only to that floor. Each floor of the dungeon's data starts with a string holding the name of the dungeon and floor. Is there a way to search for, say, "Ruins B1" inside the file and loading only the data from there on out?
I remember back in the day when I still used QB 4.5 with DirectQB that there were commands specifically created for this, but I can't seem to find any equivalent in DBPro.
The other problem to trying to do this manually is that the size of the map data changes dynamically, adding new items, generating creatures etc. Since the file itself stores variables to denote the amount of changes done, the manual method is possible, but I would rather avoid unnecessary calculations and a bloated array with ALL the dungeon data loaded into memory.
Any tips, tricks, advice or shortcuts to this problem would be very much appreciated.