Skill a Week #3: Programming a Game

I have a confession. One of the core things about who I am is that I consider myself a programmer. And yet, for over four years now, I haven’t done any programming outside of work.

It’s true! It’s shameful! My excuse is a lack of time. But that’s a terrible excuse. It’s one of those things I can’t really explain. Programming makes me feel so good and yet I haven’t done any programming on my own.

Well, I changed that. A buddy and I were talking about making a game – perhaps even starting a company to do so. Finally last weekend I proposed that we meet up and start programming. Neither of us has much experience with this, but I think we’re both excellent programmers. So the first thing was just to start getting experience making a game. We decided on a tower defense-style game, and a game framework (Love2D). It uses a language I hadn’t tried before (Lua). And to be honest, I’ve rarely done much graphics programming or games. So, just getting started was a challenge.

After the first 4-5 hours, I was really enjoying myself. I had some basic competency in the language, and before I went to sleep I realized “hey, I have enough knowledge now to make a tetris clone!” So, that’s what I did. Only took a few hours of puzzling to get it working, with menu, all the keys and everything. Then, as I was cooking dinner, I thought to myself “Hey, you know what would be cool? Trying to make Conway’s Game of Life in under an hour!” I like Game of Life, it’s a very simple sort of program that leads to interesting emergent phenomena. And, lo and behold, I was able to write a decent version in about half an hour. Then, another half an hour to add different game speeds, pausing, and different grid sizes.

I’ll be honest, I was really happy with these experiments. It was rejuvenating – I felt like I did about programming way back when I was in high school. That there’s just a whole world of things you can create and mold exactly how you want. Things you care about, rather than things you do for grades or work. I’d also been really down on my programming abilities. Because, although I consider myself a good programmer, and most people I work with agree, I suffer from a startling lack of diversity in experience. All the cool projects I see other programmers doing, I know nothing about! I was really scared that making Tetris would be difficult, when in fact it was really, really simple.

At this point, I’ve probably spent about 15 hours programming in this environment (love2d/lua, editing in vim). And I feel wonderful. I’ve got a playable tower defense game, and I’m comfortable making pretty much any sort of feature change to the game at this point.

Maybe this is pretty specific. But I think generally people become unintentionally confined in their jobs, as though they were wearing a straitjacket. They end up creating nothing. But creating anything is rewarding and refreshing.

Advertisements
Leave a comment

1 Comment

  1. Good for you šŸ™‚ . It is great to find back your enthusiasm.

    I’m no programmer at all. To amuse myself and learn something, I followed an introduction course in python on coursera. Now I try to make the exercises they put up on rosalind.info (bio-informatical challenges). I can’t do all of them, but I’ve managed to solve the easier ones. I’m stuck with the “find the largest common string”, mostly because the solution I found works but takes hours when you have more than 2 strings of more than 500 character length, and you only get 5 minutes. But my boyfriend the programmer says that that is an exceptionally hard problem. šŸ™‚

    I guess for you the challenge now is to find a new game to make?

    Reply

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: