- Joined
- Sep 17, 2012
- Messages
- 11
Hello there,
I'm trying to create a dungeon-crawling based map with a random room system; as in, the player cannot possibly know where they'll end up if they take x or y exit at the beginning of the game, but will be able to come back to their first room if they wish to do so.
The map is filled with these rooms, small and large, with a diverse number of exits, that we'll call North, South, East and West exits (depending on the location of the exit itself), leading to a North, South East and West entrance to another room.
The simplest system I thought of for now was a system which basically assigned a random integer value at map initialisation to a variable specific to one exit, and another random integer value to a variable specific to another entry. This way, exits and entrances would be randomized, and the system would just have to assign which entrances and exits have an equal integer value, thus 'linking' them together at the start of the game.
Only problem is, I can't think of a way so that only one of these integer values are used: I don't want three exits leading to one same entrance, and vice-versa. Is there a possibility of restraining this, or am I taking the wrong end of the stick here, and there's a much simpler way of doing something like this?
Thanks in advance.
I'm trying to create a dungeon-crawling based map with a random room system; as in, the player cannot possibly know where they'll end up if they take x or y exit at the beginning of the game, but will be able to come back to their first room if they wish to do so.
The map is filled with these rooms, small and large, with a diverse number of exits, that we'll call North, South, East and West exits (depending on the location of the exit itself), leading to a North, South East and West entrance to another room.
The simplest system I thought of for now was a system which basically assigned a random integer value at map initialisation to a variable specific to one exit, and another random integer value to a variable specific to another entry. This way, exits and entrances would be randomized, and the system would just have to assign which entrances and exits have an equal integer value, thus 'linking' them together at the start of the game.
Only problem is, I can't think of a way so that only one of these integer values are used: I don't want three exits leading to one same entrance, and vice-versa. Is there a possibility of restraining this, or am I taking the wrong end of the stick here, and there's a much simpler way of doing something like this?
Thanks in advance.