Read outside file and generate timeline trigger event - Rhythm Game
Hello! I want to try to create a mobile 3d rhythm game (Like Deemo or Cytus), and I kinda have an idea of how I'm going to approach it.
I want to make a data file (Outside of engine) that maybe look like this:
1.3s,Tapnote, X=100, Y=300 4.5s, Slidenote, X=150, Y=120
When the game start, it will read this outside file and spawn note actor based on the [time] and [what kind of note it is] and [locations] with the music.
How should I do to read an outside file like this and trigger spawn event based on time? (Maybe generate a timeline based on outside file?)
asked Nov 15 '18 at 05:20 PM in Blueprint Scripting
Recommend Rama's Victory Plugin (find it in the marketplace) for file I/O if you're doing a Blueprints-only project. Then you'll need a way to parse each line in the file if you don't already have one in that plugin. Then you'll need a way to ensure the timing of the music is exactly synced with the game time in seconds, This often falls out of sync because of differences in how long it takes to initialize objects on a per-instance basis. Maybe you can solve that problem by starting the Music sound cue only at the point at which the rhythm data is all finished loading and the rhythm handling Actor has finished constructing. Maybe on its Beginplay, add a short delay just to make sure, and then after THAT, start its timer AND the sound cue at the same time.
answered Nov 15 '18 at 06:47 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here