Day 10

krasov - So 22 Oktober 2017 - lisp, game jam

Last-Minute-Effort

There are officially 15 hours 38 minutes and 23 seconds left. Not a whole lot, but let's try anyway.

First thing to do, implement animations/state transitions. As I mentioned yesterday, I find it generally hard to conceptualize such things (despite or maybe because of a strong tendency to conceptual thinking). My momentary solutions is to maintain a list active-animations in my game state, which is a list of subclasses of an abstract base class animation. This base class defines three generic methods:

(defgeneric animate (animation state))
(defgeneric draw (animation state))
(defgeneric post-animation (animation state))

Here state is a variable holding the game state. The first method is called in update-world and does some actions depending on the subclass, so there's one subclass for every kind of animation. The animate method return a boolean that indicates whether the animation is finished or not. If it is finished it is removed from active-animations and the method post-animation is called. Note that the animate method can itself push new animations to the front of active-animations, so that one animation can trigger another animation. Finally, draw is called on each rendering step.

In this way I hope to be able to piece together the logic of the game, without having to write one huge game logic function.

It Didn't End Well

I did manage to submit something that looks like a game just five minutes before the deadline. There is no game play, and it is not a game. Also, because I was running out of time, I had to adopt a 'whatever-works mentality'. That produced some truly horrible code. But I don't care. It's very later (or rather very early). I failed. I don't care. Good night.