The Penguin Programmer

RPG Tutorial and Libraries

A few people emailed me after encountering some trouble when installing the JsonBox library required to complete the RPG tutorial, due to CMake not producing files compatible with their IDE.

It’s possible to complete the tutorial without using the library file explicitly by including the source code for JsonBox directly in your project and then compiling the entire thing. This makes compilation times a little slower, but it’s a much easier method if you’re having difficulties with installing the library. More details are in the tutorial itself.

Hopefully that clears things up!

New Website!

Old site is available at Links are broken I’m afraid, so you’ll have to add old. in front of the domain each time. I’m very sorry!

Hi everybody! Welcome to the new Penguin Programmer website which I’ve been working on for quite some time now. I’ve moved away from Wordpress and migrated to Jekyll, an absolutely wonderful static site generator written in Ruby. The old site didn’t use the dynamic aspect of Wordpress very much because I barely posted, so in the end it just acted like a giant weight slowing the rest of the site down and turning it into a fat, bloated mess of code. Now though, with an universal markup format (markdown) and much much easier customisation, performance and usability should be much improved!

General performance has doubled I think, so no more long page loads (and it’ll get even better when I figure out how to stop uncss from butchering my javascript), and I’ve restructured the site to make everything more consistent. This means that it’s easier for me to add content, and hopefully easier for you to view it!

The Tutorials

That’s enough about the site, but the tutorials have received a major upgrade too! I’ve completely rewritten the Beginner’s Tutorial and RPG Tutorial from scratch and they’re much better this time. The Beginner’s Tutorial covers more content and proceeds a little bit faster than the old tutorial, but it’s been reordered to be less jumpy and more C++ rather than C focused. I’ve also added an exercise to the bottom of each section. These are designed to be doable at the stage you are in the tutorial, and have example solutions so that you can check how you’re doing. They might be a little mathematics-heavy, but that’s the easiest way to keep them small!

The RPG tutorial has also been mostly rewritten in order to be much more extensible and easy to design content for. Specifically, I’ve introduced the use of JSON files to store the content, so no more hand-programmed game! The basic game engine is written in C++, with the JSON file defining the game world and the story. This doesn’t mean it’s more complicated though, and again by reordering the components I think I’ve actually made it more understandable than before. Overall it now resembles one of my other projects, Crawler, which is a text-based RPG engine (albeit a more advanced one) written in Ruby that uses the same (or very similar) JSON format for storing its game data.

The tutorial on Data Structures has been preserved, and will be updated as I continue to develop the site. I’ve removed the hangman tutorial (apologies to the very small handful of people that actually read that) and some of the other small articles that barely anyone read, and am now consolidating things into an “Intros” subsection which covers material too small to be made into another proper tutorial but is still handy to read.

The Old Site

The nature of the tutorials on this site means that I’ve no doubt interrupted a bunch of people in the middle of the tutorials, and suddenly changed all the content so that they can’t continue. Because of this I’m keeping the old site available for a bit (maybe a week or so) before taking it down, it’s available at and is exactly the same site as before. So if you’re in the middle of a tutorial, finish up there and come on over here where everything is a bit more modern and fresh!

Data Structures

After a rather long hiatus I’ve uploaded the beginnings of a new tutorial series on data structures, which will explain and give example implementations (where relevant) of

  • Arrays
  • Linked Lists
  • Stacks
  • Queues
  • Graphs
  • Trees
  • Heaps

as well as demonstrate the Standard Template Library implementations (again, where relevant) of those structures. It took me a while to bother learning about the above, but without trying to sound too sensationalist, when I did it really changed how I viewed software design! I definitely encourage anyone looking to improve their ability to check them out.

The code in these tutorials (more of a guide really) is written to work with generic types, and so makes use of templates, which I am aware I have not covered in the Beginner’s Tutorial. That will change soon however as I plan on updating that with some more advanced topics in the near future!

Subscribe via RSS