Sound!


Some control cleanup in this release. Since the cat starts moving automatically, we don't need left/right controls (I suppose I might add them back in again to allow for solving multilevel phrases, but don't need them now). I also added a keyboard shortcut to turn the debug stuff on and off. Thanks to the magic of self-documenting event handlers, the help screen automatically shows the only the appropriate keys.

I've talked before about sound. For animation and games, it's like the frame to a picture -- completely unreasonable amount of improvement for the effort expended. So, while I was procrastinating on how to deal with game-over, I pulled in some of my sound stuff from QubeCat. I modified "mk-sound" to create an entry in the Store and adapted the "play" and "all-stop" functions to deal with that. With that, I was off to the races. I was just going to quickly re-use some of my sound effects from QubeCat, but actually went out and hunted down a few more to add where appropriate (thanks, Open Game Art!).

So... Game over. I don't know why this was so hard. I really had to force myself to tackle it. It's not like the game is done and the fun is about to be over or anything... The game, while now being a coherent enough experience that you can reasonably call it a game, is faaaaaaaar from done. Oh well.

So, in the world of Kipple, there are two things that can kill our hero. One is running out of time and the other is falling off the platforms. For the first, I finally gave in and created a state variable in hero (I guess I should properly say "state component"?). For now, it has three states -- run, fall and dead. While Kat is run-ing, everything works -- animation, collision detection, etc. But when sys-timeout? discovers that the timer has expired, it shifts Kat over to 'fall state. In that state, there's no longer any collision detection, and so gravity has it's way with him. It's the same thing as what happens when Kat leaps and there's no platform to intercept -- he just keeps falling downwards.

Now, sys-lose? gets a look-in. Once Kat has fallen past a certain margin (screen height plus one quarter of that again), it moves his state to "dead". And now, it's unmistakably "game over". I turn off the timer display and show the "game over" instead.

In the near and glorious future, I will probably change sys-lose? to be a bit more general, because I'm going to have stuff that falls off the platforms when Kat runs into it and so on. I can use that same check to remove those things as well.

Even though it's been a bit of a slog, I'm quite happy with progress so far... The game, as it stands now, is in a better state of completion than most of my previous entries. It needs a lot of polishing, but I should have some time to do that. I'm really looking forward to the possibility of advancing a superior entry!

Files

kiplkat-html5.zip Play in browser
Version 2 9 days ago

Get Kipple Kat

Leave a comment

Log in with itch.io to leave a comment.