Thursday, March 20, 2008

Creating a Roguelike in Python

I have decided to produce a Roguelike game to further my programming skills, and document the experience here.

Roguelikes appeal to me for their emphasis on gameplay over flashy graphics (to the point where many have no graphics at all) and for the extensive community of Roguelike developers and enthusiasts to draw upon. Also a Roguelike should make an ideal programming project, as it can be broken up in to several sub-projects such as:
  • Random dungeon generation
  • 'Line of sight' calculations
  • Artificial Intelligence for monsters
  • User Interface design
  • Sound and Graphics
  • A million things I haven't thought of yet!
Due to the nature of Roguelikes, the dungeon generation and gameplay aspects can be worked on before any consideration of adding graphics and sound effects.

This is by no means the first or only development blog for a Roguelike game. Dirk Kok's blog 'Writing Kode' is one such site that is an influence and inspiration for this one. Dirk uses C++ for his game, while my programming language of choice is Python, which I hope be a good choice. I expect my first tentative steps to emulate Dirk's, and then diverge from there.

As I am a hobbiest rather than a professional coder you shouldn't expect to see stellar examples of good Python coding. Rather I will be relating my trials and tribulations as they occur. I may also express my opinions on certain existing Roguelikes or ideas I would like to implement in my final game, however, I will try to keep that sort of thing to a minimum until I have some working code!

Coming soon: Creating a random dungeon

7 comments:

Turner said...

Last week I decided to do the same thing. I've been playing Nethack far too much recently I suspect.

I've been needing a project that I can make progress on instead of spinning my wheels, I thought a simple rougelike in python might be fun.

Anonymous said...

I wish you the best of luck, are you planning to do output through pyGame, or are you doing full text output?

Todd said...

Curious to know how far you ended up getting on this project. I'm debating using python for the same thing -- did you use the wcurses module or something else?

Anonymous said...

Interesting to know.

Anonymous said...

I've been working on a Python Roguelike and it is FAR from easy. I spent countless hours trying to get curses to work on windows with several wrappers like wcurses. They aren't finished enough to be viable, but someone has made a library using SDL and ctypes for called libtcodpy and it is awesome. It has support for images, built in pathfinding, field of view and more. Check it out if you are wanting great text output. I'm not planning on using any of the build in functionality but I've tested it and it works well, but it really shines as far as console output is concerned, really easy and tremendous support for colors. Just run the samples.py thats included and you'll be amazed.

erection pills online viagra said...

I was very pleased to discover this website. I wanted to thank you for ones time for this particularly fantastic read!! I definitely liked every little bit of it and i also have you bookmarked to check out new things in your blog.

ed treatment tablets said...

An outstanding share! I've just forwarded this onto a friend who was doing a little research on this. And he actually bought me lunch due to the fact that I discovered it for him... lol. So let me reword this.... Thank YOU for the meal!! But yeah, thanx for spending some time to discuss this matter here on your blog.