- Home /
Read and interpret data from .txt in real time, line by line
I have a .txt file which has this format Note: 248,4,N,200 (offset, lane, object type, velocity scale)
Hold 512-775,0,H,200 (offset1-offset2,lane,object type, velocity scale)
Slide (600-L,3,S,200) offset1-direction,lane,object type, velocity scale
Each object type is spawned at the time of the offset minus the velocity scale and clicked at the time of the offset.
Holds are held down for the duration of the two offset perameters
Slides go left or right, and are clicked the same way Notes are.
All objects are to be read in order of offset (lowest to highest) until the highest offset has been achieved and the level ends
My questions: How do I read and parse the text file? How do I convert text file data to notes, holds, and slides which are displayed accordingly? How do I count total number of objects?