Thursday 22 February 2018

Week 6 - Dungeon Generator & new challenges

So I was going to hold off on a blog update for a week in the interest of having something new to show visually, but I figured I have a lot to write about for now regarding the dungeon generator. So have a visual of one of the older mockups before I decided to zoom the camera out:




A great deal of progress has been made on the fundamental generator of Infernum. Through a few evenings of idle coding there is now a dungeon-generator that supports the ability to draw rooms of varying rectangular sizes, give them floors, and then put walls around the room.

At the moment I don't generate a complicated grid or anything. At the moment I've been testing to ensure the making of rooms works in general, but I'm going to work on the ability for the player to have vision and move, which means moving on to work on the GameManager.


Through this next week or so I'm going onto a new challenge before returning to generating actual rooms and corridors all connected. In this case, that is player-vision.

There are a ton of ways to implement player vision, generally it seems to be direction-based. Through research it seems the original Rogue itself did a very non-intensive vision system: It lit the room up if you were in it, and in corridors it just strictly lit up the tile in front of you.

In this case I don't want to do direction-based, I'd like to push for a more uncommon approach via a full surrounding vision via light and lack thereof.

To this end, vision will be circular. This presents a new problem: Circles in square tiles.

Overall my focus for the next week will be to create a system to allow the player to see a circular area around them. At first there will be a minimum view of a simple 3x3 area around the player. From there, I want to experiment with going up to 5x5 as suddenly I have to deal with the idea that something might obstruct vision (Aka one of the tiles of vision are past a wall).

My current theory on this is that I can draw a circle after 3x3-size and then try to do pathfinding from the center to see if I can reach every tile in the circle. Also the size of the light source will now be based on the circular radius, not a square grid (So a size 3 would mean a radius of 3, meaning we can see 3 tiles away directly in each of the four primary directions, then I see if it's possible to create the circle roughly by trying to go to between them.


Hopefully next week, assuming this goes well, I will be able to show a basic running demo of the player moving around and having a light-based vision system with the lit and unlit tiles. After that I can return to try and expand on generating a proper dungeon.

No comments:

Post a Comment

Week 11 - Vision Systems and Moving Ahead

So unfortunately it's been a while since the last update, due to an ever-changing list of complications with my new vision system. But...