Saturday, December 21, 2013

And sometimes things are easy.

Occasionally it turns out that my code design is actually decent, which means that on those rare occasions, adding things is easy.

Halfway through my cave level, I decided it needed boulders dropping from a hole in the ceiling that you had to dodge (by timing jumps when they go by). I didn't have any code in place yet for moving obstacles, although I had vague ideas about eventually including them, so luckily I had at least designed for the possibility.

Turned out, it was REALLY easy. It took about 15 minutes to find, download, and edit a Creative-Commons licensed boulder sprite. About 20 minutes to write the code for the boulder itself. Then about 15 minutes to write the code for initializing the boulders from the tile-editor level definition. BAM, the whole feature was working in less than an hour.

That felt good, after wasting so long reworking my collision code the other night.

Next I'll work on the 2nd cave room, which includes the first major ability powerup item. So I'll have to write the code to handle the UI for switching abilities. And I need to hurry and do that, because Aaron has been pestering me all day to hurry up and add a new ability. Well, when he's not running around the house jumping over things and pretending to be Robo-Ninja.

No comments:

Optimization and C

Starting this next game in C, I've known there will be places where C isn't fast enough, and I'd have to drop to assembly to ...