Andrew Kelley - Lemming - PyWeek #12 Game Development Journal (2011 Apr 02)

Lemming - PyWeek #12 Game Development Journal

PyWeek #12 challenge starts in 2 days, 16 hours, and 11 minutes.

And I have 23 hours of homework to do in order to clear the Week of Py for development.

I've plotted out THIS week in Google Calendar (the week before PyWeek) - an entry for homework time, break time, and even sleep time. I'm following a strict schedule for optimum time management during PyWeek. The start date is 5pm on Saturday for me, so I have rotated my sleep schedule so that I will go to sleep at 9am on Saturday in order to wake up just as PyWeek starts.

I'm getting pumped up. I can't wait to start!

End of Day 1

Status: Tired, Hungry, Have to Pee

Idea: Side scrolling platformer. You're an odd-shaped lemming-like creature leading a stampede of 9 clones. When you die control is instantly transferred to the next one behind you. Your death affects the environment, so a large part of the gameplay will be suiciding yourself in order to get the next guy behind you to safety. Dying should be fun and comedic.

Screenshot:

Video

Source code on GitHub

Lines of code so far: 612

Decided to go with a tile-based level format.

I got hung up for a while on pyglet's inverted Y axis but I'm getting used to it now.

Having some trouble keeping the frame rate up. I have it up to about 24 but that's not even with a complete level. I'm hoping I won't have to mess with OpenGL directly, as I always encounter bugs that take hours upon hours to find when I do. I'm using pyglet's batch sprite API currently.

Next up on the TODO list is to create more interesting tile types and implement the physics for them. Maybe then getting a parallax background going (hard part is finding/creating the art). I think I'll save animation for later. I'd rather focus on my strengths (programming) and get some good gameplay going, and then if I have time I can make the animation happen. Really wishing I had an artist on board at this point.

Well, time for an 8-hour nap and then it's back to work!

pyglet bug

I ran into a rather unfortunate pyglet bug regarding animation.

This is going to cost me a an hour or two of dev time to use sprite sheets instead of .gif's :-(

In other news, new screenshot:

Also, when I tried to upload my character art () to Facebook, I got this:

LOL!

End of Day 2

Here I am at the end of day 2. According to git log, here's what I've done today:

6:24pm: scrolling 2-layer background 8:23pm: ability to detatch leader and give control to the next guy 10:44pm: suicide bomb control works 11:57pm: +1 dude powerup 12:06am: +infinite dudes powerup 12:21am: land mines 12:35am: spikes 9:20am: totally rewrite display engine and change level format. 9:38am: use pyglet resources rather than the skelington data.py module

Lines of code so far: 542. This is interesting because yesterdays LOC count was 612. After a full day's work and several new features, I ended up with less code. Three cheers for good design!

I'm now using Tiled for editing, which is way nicer than my own hacked up piece of crap level editor. I had fun deleting that.

Thanks to the display engine rewrite (I simply use glTranslatef instead of manually positioning every sprite), all my FPS worries are gone. I'm well above 60. However I have a new problem: weird line artifacts appearing on sprites. It seems almost as if the bottom row of pixels of every sprite is displaying on the top of the sprite instead. You can see it in the screenshot - there isn't supposed to be a flickering line on the spikes.

Video

Next up on the TODO list: use the nifty level editor to create more tiles and a fun and legit Level 1. Then begin to do whatever game upgrades necessary to make Level 1 work. This may involve doing some (shudder) animations.

I should begin to think about music and sound effects too. I am considering making the background music myself. I have been known to make some music in FL Studio. I think it would be fun if some parts of the level pulsated to the beat of the music.

End of Day 3

Video

Lines of code so far: 653

What I've done:

Here is some new concept art:

Problem: I have a mid-term coming up in 7 hours, and I have not been to class or read the book since the last test. Also I worked through the night so I will be in sleepy-and-not-motivated mode all day while studying and test-taking. Bleh.

Overview of what my TODO list looks like right now:

End of Day 4

Good news and bad news. The bad news is that I got at best 55% on my statistics test yesterday. The good news is that I have all kinds of new stuff done for PyWeek. I think I have my priorities in the right place :-)

Video #1

Video #2

I talked to my friend Tyler and he wants to make the music for the game, if only he can whip his computing situation into shape in time. I'm crossing my fingers.

I've formulated a plan for the rest of the days I have left:

Day 5:

Day 6:

Day 7:

End of Day 5

I'm really fighting sleep-deprivation right now. Going to crash like a rock as soon as I'm done with this diary entry. Like a rock? Is this how a person crashes? I can't remember. Anyways:

Video

Music

I'm waiting on confirmation to make sure I don't have to swap out my explosion graphic. That would suck.

TODO:

Day 6:

Day 7 (half-day):

Bugs / nice to haves that I probably don't have time for:

End of Day 6

Lines of code: 1939

I'm not going to spoil the surprise by posting any more commit log, videos, pictures, or sound. You'll just have to play it to find out!

Things are progressing on track. I already have something playable and working right now, all that needs doing is some more levels and bug fixes.

Good news - Tyler managed to get his computer working and make an awesome track.

I really need sleep but I'm going to be out and about for another 10 hours. I can do this.

TODO:

Day 7 (half-day):

I'd really like to, but probably not going to get to these, unfortunately:

End of Day 7

Well here I am. 32 minutes to go and I am submitted. That was a gruelling but satisfying experience.

I tried to make as many levels as possible and ironically ended up with 9.

2021 lines of python.

Tyler's having fun with the level editor - I think we may continue to work on this past the competition.

Also I'm going to contribute to Tiled. Having relied on it heavily, I know how to make it better.

I also discovered a few pyglet bugs. I'll submit patches to fix them.

Postmortem

A lot of people are getting stuck on Level 2.

And 3, and 4, and 5, and...

I realize now that I made the levels way too hard. I should have very slowly increased the difficulty.

Each new level shows off more of the game's gameplay elements, so it would be a shame for you to give up and judge without at least checking out all the levels.

If you edit a file called "save_game" (this will be created if you beat level 1) in the directory you run the game from, it has the number of the level you start on when you press Continue from the title screen. You can edit this to skip around and see all 9 levels.

Alternately, there is a YouTube video of me speedrunning through the entire game (only 7 minutes long):


Thanks for reading my blog post.

Home Page | RSS feed | Sponsor the Zig Software Foundation