Starter for 10.

Bus Factor == 1

Deep in the English home counties lurked a coder who was determined to write a decent game using Python. This is his story.

Awards

Give this entry an award

Files

File Uploader Date
screenshot1.png
Starter for 10.
Marlow 2007/04/01 20:10

Diary Entries

Simple

Looking back on Pyweek3, I got stuck on trying to fix just one bug rather than cutting my losses and moving on. I'm not making that mistake again - I'm keeping it all very simple.

2 comments

Starter for 10 - no shooting

I wanted to make a game in which the player had to shoot headless robots to escape from a deep cavern. Today I had some of the game running without the shooting, but with around one hundred robots on screen to test the speed of Pygame as much as anything. And, much to my surprise, my wife kept wanting to play it. So already I'm not doing the game that I thought I'd be doing as there will be no shooting.

Add a comment

Repeat after me: "Premature optimization is the root of all evil"

Day 2, Monday, was a working day, so I had no real time to look at this until the evening. During my drive home I figured that I could do with a collision grid to speed up collision detection - anything to reduce the number of collision tests.

So, when I finally got time to myself in the evening, I sat down and wrote a nice collision grid class. I even unit tested it to make sure that it did what it said on the tin. And then I fired it up to see what would happen. And guess what. It was slower! I took some timings and found that the overhead of maintaining the grid was just too much compared with iterating through a list and comparing a few thousand rectangles.

So day 2 ended with a whimper.

I feel a bit better about it now, as this morning I got up early and did a quick and rather more successful spike before heading off to work, ending up with a reasonably competent implementation of doors.

3 comments

Almost a game

I finally got a couple of straight, uninterrupted hours where I could pull a few ideas together and ended up with:
  • a level made up of several rooms
  • a room with stairs in
  • doors between rooms
  • progressively larger levels
  • oh, and a bug in my robots' movement which my wife caught
Now it is time to pull a late night and turn it into a real game!

Add a comment

Option 2

This is a tough one.

My wife likes my game. She even keeps playing it. Unfortunately for me, she doesn't want me to release it until it is finished. So, given the choice between (1) submitting an incomplete game, or (2) swallowing my pride and taking a bit more time to further develop a game that my wife actually likes... I'll take option 2.

Now, if there could only be more PyWeeks. Working within constraints is a great way of playing with ideas.

2 comments