July 31, 2011

Make Install: R5 Engine

Hobby 3D engines are a dime a dozen these days. I've gone down that road myself, and I can say that it's good programming practice. The R5 Engine is a bit special, though, for several reasons. One, the excellent blog covering its development. Two, that it's made to run on Windows, Mac and (recently) Linux. Three, that it's being used to create a game on top of it. And finally, that all this is the work of one man who I suspect does not sleep at all. :-)

And yes, it's open source. Check the blog for more info.

July 26, 2011

Make Install: Dwarf Fortress

Dwarf Fortress is arguably one of the most hardcore examples of hobby software out there. For those who don't know it: think of Minecraft (Note: this kind of puts the world in reverse; Dwarf Fortress has been around for much longer than Minecraft, and quite likely has taken its inspiration from there.) but without the fancy graphics and with the most extreme form of generative gameplay you could imagine. It features a randomly generated world which includes lots of different creatures, races and biomes, and which even works out a few thousand years of history.

If the above screenshot looks like a random bit of ASCII art you are easily forgiven. Dwarf Fortress is not an easy game to learn (try this two and a half hour tutorial on Youtube if you're curious), but it does offer some deep gameplay. Probably the most well-known example of that was recorded in the Boatmurdered stories. Even if you don't intend to play the game, those stories are well worth the read.

Perhaps the most amazing thing is that the main developer of Dwarf Fortress, Tarn Adams, makes his living from his work on the game even though the game is a free download. Tarn has such a loyal following of gamers that they simply donate money so that he can keep expanding Dwarf Fortress. In return for their support they also get a hand-drawn rendering of any scene from the game they want. Don't believe it ? Here's a recent interview with Tarn by the NYTimes, which includes some of these drawings.

I can only conclude that working on Dwarf Fortress takes dedication and a little madness. But you have to admire the result.


This is a first try for a Make Install post. Feel free to give pointers to help improve this category; and if you have ideas for a future post then don't hesitate to let me know.

July 25, 2011

Make Install

One of my frequent online reads is the Make blog. It's full of creative people, often making incredible stuff. Still, I feel that the Make editors are missing out on an entire category of Makers: software makers.

Now, there is some software to be seen on the Make blog, but it's always software as an artifact to make some cool hardware projects. What I would like to see is some articles where the software artifact is the project. I know there are a lot of hobby programmers out there, so why not put some of the spotlight on them too ?

Rather than wait for someone else to do this for me, I figured I could just add this to my own blog. I'm going to categorize these articles under the 'make install' tag for easy lookup later on. I'll try to add content regularly myself, but suggestions from readers are very welcome!

This will be something of an experiment, so let's see where we get.

July 20, 2011

25 years after the very first PC virus

This is a TED talk by Mikko Hypponen showing some of the viruses from 25 years ago, as well as the sinister malware which is now moving around the net. Well worth watching, if only to get an idea of the muscle which is moving this new wave of threats.

July 18, 2011

Maddening

Realm of the Mad God, that is. It has no real story, is just a bunch of mindless grinding, has killed my characters due to laggy connections, and is fun as hell to play. Really, I'm already worried about the time I'll be wasting on this one. But I just want to get into another God battle (I somehow made it into one, but didn't survive untill the end).

Here are some tips for new players: fight in groups for shared XP (less work to level up this way); your numeric pad acts as hotkeys for your items; teleport saves on travel time; and having to play this with a trackpad on a laptop is not ideal. :-)

Note: I didn't feel like trying this game until I remembered that DanC from Lost Garden worked on it. You may have seen me refer to his site in previous posts. There are some more articles on his blog which explore the design space around games like RotMG; good reading.

July 12, 2011

Hibernate vs. Active Record

The following is a bit of an opinion piece on the relative merits of Hibernate vs. Active Record. Before I start, here are the cliffnotes on both: Hibernate lets you focus on the code and takes care of the database, Active Record lets you focus on the database and takes care of the code.

I have been lucky to get to build up some real world experience with Hibernate. I've also played around with Active Record in some Rails apps. Up until a few weeks ago I would have said that the approach either takes is mostly one of technological preference. And to some extent that's true. You can do pretty much whichever you want with either.

Yet I have come to think that Active Record has got it right, and Hibernate doesn't. Here are my two reasons.

Flexibility.

In Hibernate the database is generated from the code. All data enters the database as instances of the model classes. If, however, you want to map something else to/from the database you are always stuck with having to go through objects (or code SQL statements manually, which is basically bypassing Hibernate altogether). This is not necessarily the most efficient solution.

In Active Record the model is just a view on the database. There's nothing keeping you from mapping the database to another model, and so you can conceivably store and fetch your data in any format you want, without having to instantiate the model. So if you want to populate your database based on data in an XML format and later retrieve your data in some form of CSV, you can.

Note/Caveat: I don't know if the Active Record implementation in Rails supports this, or if there are extensions which allow this. But I don't see why it couldn't be done.

Broken promise.

Hibernate kind of lets you believe in a fairytale when you start using it, and it's one that's especially appealing to programmers: that it will take care of the database for you. Just set up the connection parameters and you're off. The problem is that this promise breaks as soon as you want to store more than some of your mother's recipies. Getting the database right is a crucial part of real software systems. So in the end you'll be working on fixing your database and updating the annotations in your code to match.

With Active Record, however, the database is the central entity and you can work on getting it right. From there it generates the code, and you're mostly left with fixing some broken methods if your changes are incompatible. To me that's a much more attractive road to walk.

Just to be clear

I don't think that Hibernate is bad. It's not. It gives you a lot of power to get your applications going. I have used it before and I'll use it again. But I do feel that when it comes down to it it's actually Active Record which has the edge.

July 11, 2011

Koopa 1000+

The Koopa download counter has gone past 1000!

We're not stopping there, of course. I just updated the code with another contribution from Peter Tang. And I'm also thinking about how to add support for parsing conditions (which is proving trickier than I expected).

July 08, 2011

Journey

This looks like a game I won't mind playing:

Great, now I'm thinking about buying a Playstation 3 again...