Actually there is a function to seed a room with a value. With this tile value you provide the number that would fit your system. I used a single random room seeding of the value 3 to denote my stairs here. (The orange square)
Lets say that value 3 is a treasure chest. You simply call the function and give it the parameter 3.
One might do something like:
seed_room(d:dungeon,n:int,r:room)
If the room parameter is -1, ALL rooms are possible to contain the value.
Let me tell you a bit more about the structure of the dungeon generator.
The basic type is the Dungeon. These are objects that contain an array and also rooms. The array inside holds values for the map. The empty rooms and passages have the value 0. The walls have a value of 1. The dungeons are made of rooms. Rooms are there to act like containers for your random items. They can also be accessed directly within the dungeon because they are held in a list. There is no global dungeon list to store dungeons, I left the storage and maintenance up to the programmer.
I'm not really sure that I want to code an entire game engine. This may just provide you with the dungeon and some placeable values. It would be up to the programmer to code battle systems and GUI''s.
Lets say that value 3 is a treasure chest. You simply call the function and give it the parameter 3.
One might do something like:
seed_room(d:dungeon,n:int,r:room)
If the room parameter is -1, ALL rooms are possible to contain the value.
Let me tell you a bit more about the structure of the dungeon generator.
The basic type is the Dungeon. These are objects that contain an array and also rooms. The array inside holds values for the map. The empty rooms and passages have the value 0. The walls have a value of 1. The dungeons are made of rooms. Rooms are there to act like containers for your random items. They can also be accessed directly within the dungeon because they are held in a list. There is no global dungeon list to store dungeons, I left the storage and maintenance up to the programmer.
I'm not really sure that I want to code an entire game engine. This may just provide you with the dungeon and some placeable values. It would be up to the programmer to code battle systems and GUI''s.