Wednesday, January 9, 2013

Day 10 - (alive || dead)

10 days already? Geez. So technically I'm 1/3 done with this game. I'd would say I'm not in terrible shape, except I know the unknowns will prove me wrong.

Tonight I made my stompy spike object deadly. I was able to attach a physics primitive that gets moved appropriately, and added collision tests to that vs the ships in the game (of which there is 1). If they collide, the ship is marked 'dead' and attached to the spikes. The idea here is to have the spikes impale the ship, and kill input so you feel helplessly stuck as your ship carcass gets smashed by spikes.

I've re-purposed the light shining down to show when the ship is alive/dead, for debugging. Green light = alive, red light = dead :)

To polish this up the physics shape on the spikes will need to be adjusted (from a sphere to a box), and the ship should be attached by projecting the ship position onto the spike plane, and raising it off by the ship radius. Then, tighten the physics geometry so there isn't a noticeable 'pop' when the transition happens. Or, even better, kill the input (so the ship is 'dead'), and don't do a rigid attachment until the spikes 'move into' the ship and the ship is a certain distance from the spike plane. This latter solution will look best - you get killed, which freezes you in place, then I can have the spikes look like they impale you until the ship reaches the bottom of the spikes, then you get stuck to it.

Additionally, the far extent of the spikes should be limited to the ship's radius so you don't intersect the opposing wall. To polish this up, keep the current behavior (so it penetrates the wall as it does now) - *unless* there is a ship attached, in which case don't penetrate the wall all the way. That will make it look super slick.

Also, I think the camera will need a little bit of jiggle in this state - being attached to the spikes gives a pretty jarring camera movement - if the camera is a little looser/springy, that can make it feel better.

I'm hesitating to show it to you without the slickness implemented, but in the interest of fully documenting my progress and possibly teaching someone out there something, I'll show what it looks like right now (horrible) so maybe you can appreciate the work game devs do to make games awesome :)


No comments:

Post a Comment