Forum rules - please read before posting.

Rhythm mini-game

edited September 25 in Technical Q&A

Hi, thought I'd ask this question before I get into it myself - I'm hoping to include some kind of rhythm-based minigame in a new AC game. I've been pondering the best way to do this. I believe rhythm-based games / syncing input and audio and animation are traditionally difficult to do in Unity. I've seen some plugins on the Unity store like 'Rhythm Starter' (which I've got) and 'Koreographer' which looks fancy, but if I can I'd like to try keep things in AC for neatness sakes and to avoid trying to hook 2 systems together.

I was thinking about using Timeline, but afaik that doesn't allow for user input, and is more (or exclusively?) for cutscenes? I haven't used Timeline a lot, I did use it for one cutscene but it confused me quite a bit. If Timeline could work, as it seems like it syncs whatever's on there, I'll look into it more. Just not sure how player input would factor into that, and I somehow think timeline plays just what's on the timeline and won't deviate or allow for an eg 'GOOD' or 'MISSED' result or playing different player animations based on their timing on inputs.

ActionLists could work but I'd probably need to make the music follow the player input as opposed to the other way around. I dunno, wondering if anyone's had success with timed music inputs. The risk is that things go out of sync and no way to bring back in sync. Could maybe split up the sound into chunks that retrigger every eg 16 beats, so that if something does go out of sync, it'll resync after 16 beats.

The point & click game 'Poco' had a great little rhythm game at the end. Starts at 50m45s:

Not quite sure yet how to recreate something similar in AC, if there's a way to check proximity of one object to a hotspot when clicked, or check if one object is overlapping another when clicked, and reward or punish based on that. I have a proximity script from a previous game that could maybe work.

I suspect it used eg Koreographer, but no way to tell.

Comments

  • The closest logic AC has to such mechanics would be the QTE system, which allows for input detection within a given time window. As each one is of a fixed duration however, you'd need to chain them together in parallel using an ActionList: Run in parallel Action followed by increasing Engine: Wait Actions, so that their own timings don't affect the others.

    For a proper rhythm game, however, I'd strongly recommend the use of either Timeline, or a dedicated asset.

    Timeline is certainly a viable option - it's essentially just a means of running code at a specific frame/timecode along a sequence - but it would need custom scripting.

  • You could maybe use signals inside timeline to trigger AC action lists. I use it for some audio synced minigame myself - I have signals inside timeline, sending signals to interact with AC triggers, which asks for player input

  • Thanks Chris, that's a pretty good idea, thanks, I may try that.
    Thanks fildagame - interesting! If you get a chance I'd love to see what your setup looks like please. I haven't got the hang of Timeline yet at all, but in principle I can understand what you're suggesting - at eg beats to the music, you have a 'send message' to turn AC triggers 'On' and 'Off'? And then whether the player presses a correct input at the right time when the trigger is on results in one thing, and pressing an input (or the incorrect input) when the trigger is off, results in nothing or some other result?

  • What I am doing is, I have empty object with signal receiver script and ACs trigger script ( no collision nothing - it will only be triggered if you call the signal )
    On this objects signal receiver, its setup so that if it receives signal, it has AC_Trigger.interact
    and this objects AC trigger has action list ( QTE with some time window for correct press )

    Inside timeline, I just signal when I need to trigger this action list - advantage here is that you can see your song visually so it is pretty simple to put the QTE exactly where you want to have them to respect for example beats etc

    It depends on your minigames design tho

    As for the rigidness of timeline, you are right, but I guess you could put player anims in separate timeline where he either plays correctly and another one where he plays incorrectly, and call it through that QTE action based on success//fail?

    Migh be also possible to have separate audio sources all playing its "songs" at once (player playing instrument wrong//player playing instrument right) having them all synced inside timeline and just change volume between them through AC action if you press QTE correctly or fail

  • Thanks so much for the insightful reply, @fildagame !! Ok, I think I have a much better idea of how you work it! Smart.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.