I'm creating a game in C++ and raylib. This is a real-time isometric game, so it is technically 2D graphics, but the rooms have a 3D structure because there will be many blocks and other objects that create obstacles, and you can jump up onto them.
What is the best way to store the objects? Ofc I want a 3D array, but it's not that simple because there are some flat objects on the floor and walls, maybe even the ceiling.
For example, flat objects on the floor: keys, scrolls, coins, etc. There can be theoretically infinite stacked on any one square of the floor (or on top of a block or crate).
Flat objects on the walls: switches, keyholes, doors, coin slots, etc.
So right now it appears that I will have to make 1 3D array, and 6 2D arrays (4 walls, floor, ceiling). This is messy enough on its own. And it's even more complicated because rooms will not always be a simple box shape. The floor layout can be any contiguous shape making interesting paths. This can lead to theoretically infinite 2D arrays for each piece of the walls...which is a nightmare to think about let alone code.
The stored objects will also include the PC and any moving characters or monsters (although they are not flat, they will take up volume like a block or crate).
Am I doomed to maintaining multiple arrays of different dimensions? There must be a better way. What is industry standard practice for this sort of room structure?