July 4th, 2011
I finished implementing the pitchfork (before the final boss, since it’s required to move him from phase 1 to 2), which ended up a little less complicated than I originally planned. Instead of clicking and holding, then aiming and letting go to toss the enemy somewhere, now a click just throws them back a little bit, which doesn’t lose much of the original intention, and is way easier to program. Now that I have a decent framework for weapons, I now have a new problem to think about: animating attacks and weapon sprites. Should the dude’s sprite carry a weapon around all the time, or should it only appear when attacking? The first would look way better, but require some redesigns and a lot more sprites. Also, the attack animation I’m using right now makes the guy’s sprite about twice as long due to the sword, which throws off all the physics calculations that use the sprite’s width. I need to go back and replace every dudepos.width with a generic pixel size that I set as a global constant at the beginning of the program. Although, another way around that (and something that would fix the earlier problem) would be animating a separate weapons sprite that moves with an attack, and travels along with the dude’s coordinates. It wouldn’t look as natural, though I suppose I could program generic dude-attacks for melee weapons and for ranged weapons, and then just separately add in the weapon after the fact. That might not look bad at all, now that I think about it. It’s a pretty large deviation from the original plan, though, so it will take some working on.
Today is the 4th of July, though I don’t think it’ll mean anything different for us. I’ve heard that there’s going to be a “picnic” on the mess decks for most of the day, which I suppose means that it will be that much more difficult trying to get something to eat around meal hours. I also heard that our division will be letting us sleep through reveille and cleaning stations this morning due to the ridiculous drill/maintenance schedule that everyone’s been working around, so long as we make it to training on time at 10. If that’s true, that’s pretty good news seeing as it’s currently 2:30 in the morning, and I was only planning on getting about 4 hours of sleep. I think I’m going to set my alarm for 9:30 and just sleep until either it goes off, or someone wakes me up telling me that I’m late for something.
Edit:
I can see the weapons module turning into a huge mess the deeper I get; I need to start working on making it more organized before I get too much further. I’ve decided on having a separate sprite for the weapon, and cycling an attack animation for the dude depending on what kind of weapon he’s carrying:
Thrust attack: STUN ROD, PITCHFORK, MIND BLAST, RIFLE, SWORD ALT-FIRE
Overhand throw: WHIP, BOTTLE, MIND WHIP
Downhand motion: KATANA, SWORD, MIND FIELD, 6-SHOOTER (reversed order of sprites)
I can add an item to the animation_list, make sure it updates last so it always displays on top (the frills need to display afterwards, though. Might take some looking in to to make that work). I’ll get that, a melee weapon, a ranged weapon, and a whip-style weapon, and I’ll call it ready.