mirror of
https://github.com/ninjamuffin99/Funkin.git
synced 2024-11-09 16:24:42 +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:
parent
63341f0bc9
commit
187706c71c
|
@ -23,9 +23,6 @@ class Conductor
|
|||
public static var lastSongPos:Float;
|
||||
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 function new()
|
||||
|
|
|
@ -34,7 +34,6 @@ class Note extends FlxSprite
|
|||
public var isSustainNote:Bool = false;
|
||||
|
||||
public var colorSwap:ColorSwap;
|
||||
public var noteScore:Float = 1;
|
||||
|
||||
public static var swagWidth:Float = 160 * 0.7;
|
||||
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 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 function new(strumTime:Float, noteData:Int, ?prevNote:Note, ?sustainNote:Bool = false)
|
||||
|
@ -145,7 +153,6 @@ class Note extends FlxSprite
|
|||
|
||||
if (isSustainNote && prevNote != null)
|
||||
{
|
||||
noteScore * 0.2;
|
||||
alpha = 0.6;
|
||||
|
||||
if (PreferencesMenu.getPref('downscroll'))
|
||||
|
@ -224,9 +231,9 @@ class Note extends FlxSprite
|
|||
}
|
||||
else
|
||||
{
|
||||
if (strumTime > Conductor.songPosition - Conductor.safeZoneOffset)
|
||||
{ // The * 0.5 is so that it's easier to hit them too late, instead of too early
|
||||
if (strumTime < Conductor.songPosition + (Conductor.safeZoneOffset * 0.5))
|
||||
if (strumTime > Conductor.songPosition - HIT_WINDOW)
|
||||
{ // * 0.2 if sustain note, so u have to keep holding it closer to all the way thru!
|
||||
if (strumTime < Conductor.songPosition + (HIT_WINDOW * (isSustainNote ? 0.2 : 1)))
|
||||
canBeHit = true;
|
||||
}
|
||||
else
|
||||
|
|
|
@ -2339,19 +2339,19 @@ class PlayState extends MusicBeatState
|
|||
|
||||
var isSick:Bool = true;
|
||||
|
||||
if (noteDiff > Conductor.safeZoneOffset * 0.9)
|
||||
if (noteDiff > Note.HIT_WINDOW * Note.BAD_THRESHOLD)
|
||||
{
|
||||
daRating = 'shit';
|
||||
score = 50;
|
||||
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';
|
||||
score = 100;
|
||||
isSick = false;
|
||||
}
|
||||
else if (noteDiff > Conductor.safeZoneOffset * 0.2)
|
||||
else if (noteDiff > Note.HIT_WINDOW * Note.SICK_THRESHOLD)
|
||||
{
|
||||
daRating = 'good';
|
||||
score = 200;
|
||||
|
|
Loading…
Reference in a new issue