quil

mister_m 2022-04-05T23:11:06.989329Z

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

Eric 2022-05-19T13:25:32.745579Z

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))