code-dot-org / dance-party

Renderer for the Dance game type. Based on p5.js and p5.play.js.
https://code-dot-org.github.io/dance-party/
13 stars 13 forks source link

Support functions/coroutines #546

Open islemaster opened 5 years ago

islemaster commented 5 years ago

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.

joshlory commented 5 years ago

💯 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.