Log In  

Cart #26269 | 2016-08-01 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
7

Controls
arrows: validate the notes
O + up/down: adjust the synchronization offset
X + up/down: adjust the hi-speed
O + X: hide/show debug

0.2
Small update here :

  • Optimizing the rendering by caching arrows gradients in the spritesheet
  • Added long notes
  • Added combo counter
  • Notes pattern is defined by a multiline string (much like a stepfile)

0.1

Cart #26171 | 2016-07-30 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
7

Hi,

So this is my first pico-8 project, a DDR clone.

I made this mainly to test if it was possible to synchronize gameplay and music in pico-8 before getting my hands dirty with some custom rhythm games experiments.
And yes, it works !

Currently, there isn't much to play with, only the first seconds of Mermaid Girl with a random pattern that will loop forever.

P#26175 2016-07-30 18:05 ( Edited 2016-10-25 01:44)

This is an awesome idea, but the only song it has is really difficult. -u-

P#26286 2016-08-01 18:42 ( Edited 2016-08-01 22:42)

Great proof of concept. I like how it does a soft-mix with consistent patternwork. I was kind of going for something like that with situataional modifiers - like odd numbers of steps (5/7) doing an L/R flip, and even numbers doing an up/down one.

Glad I'm not the only one interested in Pico-DDR. We're up to three now!

So, what do you think about scripting layers of a song together, and then modifying their respective layers - and then making the difficulties of the charts correlate to the different layers of the song? So, let's say the "beginner" layer is SC1, and it has a low tempo / high "speed" setting (like 4x that of the core melody), "light" is a rhythm layer, "medium" is a melody layer, and "hard" is the percussion layer (the highest tempo / lowest "speed" setting)... then just assign a pattern modifier based on the relative song ID (first song has simplest patternwork, last song has most complex, but not a complete trainwreck)?

You can reuse tracks/layers at different tempos too, given how you have speed adjustment set up, and how most music shares similar timing patterns. So you can compose a music ID that has SFX IDs at speeds like 6/12/24/48 - and the entire thing will loop constantly until the "48 layer" is finished - so the 6 layer can be a simple percussion loop, the 12 can be your rhythm layer, the 24 your melody, and the 48 the slow, backdrop layer. With this, you can mash a full verse per music ID, then 4 of those can be a full DDR-length tune.

P#26294 2016-08-01 23:15 ( Edited 2016-08-02 04:06)

@Connorses

Thanks! As I'm still working on the engine, the current song is only here for testing and easier charts will be coming when the project will be more advanced.

@TonyTheTGR

I didn't planned to generate the stepchart and the music on the fly, but this could be a nice feature considering the memory limitation.
I already made some kind of SFX buffer that I fill with the music every X beats. Currently it only works at a constant speed, so I'll need to improve it to make it handle different SFX speeds.
But having random songs generated from a common set of SFX could be really fun.

I think I'll try to look into it once I got a complete song with 2 or 3 difficulties.

P#26314 2016-08-02 08:36 ( Edited 2016-08-02 12:36)

Hey this is great! I am new to Pico and wanted to try a rhythm game myself, but have been stuck with the music sync. I can't quite see what you are doing in the code to try and sync things up, and i am actually really curious. My attempt was to try and play the drums by calling the SFX i wanted for each drum on _update() and work with the 30fps. But it seem uneven even if i do it that way. I probably just have more to learn. But thanks for your work! I'll keep watching this, I need to borrow some of it to figure out my dance game

P#31514 2016-10-22 23:36 ( Edited 2016-10-23 03:36)

WHOA NELLY ! That's way too fast for me and I suspect a few other folk.

How about a starting level, Easy, Medium, Insane ? :)

P#31519 2016-10-23 01:39 ( Edited 2016-10-23 05:39)

gcentauri: The "music speed" is literally the count of programming steps between notes played. SO, combine this with the 16 px space per arrow/tile, and this is the number of frames (divided by two) that the arrows move a pixel.

Just make the steps-per-scroll rate equal that of the music speed. :)

P#31606 2016-10-23 19:59 ( Edited 2016-10-23 23:59)

Tony: I appreciate your answer, but i think my problem is slightly different. I may end up having to use your approach anyway, but i was hoping to require the player to actually tap buttons in time with the music, without a graphical cue. In your version, as long as the player presses the buttons when the arrows are in the right place, it doesn't matter if the graphics are out of sync with the music.

what i have noticed is that just using music speed on pico8 is unreliable and tends to drift. here's my game so far,

Cart #31664 | 2016-10-24 | Code ▽ | Embed ▽ | No License

to demonstrate, I have a bass drum sound effect and the moon beating being triggered if the time counter T is a multiple of 15. This is in the _DRAW() function

if (t%15 == 0) then 
  moonbeat()
else moon_offbeat() 

simultaneously, i have a high metronome sound as music pattern 3, with a sound effect speed of 15. after less than a minute they become out of sync. The moon stays in sync with the drum because they are being triggered by the _draw function.

if my game logic to decide if the player steps on the right beat uses my frame count T, i won't be able to use the MUSIC() function reliably. am i seeing this right? i'm worried i'm making this too hard for myself.

P#31665 2016-10-24 13:41 ( Edited 2016-10-24 17:41)

Is it those RTA functions i need? I assume that stands for real-time-audio right?

it was starting to seem like i might need to write my own music playing system to stay in sync, but maybe you've already done it here?

I can't tell if your arrows are in sync or not, because it moves too fast ;) maybe i'll have to play around with it more and see what i can figure out

P#31666 2016-10-24 13:52 ( Edited 2016-10-24 17:52)

Trying out your Indian Dancer, Gcentauri. For the first sound in your program, to make it sound deeper like a real tom tom, change the "4" to a zero.

F 1053

Interesting code, going to glean through it and see how you are able to detect beat of audio. :)

P#31674 2016-10-24 16:05 ( Edited 2016-10-24 20:06)

thanks dw817. i haven't really been able to detect the audio beat, i was wondering about using peek() to see if i could do that, but for now i just thought i could tie the beat to the frame update and call it good. even if the framerate drops, at least the beat stays in sync with it. it'll just sound like the rhythm hiccuped.

the code so far is nothing real, i got stuck on the beat part and haven't been able to progress much. probably going to just draw more sprites to animate while i try to figure it out.

P#31681 2016-10-24 17:01 ( Edited 2016-10-24 21:01)

I think this fellow has managed to do it, perfect beat all the way.

https://www.lexaloffle.com/bbs/?tid=27904

P#31703 2016-10-24 21:44 ( Edited 2016-10-25 01:44)

[Please log in to post a comment]

Follow Lexaloffle:          
Generated 2023-01-29 16:46:07 | 0.019s | Q:31