The Invent with Python Blog

Writings from the author of Automate the Boring Stuff.

Mon 19 March 2012

CircleMUD Data in XML Format for Your Text Adventure Game

Posted by Al Sweigart in programming   

CircleMUD was a popular piece of server software for running a MUD, and it came with a sizeable virtual world (which the admin could modify/append to customize their fantasy world.) It would be pretty handy to use parts of this data if you were creating your own virtual world for a text adventure game, but the format of CircleMUD's data files is kind of obtuse and not amenable to manipulation.

So I wrote a few scripts to convert these files into a single XML file which is 4MB when unzipped. You can parse this file and modify it to suit your needs. It contains 1979 rooms across 30 different areas (called zones in the file), with 46 shops and 569 different "mobs" (mobile objects, which are the monsters and NPCs). There are 678 different types of objects, including 116 weapons and 154 types of armor.

Read more...




Mon 20 February 2012

"I Need Practice Programming": 49 Ideas for Game Clones to Code

Posted by Al Sweigart in programming   

You want to practice writing code but can't seem to find any open source projects that are at your level or easy for new people to contribute to. Here's a list of game clone ideas for you to implement. Each has a short description of the game, links to videos of the game, and descriptions of what kind of algorithms you'll need to know in order to implement them.

Read more...








Fri 07 October 2011

Pygame Cheat Sheet

Posted by Al Sweigart in pygame   

If you already know a bit of programming and Python, and want to get up to speed on the Pygame 2D game framework, here's a cheat sheet that you can look over. It implements a very short Pygame program covering most of Pygame's basic features.

Read more...




Sun 18 September 2011

Virtual Caesar Cipher Wheel program

Posted by Al Sweigart in pygame   

The Caesar Cipher Wheel is a paper cutout that can be used to perform encryption and decryption in the Caesar Cipher. However, if you don't have a printer but do have Python and Pygame installed, you can use this Caesar Cipher Wheel program to rotate a virtual cipher disk instead.

Read more...




Wed 07 September 2011

Rough Drafts of My Next Two Books Are Available

Posted by Al Sweigart in news   

I've decided to make the incomplete rough drafts of my next two Python books available.

Become a Codebreaker with Python

Making Graphical Games with Pygame

The emphasis is on "rough" and "incomplete", but I thought it would be better to give a preview of the direction I was going. These books are also available under a Creative Commons BY-NC-SA license like the first "Invent with Python" book.

Read more...