Re: Zelda with random dungeons!
Posted: Mon Sep 21, 2015 2:24 pm
Bridges and large room in action
As you should be able to see in the picture, the player can walk underneath and on top of bridges. The bridge even casts a shadow (a cheap sloppy shadow, but a shadow none the less). The picture also shows the large room that I mentioned earlier (a block of 4 rooms).
Invisible "Bridge-Start" markers indicate when a player is transferring onto a bridge, and "Bridge" markers then indicate which area is considered the bridge. While on top of a bridge, the player renders in front of all foreground objects.
Player movement changes
You can now walk around while holding out your sword and keeping it charged up.
Wall tapping
You can now tap the walls with your sword, to test if the wall is weak. Breakable walls make a hollow sound when tapped. Secret doors do not make a hollow sound, it only works with walls that can be blown up.
Improved door rendering
Doors now render through the sprite batch, instead of being directly rendered to the screen. This means a big improvement in performance, plus the doors no longer tend to shift a few pixels when the camera moves.
Improved background object rendering
Background objects, such as doors, vases, pressure plates and buttons, are now refreshed with a call to a separate draw function. This means that not everything on the screen is refreshed when a background object needs to be animated. For camera transitions, the game still refreshes everything (as it should). But overall this is a bit more resource friendly, and clean. We don't want to redraw the entire scene if we don't have to.
(^ I'm open to suggestions regarding the above problem)
Fully functional sub screen map
Up till this point I had to rely on the mini map for everything (which draws only a portion of the map, your immediate surroundings). But now when you go to your sub screen, you can see the entire map. This also revealed that when the game generates a dungeon, it doesn't often fully utilize the space that was made available to it. Sometimes more than half of the available space is left unused. Obviously this needs to be be addressed. And I've thought of two solutions:
Insert black rooms
If I randomly create black-rooms that the crawler must go around, this will create more space in between the corridors. Right now the dungeon is very clumped together, like a massive block. I want it to be more like an octopus. Of course it only makes sense to have black-rooms where the crawler can run into them. So maybe I should first run the main crawler (which builds the main corridor from start to finish), then place random black-rooms adjacent to it, and then run the mini crawlers(which build the other corridors).
Build more than one floor
I've been thinking of adding secret floors to the dungeons. Perhaps when the dungeon uses less than half of the available space, it should create a warp to another floor, and then continue building there. I've already added a floor-attribute to all of the rooms to facilitate this.
Future ideas
A few times I noticed that the dungeon sometimes creates a large room, that had no doors to the outside on one side of the room, which looked really odd. Imagine a large room that is the size of 4 rooms. It only has doors to the east, but no doors to the west, north or south. So basically the entire western half of the room is pointless.
While I love the randomness, I don't want players to think that it looks random or pointless. So I think that maybe I should create alternate large room types, for those situations. Perhaps a special type of large room, that is fully decorated on the western side (a throne room of sorts), yet leaves the eastern side open for door placement? And obviously then I'd have to create variations for the other directions as well.