Fredrik
Member
Hey.
I'm working on a randomally generating dungeon game where the levels generate room by room in a gridform and that the randomness for each level is specified with a given seed with random_set_seed(seed);
In the end of each level (or floor) there's a door taking you to the next level, by pressing the door the current generated level will be wiped and the game will generate a new level, as the entire game (as for now) is all happening in one room. The only thing really prechecking what floor you're on when you start the game is a variable; global.currentfloor, which is saved in a ini file (togheter with the seed), and this creates the problem I need some help with, since the only thing deciding what floor you're on is the global.currentfloor the level will always be generated the same based on the seed. So if you start a new game and the level is generated based on the random given seed and you then go down to the second floor so the game saves that you're on the second floor and then exit the game and open it again, the dungeon will still generate from the beginning as it was the first floor thus making the second floor not be the same generated level as the second floor was before you quit the game.
My problem is that I'm not sure how to fix this. I could perhaps try to make the game set and save a new seed before generating, making it so each floor has it's own seed, but I'm not sure. Any suggestions?
I'm working on a randomally generating dungeon game where the levels generate room by room in a gridform and that the randomness for each level is specified with a given seed with random_set_seed(seed);
In the end of each level (or floor) there's a door taking you to the next level, by pressing the door the current generated level will be wiped and the game will generate a new level, as the entire game (as for now) is all happening in one room. The only thing really prechecking what floor you're on when you start the game is a variable; global.currentfloor, which is saved in a ini file (togheter with the seed), and this creates the problem I need some help with, since the only thing deciding what floor you're on is the global.currentfloor the level will always be generated the same based on the seed. So if you start a new game and the level is generated based on the random given seed and you then go down to the second floor so the game saves that you're on the second floor and then exit the game and open it again, the dungeon will still generate from the beginning as it was the first floor thus making the second floor not be the same generated level as the second floor was before you quit the game.
My problem is that I'm not sure how to fix this. I could perhaps try to make the game set and save a new seed before generating, making it so each floor has it's own seed, but I'm not sure. Any suggestions?