Daniel has been working hard to finish up his last full-time week. Tomorrow at 5am he flies back to Florida for his final year of Computer Science. Before leaving he finished implementing AlienFx lighting into the game. We tried to think of innovative ways to tie the lighting system into the players actions and game environment. We think it’s pretty cool for those with the hardware to enjoy it. Why did we implement it now? Because for 5 years my Alienware rep has been politely asking when we would implement this feature, presumably so they can brag about the game.
I have been busy working on heuristic algorithms to make the dungeons fun. Placement of locked doors, levers, monsters, all in smart interesting places that make sense.
Here is an example debug output from the dungeon structure generator:
Start - Purple Outline and labeled “start”
Goal (final room or stairs to next level) - pink outline (#17)
Green Outline - critical path between Start and Goal
Red outline - It’s a trap!
Red dot - patrol of monsters
Colored door - requires a key or lever to open
Colored room - the corresponding location of the key or lever to open the door
The algorithm favors placing keys in dead ends (1 door rooms, labelled 1d) and far from the door. It was really bugging me when, randomly, the key would be placed in the room adjoining where you needed it. Euclidean geometry and A* pathfinding for the win!
Monsters are placed in smart-ish locations, like to guard a key (#10, #12, #1).
Daniel and I think it will be really fun, much better than what we had before. We’re nearing the end of working on dungeons and I think it has really been worth it!
If anyone is interested, this is a really easy to use C# A* pathfinding algorithm (which i had to debug and add features to):