Hellooooo !
I'm stuck up on is the best way to chart out the "notes"
I've got some rhythmic game experiences.
Firstly, if you keep a XML file format :
And, the first think I see the is the "<time>1:50:12</time>"...
For simpler handle of time, you may use :
- Milliseconds timestamp ;
- Seconds timestamp ;
- Beat timestamp (a note on the first beat, a note on the second, etc) ;
Having note's time offset like will this be a pain : It will be easy done with string.match, but it will be slow, and (normally) these files will be edited with a third-party program (an editor~), so they don't need to be so clear for a humain.
Secondly, if you want something else :
You can use Marshal (like I call it) file : this is simply a Lua table saving into a file (loading need some security), and are very easy to use, but not the fastest (Lua need to parse the file, and then compile it).
You can also use textual file, like osu! do. Each line can be a note :
Code: Select all
-- Offset in ms, type (hold or single), lane
11012,2,4
Can be parsed easily with a string splitter function (Google : lua split string).
Or, you have all kind of file format that can suit (if you don't really target the efficiency) : JSON, YAML, etc.
and keep a updatable database of songs
Same as above, you can use the file format that you want, if this fit your needs !
I'm guessing coding some kind of editor would be pretty difficult
Not really. This is just GUI. The difficulty come from the GUI. How to do an efficient GUI ? Etc etc. It's not the big problem.
Also just curious if there's anything code wise I should be doing to prevent desyncs, etc
For desyncs, you have a simple first thing : an user defined offset, which is applied on all note time offset. You can also use the position of the audio source :
Source:tell() rather than a timer, so you will be at the source time, and not at a time which can be desync'ed.
And, finally, this is the place for this kind of questions
I hope that my answer will be useful