New articles at Beginner’s Guide to Roguelikes in C/C++

Earlier I wrote about the Beginner’s Guide to Roguelikes in C/C++. The author has updated the tutorial with some new stuff, including NPC characters. The new articles are

The 7th article is all about writing NPC that can randomly wander around the map. This article has a gentle introduction into OOP, by creating class for Actor (who currently is used for NPCs, but I suspect will be used for player character too).

The 8th article especially was interesting to read, because, in progress of adding multiple NPCs, he explains three different ways of doing it and some of the ramifications of each of them. After all, it pays to think of these things some before committing to a specific implementation. You can of course change it later, but it might be harder at that point.

The 9th article breaks the code into smaller chunks and shows how it makes things more manageable. Very useful skill to have, since navigating a huge source file gets tedious pretty quickly.

When I was trying out the previous articles, I was having some trouble with console library (instead of @, I kept getting floating point number on screen). Craig was really helpful and made some changes in his console library to get it working on my system too (I’m using CodeLite with MinGW). So if you had the same problem, try again and see if it works now.

The guide can be found here.


Roguelike tutorial in C/C++

I stumbled upon something neat: Beginner’s Guide to Roguelikes in C/C++. Craig Stickel has been writing a tutorial on how to write own roguelike in C/C++. Currently all the articles are from the point of view of C, but judging on the index page, C++ stuff is on the horizon.

What I really like about the articles is that they always have something tanglible at the end. So if you stick to it, read the article through and code, you’ll end up with a new feature. Constant progress is very important when learning something new after all. He also provides full source code, so in case of copy/paste error, you can still get the program up and running.

Maybe I should try to write something similar in the future, when I have a bit more ready for my own project. Could do it from the point of view of using pyherc as a platform to create roguelike game. There are beginnings of the documentation online already, but should polish up things a lot more before it’s useful as a platform.