Day 1Worked pretty much flat out today to put together the frame around which the game will be built. Github repo: https://github.com/PaulBrownMagic/TwoWorlds
The biggest part of the day has been spent of the dungeon generation. I've opted for a quite traditional 3x3 grid of rooms. I'm generating them by choosing a width and height at random, then placing the room within a bounded section at random. From there I'm using a depth-first search or breadth-first search to create a spanning tree of the rooms. I'm making doors to the rooms on the fly as need, so there's only one door per side and the passages connecting the doors are distinct from the rooms. Once I've got a spanning tree I know all rooms are connected, but I want there to be a chance of loops in the paths and the chance to have loops through rooms too, so I choose a few other random connections and add them in too.
The tcod library I'm using makes it relatively easy to work with the map, it'll work out if a tile can be walked on or if it's transparent for me, but I had to add in whether it had been explored yet or not to get fog-of-war. From there I'm just calling tcods drawing functions to handle all the gui and user input.
Now I have a player who can move around and explore a dungeon, in the magic world or real world. Next I need to make some gui additions such as the health bar, xp info, level info and message panel. Then it's on to monsters and items.