code-dot-org / dance-party

Renderer for the Dance game type. Based on p5.js and p5.play.js.

Home Page:https://code-dot-org.github.io/dance-party/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support functions/coroutines

islemaster opened this issue · comments

I want to be able to define a sequence of events that can start (or restart) at different points in the song, so I can reuse code.

What I really want is a way to say:

Doing the breakdown means:
  After 0 measures
    All dancers do star left forever
  After 1 measures
    All dancers do kick right once

After 6 measures
  Do the breakdown

After 12 measures
  Do the breakdown

Which would fire events at measures 6, 7, 12, and 13.

💯 this would be super cool!

@mikeharv requested something similar, to make functions feel more useful in Dance Party. It could potentially connect to the "Getting Loopy" unplugged lesson.