1
0
Fork 0
mirror of https://github.com/ninjamuffin99/Funkin.git synced 2025-04-15 17:14:33 +00:00

note hit, scoring windows & stricter sustain note holding

this is some big impact shit so feel it out first
This commit is contained in:
MtH 2021-09-08 19:28:11 +02:00
parent 63341f0bc9
commit 187706c71c
3 changed files with 15 additions and 11 deletions

View file

@ -23,9 +23,6 @@ class Conductor
public static var lastSongPos:Float; public static var lastSongPos:Float;
public static var offset:Float = 0; public static var offset:Float = 0;
public static var safeFrames:Int = 10;
public static var safeZoneOffset:Float = (safeFrames / 60) * 1000; // is calculated in create(), is safeFrames in milliseconds
public static var bpmChangeMap:Array<BPMChangeEvent> = []; public static var bpmChangeMap:Array<BPMChangeEvent> = [];
public function new() public function new()

View file

@ -34,7 +34,6 @@ class Note extends FlxSprite
public var isSustainNote:Bool = false; public var isSustainNote:Bool = false;
public var colorSwap:ColorSwap; public var colorSwap:ColorSwap;
public var noteScore:Float = 1;
public static var swagWidth:Float = 160 * 0.7; public static var swagWidth:Float = 160 * 0.7;
public static var PURP_NOTE:Int = 0; public static var PURP_NOTE:Int = 0;
@ -42,6 +41,15 @@ class Note extends FlxSprite
public static var BLUE_NOTE:Int = 1; public static var BLUE_NOTE:Int = 1;
public static var RED_NOTE:Int = 3; public static var RED_NOTE:Int = 3;
// SCORING STUFF
public static var safeFrames:Int = 10;
public static var HIT_WINDOW:Float = (safeFrames / 60) * 1000; // 166.67 ms hit window
// anything above bad threshold is shit
public static var BAD_THRESHOLD:Float = 0.8; // 125ms , 8 frames
public static var GOOD_THRESHOLD:Float = 0.55; // 91.67ms , 5.5 frames
public static var SICK_THRESHOLD:Float = 0.2; // 33.33ms , 2 frames
// anything below sick threshold is sick
public static var arrowColors:Array<Float> = [1, 1, 1, 1]; public static var arrowColors:Array<Float> = [1, 1, 1, 1];
public function new(strumTime:Float, noteData:Int, ?prevNote:Note, ?sustainNote:Bool = false) public function new(strumTime:Float, noteData:Int, ?prevNote:Note, ?sustainNote:Bool = false)
@ -145,7 +153,6 @@ class Note extends FlxSprite
if (isSustainNote && prevNote != null) if (isSustainNote && prevNote != null)
{ {
noteScore * 0.2;
alpha = 0.6; alpha = 0.6;
if (PreferencesMenu.getPref('downscroll')) if (PreferencesMenu.getPref('downscroll'))
@ -224,9 +231,9 @@ class Note extends FlxSprite
} }
else else
{ {
if (strumTime > Conductor.songPosition - Conductor.safeZoneOffset) if (strumTime > Conductor.songPosition - HIT_WINDOW)
{ // The * 0.5 is so that it's easier to hit them too late, instead of too early { // * 0.2 if sustain note, so u have to keep holding it closer to all the way thru!
if (strumTime < Conductor.songPosition + (Conductor.safeZoneOffset * 0.5)) if (strumTime < Conductor.songPosition + (HIT_WINDOW * (isSustainNote ? 0.2 : 1)))
canBeHit = true; canBeHit = true;
} }
else else

View file

@ -2339,19 +2339,19 @@ class PlayState extends MusicBeatState
var isSick:Bool = true; var isSick:Bool = true;
if (noteDiff > Conductor.safeZoneOffset * 0.9) if (noteDiff > Note.HIT_WINDOW * Note.BAD_THRESHOLD)
{ {
daRating = 'shit'; daRating = 'shit';
score = 50; score = 50;
isSick = false; // shitty copypaste on this literally just because im lazy and tired lol! isSick = false; // shitty copypaste on this literally just because im lazy and tired lol!
} }
else if (noteDiff > Conductor.safeZoneOffset * 0.75) else if (noteDiff > Note.HIT_WINDOW * Note.GOOD_THRESHOLD)
{ {
daRating = 'bad'; daRating = 'bad';
score = 100; score = 100;
isSick = false; isSick = false;
} }
else if (noteDiff > Conductor.safeZoneOffset * 0.2) else if (noteDiff > Note.HIT_WINDOW * Note.SICK_THRESHOLD)
{ {
daRating = 'good'; daRating = 'good';
score = 200; score = 200;