Fork me on GitHub

Does anyone know how I could implement a sort of "countdown" in quil? I'd like to have something drawn on a sort of time delay, starting from some sort of state flag at the top of my update-state function


I would think you could try something like having a timer in the sketch state like this:

{:timer (* 30 5) ...}
(That's 5 sec if your frame rate is 30.) And then in update-state you call a decrement function replacing that timer in state.
(defn countdown [state]
  (update state :timer dec))