Sprites!
Well, today was sprite day. Well, actually it was... (checks log) control events, help/pause screen, treats working, sprite and collision detection fix day! Maybe let's unpack that a bit...
I really want to get the basic functionality of the game finished as soon as possible so that I have something playable. so that informed my choices as I ran down the punch list. Although I made a few detours, starting with a... help screen?
As I was looking at the keyboard event setup, it occurred to me I could make the control scheme "self-documenting" to a certain extent if I just added a bit of metadata to the key record. I added "label" (for a short description) and "help" for a longer one. Then I created a `draw-help` function that runs through the key assignments. When I play-tested it, it worked great, except for one small problem -- the game kept going while the help was displayed.
I futzed around with things for a little bit, then it occurred to me that I could just set a flag in the State Vector and use it to control if `animate` would run. That worked like a charm -- with the help displayed and animate being skipped, nothing happened in-game, so it was a straight pause. This will need some revision later -- the timer doesn't work with it, for one thing. But I think it won't be too bad.
Since I had made a topic in the Game Jam comments about Canned Heat, I write up a very quick article about the self-documenting controls help. I am thinking I will try to drop a little howto or hint every day. Maybe someone else will try it out...
The object of the game is to run for as long as possible (and cause as much damage as possible...), so I needed a timer to indicate how much time the player had left. Got a little bit impure and make a `timer` component of the `hero` entity, which tracks the timer start and limit. Idea is that when elapsed time exceeds seconds in limit, the game is over.
I added a "treat" object (as in "cat treat") which will grant extra time when the Kat runs over them. I did a fairly complicated implementation at first, then I realized I could just add the number of seconds to the limit, which worked... a treat! I'm using the score property of the treat entity for this. This will make it fit in with my evolving standard conventions and also gives me some latitude for special treats later, that maybe do other things.
The big things though were sprites. I've always found them a bit troublesome, although I've generally horsed my way around to some kind of accommodation. But these sprites... Well, if you will otherwise forgive the rough artwork, they were a freakin' dream compared to what I've dealt with before. I added the convention `age` component to my entities that had animated sprites and suddenly I had a frame clock! I wrote a simple `mk-sprite` function that stores the sprite map data, including frame specifications. Then one equally simplistic `draw-sprite` function later I had animated sprites! Pixar isn't going to come a' knocking, but they look pretty good and were very simple to set up.
I also got the itch.io `butler` program installed and was able to use it to semi-automatically update my build. I'm hoping this will make things a lot faster when I'm trying to kick out bugfixes towards the end...
All in all, I got a lot done today -- 9 out of the 12 items on my "must have" punchlist. If I can get those sorted out tomorrow morning (say), then I'm on track for not just having a working game, but a very playable (and perhaps even polished?) game at the end of the jam. Well, I can hope!
Get Kipple Kat
Kipple Kat
Entry for 2024 Autumn Lisp Game Jam.
Status | Prototype |
Author | oofoe |
Genre | Platformer |
Tags | Cats, Endless Runner |
More posts
- Hotwash38 days ago
- And now... Fireworks!44 days ago
- Normalization45 days ago
- Editing Levels46 days ago
- Breaking Bad...48 days ago
- Kipple49 days ago
- Sound!50 days ago
- Bouncin'...52 days ago
Leave a comment
Log in with itch.io to leave a comment.