If you don’t want to read the article and just want to try the text-based Minesweeper I coded, the link is at the bottom.

As you hopefully know by now, I am a musician. I am not a programmer. It is not accurate to say that I am a musician first and a programmer second, because before this week, I hadn’t programmed before. Ever.

But I started thinking about my future this week and decided that some day, I would like to release my own game, instead of only writing music for other peoples’. For a long time, although I always had that desire in the back of my head, I ignored it because I was scared of programming. I had no idea what to expect and was afraid to even start.

All that changed this week. After some browsing, I found an awesome link on Reddit to Al Sweigart’s awesome free eBook, “Invent Your Own Computer Games with Python.” I dived right into it and have been having a blast ever since.

My method has been as follows:

Finish a chapter or two

Create the programs that the book’s tutorials teach

Invent my own little game using the concepts I’ve learned





One game the book taught me to make was a “Guess the Number” game where the computer picks a random number in a specified range and the user has to try to guess it. The computer will then tell you “lower” or “higher”. Pretty simple. After making this and learning some concepts, I made my first game, “The Man-Rodent is in the Barn.” It was essentially a guess-the-number game but instead of guessing numbers, the player had to guess where the man-rodent was hiding. Here is a screenshot of the game in action:

I posted this game on Reddit and it got some awesome comments. First, some people updated my graphics to make it more modern:

User louisstow made this:



Then slicktwirl updated it even more to this:



But the highlight of all the comments was another one of slicktwirl’s. He made me an AWESOME cover for the game:



Btw, slicktwirl’s real name is Michael Hussinger and this is his site. Go look at it and drool at his amazing art.

After my first major released, I read some more chapters and did some more tutorial programs. One of the programs I really liked was “Sonar Treasure Hunt.” Here’s a pic of the game in action:



This game reminded me of one of my favorite games ever made: Minesweeper. Although I knew it’d be a challenge, I embarked on a quest to program a text-based version of Minesweeper using Python. I soon found myself engulfed in an enormous task with countless bugs and things that just didn’t work. I spent hours and hours, stayed up way too late, and probably swore aloud thousands of times when it didn’t do what I wanted it to do. But today, I have finished it. And I’m really proud of it. It’s fully customizable. You can make the board anywhere from 2×2 all the way up to 30×30 and you can put as many mines in as you want. You can even add flags (currently, the flags display as a “P” because I thought it looked most like a flag, but there may be something better).

Here’s a screenshot of my text-based Minesweeper in action:



My code is messy and sort of a hack job, but it works, and that’s all I really care about. My code will get better and better the more I do this.

Now that I’ve been programming for a week and have been talking to some people about it and doing some research, I now realize that Python is sort of useless in the gaming world. So my next task? Learn C++. And learn how to use actual graphics in games (I’m nervous about that one). Then learn Objective C. Then hopefully make an iPhone game and release it to the world. Even if my first game sucks and is very basic, it’d be amazingly satisfying to release one and obviously, all the music and sounds would be mine!

If you’re interested in trying my text-based Minesweeper, you must first download Python 3.1.2. Then, you can download “Minesweeper: The Text Version” here.