I have been growing a recreation that has a map with options comparable or just about the identical to these of outdated metroid video games, besides that it’s three dimensional.
Instance of a metroidvania sort of map.
Tiles (cubes) are presupposed to be explored (coloured), revealed however not explored (greyed out), or hidden/secret (not proven).
Each closed form of the map, be it a single dice or another attainable steady form is a part of the sport that may get loaded when the participant enters it.
I am making an attempt to determine what knowledge construction can be the very best match for this drawback, particularly the only to entry and replace whereas the sport is operating (I am not apprehensive that a lot about efficiency but it surely’d be a pleasant bonus).
What I am doing proper now’s utilizing a graph represented by an inventory of nodes and an inventory of edges. A node represents a piece which incorporates a 3 dimensional array for the tiles that compose it. An edge incorporates the information about which part is linked to which part and on what particular tiles.
One other thought I had however did not strive was to have a single three-dimensional array with each tile on it after which individually hold a set of part objects that had a listing of indexes for the tiles that compose it together with different related information just like the connections to different sections, collectibles, and so on.
Am I on the suitable path? or perhaps I ought to strive one thing else?
P.S. I made a visible map editor for creating the construction and serializing it to a binary file.