One of the ideas that I’ve been rolling around in my head lately is the possibility of a roguelike completely lacking in any sort of graphical user interface (GUI). Basically, this means the game would have no menus or displays of any sort–not even a health display or or turn counter–on the main screen of the game. Instead, the user interface would all be in text, displayed in a separate message console/log thingy (don’t you just love my technical terminology?). Events in the game, player stats, monster stats, and all that would be displayed through such a console.
I’ve been meaning to release my self-contained implementation of A* pathfinding for a while now, but it took me forever to get around to cleaning up the codebase and stuff. Anyways, once I did tidy it up, I decided to release it. Hopefully somebody out there will find it useful.
Field of view, and stuff
Field of view, which involves determining which tiles are visible to the player, is a particularly fun aspect of writing roguelikes, in my opinion. When writing a field of view algorithm, you often find yourself trading quality for performance, or vice versa. Some algorithms get around this with a bit of trickery, like the Rogue algorithm. Other algorithms have no visible artifacts and in fact are quite pleasing visually, but pay for this with a definite decrease in performance.
In this article, I’ll be discussing how to generate neat-looking fully connected caves using cellular automata. This algorithm builds off of another algorithm which can be found here. As noted, the linked algorithm is incomplete and cannot be used for generating dungeons that are suitable for a real roguelike. This article is about the method I used to make that algorithm workable.
If you’re writing a game that incorporates both a terrain of some sort and enemies that walk around, the chances are you’ll need some version of pathfinding to control the enemy movement patterns. The thing is, pathfinding is serious business–it’s not easy to grasp. To make things worse, there aren’t many good pathfinding resources–most of the articles that turn up on Google and such only serve to confuse you further. That’s why I’ve taken the time to compile this list of pathfinding resources that I’ve found to be actually helpful, as opposed to confusing or just plain wrong. Enjoy!