Blade Runner

Created with Sketch.

Blade Runner

Yesterday I didn’t do much in the way of level building, but I’ve gotten 2 of the 3 kinds of traps installed and the code designed for the third. So now there are functions, that work even, for both the spike traps and spinning blades. The one oddity of them is that spikes. You see, they hurt like hell. I mean if you are in the middle of spikes and get slammed, you’re boned like a chicken on Iron Chef, which is to say quickly and possibly deliciously. But I digress, basically unlike enemies which deal damage at a very specific time, the traps are an area of pain. So when a player is caught in said area, they experience, um, pain, to the tune of about 15 HP per second. Granted, that’s just a little on the side of overkill, but when the alternative is quality reaper time, then 15 HP per second as the price of failure is a bargain.
So that works, and the spinning blades work too. They basically work just like the spikes, except with this bit:

If Ducking = 0

So this only triggers a pain reaction (a pun!) if the player is silly enough to stand up. It doesn’t suffer from the same kind of cuteness as the Spikes, and only hits once per cycle though.
While I was fiddling I came across a trick that I programmed in at one point. Basically, if the player Dashes while they’re ducking, they roll. It’s just like a dash, but you know, low to the ground. I considered hacking it out, but it does give me a way to quickly navigate the neck blade areas of the map, so I say it stays. Thanks previous me.

In any event, the code is a lot easier to work with now. I can summon up entire rooms full of traps with single lines like this:

SpikeTrap (100,200,100,60,100,150)
Or, in something bordering on English:
SpikeTrap(X Position, Y Position, Width, Height, Trigger On Frame, Trigger Off Frame)

…and that’s it. That is all that goes into the scripting file for the trap itself. I’m quite happy with it.

– I’ve gotten the basics of the difficulty setting in now. I built a function called Trap Damage that either deals damage (like it says) or makes with the dooms. It knows which to to based on the difficulty that is selected. So now, the settings can be Easy, Normal, Hard and Perfect. Those are further broken down by how much damage is dealt or received, how blocking works, how trap damage is dealt and whether or not you can continue. All of these are very minor tweaks, so I still want them. So, to break it down, it should go like this:

Easy : Double damage to enemies, Damage Received at 75%, Auto-High Block, Start with 5 Lives
Normal : Normal Damage, 3 Lives
Hard : Enemy Damage 75%, Double Damage Received, Lethal Traps, 3 Lives
Perfect : Enemy Damage 75%, Double Damage Received, Lethal Traps, 1 Life, No Continues.

Looking at that, I think I need to disable Perfect Mode when the player uses the Chapter Select that’ll be installed eventually. Starting at the last chapter on Perfect kind of ruins the point, no?

-Finally I worked out the mechanics of the hardest kind of trap, the Saws. Like I think I said previously, they are spinning blades that run across the ground get to the end and turn around. For the life of me I bashed on them, trying to figure out a way to have them without adding more variables (like how moving platforms work). The issue I was having was having the bloody thing know which way it was going. That would require a variable of some kind. Now add that to the fact that I have designs for 3 of these running concurrently and the whole thing began to collapse under the heavy weight of it own crapulence.
Until I figured it out of course. The issue isn’t turning a blade around, it’s all about turning it off. So when I started to consider that the solution presented itself. Basically, a blade only goes in one direction and has a turn on and turn off time like the spike traps ^. Then, I just stagger them. So one goes in a direction for a certain amount of time, shuts off and a different one turns on and goes the other way. If they’re lined up right it’s seamless. If I tie the whole thing to the underlying Trap Controller (which counts up to 200 and resets – giving a standardized way to control trap timing) when the cycle comes around the traps are all reset again.
This system also gives me the ability to screw the timing really bad/good. So I can have a blade go slower in one direction and fast in the other, and other messed up things like that. So yay. Good day of work I think.