August 2012

Fernkampf

It had nothing to do with slopes after all. It turns out I had the “receive physics” box checked, and every time the bad guys ran into a wall, they would turn around and bounce off in slow motion, which looked a lot like flying.

I ended up completely redoing the enemy’s collision detection, using Pickline to check the entire bottom edge (with a 3 pixel buffer) to see if he was intersecting anything solid.
Also, because of all this, I ended up discovering that the entire time, I’d been using the width and height of the image instead of the collision polygon, which doesn’t matter so much for Tim, but matters a whole bunch for the caveman, who has a bunch of transparent space around him. I ended up discovering how to translate coordinates from object space to world space, and now all my calculations are a lot more accurate.
I also ended up playing around with collision layers, so now the caveman doesn’t end up standing on top of Tim’s head, and if there are multiple cavemen on the screen, they don’t push each other around trying to get to Tim.
I’ve started adding the code necessary to make the enemies modular; ideally, all I do is add a field to each enemy sprite that holds the name (Thug, KnifeThug, Samurai, etc.) and the enemyclass initialization does the rest, changing all the applicable variables as necessary (health, damage, range, etc. Fun Fact: I’ve added a variable called fernkampf as a mini-homage to Albion, which was originally coded in german. Fernkampf means long-range-combat and that was the variable name that held the amount of damage different characters did).
I’m going to start needing some enemy animations here soon; just a way to differentiate between different types. What I used on deployment was just a single image that scrolled an animated marquee across the top: “attacking,” “walking,” or “idle.” I would change the color of shirt and pants to make the enemies look different. That’s pretty cheesy, but it worked for the time. Now that I’m using better quality graphics, though, I’d kind of like everything to be a little better looking. There has to be an application out there somewhere for animating simple characters.

Slopes: My Nemeses

Can you have more than one nemesis? Would nemeses be the plural if you can?

I’ve been tweaking the enemy-caveman’s movement for hours now, and he looks smoother than ever- including his flight. I just can’t get him to stop launching himself into the air every once in a while, and I’m convinced it has something to do with the slope as he starts to walk down. I’m going to play around with it some more and see if that doesn’t help.
I was cleaning out the Mad Scientist Room in my apartment the other day, and I happened upon a treasure trove of concept materials, most notably the building layout for the laboratory, both the final level, and the flashback version. I thought that had been thrown away, and was quite bummed by the loss, because I spent a long time working on it.
I feel like I’ve finally gotten a little bit of time to myself, and it wasn’t until I found myself playing Starcraft for three or four straight hours that I realized I probably had enough time to pick my game back up.
Even though my online class started today, I’m announcing the end of my hiatus. I need to make time for this project; I refuse to let this be another one of my forgotten-about wastes of time.