PyaKura wrote:
Also some food for thought here.
Looks like even after 2 years the vast majority still agrees that 2 combo per LN is the best style. not surprised. why would it even ever work otherwise
Implementation:
Each LN during gameplay has an integer state with 3 levels: 0, 1, 2
0 - was never triggered yet
1 - was triggered and is being held
2 - was triggered and released
When it spawns, it starts with state 0.
If you press a key on the LN's column within judgement timing range from the LN's start time, and its state is 0, then:
- the state will become 1.
- you get a judgement notification with your skin (just like pressing a regular note)
- you get combo incremented +1
- judgement gets calculated into the total accuracy like with regular notes
If you release a key on the LN's column within judgement timing range from the LN's end time, and its state is 1, then:
- the state becomes 2.
- you get a judgement notification with your skin (just like pressing a regular note, except now you're releasing)
- you get combo incremented +1
- judgement gets calculated into the total accuracy like with regular notes
If you release a key on the LN's column, and its state is 1, but you're not within timing range for LN's intended release time, then:
- state becomes 2.
- you get a judgement notification with your skin for a miss.
- combo resets to zero.
- miss gets calculated into the total accuracy.
(since the LN is state 2 now, it will be impossible to re-press it anymore)
This is pretty much all the event listeners you need. Now for just main loop things:
As the chart goes on, if LN reaches a point where its start time + judgement timing range are "below" the current time, and the state is 0, that means the player failed to press this LN at all (pressed too late), so:
- state becomes 2.
- you get a judgement notification with your skin for a miss (and you get 2 misses from this, since you failed the start you won't be able to release either)
- combo resets to zero.
- miss gets calculated into the total accuracy.
(since the LN is state 2 now, it will be impossible to press it anymore)
If the LN reaches a point where its end time + judgement timing range are "below" the current time, and the state is 1, that means the player successfully pressed the LN, but forgot to release it in time, so:
- state becomes 2.
- you get a judgement notification with your skin for a miss.
- combo resets to zero.
- miss gets calculated into the total accuracy.
(the LN is always outside of the playfield at this point)
This pretty much covers all situations. Should be easy to implement. Just need one basic type and some conditional statements.