Post Mortem: Descentsitized

Posted by
May 29th, 2011 7:27 pm

So, I’m throwing in my hat for this MiniLD. I had a pretty awesome mockup (I thought) and was happy with my ideas for the game, but it really hasn’t worked out as smoothly as I’d hoped. However, this MiniLD was definitely a net positive for me, for several reasons.

What I learned

Music Creation

I finally found a music program I enjoy using that’s both stable and makes it easy for me to compose: SunVox. I’ve probably spent a total of  10 or more hours on music this time around, most of which was split between getting used to the software and getting used to composing again. I’m going to keep working with this program, and see if I can’t get faster before the next MiniLD rolls around… maybe I’ll have a chance at finishing then.

What I need to work on

Collision Response

The single largest roadblock to me finishing wasn’t actually the music; that was more of a symptom. I probably would have spent about an hour or two on music if I hadn’t hit a brick wall in my code. The biggest thing that tripped me up was collision response. Having worked with Pygame before for my LD20 entry (LD20X6: Initialisms), I was already familiar with its collision detection system, so I went in pretty confident on that front. However, knowing that a collision has happened and knowing what to do about it are two entirely different things – and I’m still a bit fuzzy on how to actually implement collision response in a 2D platformer. I’ll probably figure it out in the next few days, but it’s a bit weird coming into this from a mostly 3D background, and having to adjust to a pure 2D system, especially since most 3D frameworks already have a built-in way of dealing with collision response… here, I need to either implement it myself, or find another library to add to the stack.

Coordinate Systems

One other big issue I’ve been having with my entry is the fact that when you’re just moving a Rect (in Pygame) you can’t really move slower than 1 pixel per frame, since all Rects store integers instead of floats. This necessitates some sort of scaling in order to track things correctly. The easiest way to do this is to treat everything as having a coordinate system that is 10 units per px or something like that so that you can move slower if needed. However, I didn’t realize this until I had already implemented most of the Actor class and its two subclasses, Character and Zombie. So… so much for all that code. I started rewriting Actor, but got distracted by the music about halfway through, because I found it increasingly difficult to wrap my head around what I was doing, so I basically ended up spending the rest of Saturday on music alone.

Next Time!

Hopefully I’ll be a bit better prepared next time around; in the meantime, I’m going to work on implementing collision response in a 10 unit per pixel coordinate system, and see if I can get that working reliably. (basically, continuing this MiniLD game) Also, I’m going to try making more music in Sunvox so I can get a little faster at that, and hopefully not waste as much time feeling my way around the system next time.

So with that, I bid good luck to all my fellow contestants, and look forward to seeing your finished games!

2 Responses to “Post Mortem: Descentsitized”

  1. huhwhozat says:

    To get around the x,y as ints in pygame, you can subclass Rect or whatever you need and make a separate x and y that are floats. Then, just use those in your draw function and it will truncate them as needed. Not 100% accurate, but good enough for most cases. I can provide examples if you like.

    • whitelynx says:

      Oh, cool… didn’t realize that. I was trying to look at what to override, and since it’s all in C++, I didn’t bother digging up the real source, and just assumed it couldn’t be overridden in Python. Thanks for the tip!

Leave a Reply

You must be logged in to post a comment.

[cache: storing page]