[omaha] A game to teach programming

mattnuzum at gmail.com mattnuzum at gmail.com
Mon May 21 17:22:16 CEST 2012


Hello, my 11 year old  son and I wrote a dungeon game in order to help him
(and others) learn how to program. You can see it here:
https://github.com/newz2000/dungeon-game (it's open source, apache 2
licensed).

Basically, we started making a super simple D&D game on paper with some
dice. We had fun making characters but the dice were tedious so I suggested
writing a little code. We gradually moved more and more of the game into
Python until everything is there except the map.

In order to run the game you have to write python code, though it's very
simple. Initially you enter a room like this:

room(6)

Then if there's a monster in the room you attack it like this:

player_attack()

Unless you kill the monster, you have to give it a turn like this:

monster_attack()

Back and forth you go until someone dies. If you beat the monster then you
may get treasure! You explore more of the dungeon in the same way.

Then comes more fun because you can customize the game. You can give your
characters names, which teaches strings, you can add new monsters which
introduces lists and dictionaries, you can also add new types of heroes
which teaches classes and inheritance.

It's a lot of fun for middle-school aged children. There are no fancy
graphics and the actual game play will not entertain them for long, but
they do love to create new monsters. :-)

We'd love to hear your thoughts. We found out a colleague of mine from
Argentina has two sons that have been hacking on it, which really made my
son's day.

-- 
Matthew Nuzum
newz2000 on freenode, skype, linkedin and twitter

♫ You're never fully dressed without a smile! ♫


More information about the Omaha mailing list