Wednesday, June 11, 2014

Oops I did it again

Just I did with ramps, I suddenly decided I needed a new gameplay element that throws off my previous design. This, kids, is why you actually plan things out.

This time it was moving platforms. You know, like many games have, a platform that moves up and down or side to side. Nothing revolutionary here. Although my design, for convenience, originally assumed that everything was on a strict grid. So I took some shortcuts by, for example, snapping your character to the grid when he was standing on a platform. And I also got to assume that the gridded static map tiles were the only things that the main character could collide with for "wall" collisions.
You can't tell from the static image, but these platforms are moving!

Suddenly these moving platforms could cause collisions at any point, not just on the exact grid lines. And the platforms aren't part of my tile map -- they're actually set up as "enemies".  So I had to go back and update my collision code to allow it to both function off the strict grid, as well as to provide a mechanism for enemy collisions to function as a "wall" collision.

That part was relatively easy. Then I ran into an issue where, when the platform was moving downward, you'd do a funny "bounce" thing, where the platform would move out from under you, then gravity would catch up and you'd drop to the platform, and immediately the platform would move out from under you again. It just looked dumb. So I had to rig up some code to "glue" you to the platform if you were standing on it (or clinging to the side of it, which I'll get to in a minute)

Really, it wasn't nearly as painful as the ramps, but it did require some changes to how things worked.

A few other things from the past week or two:

  • I added a "cling" ability that lets you hold onto a wall if you jump onto it. (I tried to get a screenshot of it, but on my laptop it requires simultaneously holding space (to cling), and Fn + alt + insert/PrtScrn, which my computer refused to do)
  • I've had a suggestion from a friend to rework how my limited-use items (slow-mo and portable respawn) work. He mentioned (quite accurately) that nobody will ever use the items, instead they'll save them the whole game, not knowing when they'll need them (he's right). So I'm considering new designs for how that works. I'm currently leaning toward a system where each time you pick one up, it increases your max number you can hold. And every few minutes (5? 10?) you'l regenerate one of the items that you used. So the only penalty for using them is that you'll have to wait to use them again.
  • At the suggestion from pretty much everyone, I've removed my countdown that occurs at the beginning of each level or respawn. I guess it was too much waiting. (Did any of you ever actually play through Ghosts n Goblins? I think I spent at least 12 years of my life watching that level intro each of the 8 thousand times that I died. My game is supposed to be painful, but not THAT kind of painful!)
  • Next up is the "slam" ability, which lets you slam straight downward from a jump instead of continuing forward. (I'm thinking it may also kill enemies, but I'm not sure about that yet)

No comments:

Metatile Designer

For the NES game, I'm building my levels out of 32x32 pixel metatiles.  What is a metatile?  The NES background tiles are 8x8 pixels, bu...