Bus Factor == 1
Awards
Files
File | Uploader | Date |
---|---|---|
screenshot1.png
Starter for 10. |
Marlow | 2007/04/01 20:10 |
Diary Entries
Simple
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.
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.
Almost a game
- 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
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.