KadeArchive / Kade-Engine

Kade Engine is a Competitive Rhythm Game engine rewrite for FNF with Quality of Life features included.
https://kadedev.github.io/Kade-Engine/
Apache License 2.0
408 stars 595 forks source link

Bug Report: Something from me, only help, nothing to update on recent kade engines #2013

Closed nintendofan44 closed 2 years ago

nintendofan44 commented 3 years ago

Its only for me, i think

so y'know sustain notes right?

it's about them

at ke 1.5.4

so

im using this from ke 1.7 on playstate.hx

                var holdArray:Array<Bool> = [controls.LEFT, controls.DOWN, controls.UP, controls.RIGHT];
                var stepHeight = (0.45 * Conductor.stepCrochet * FlxMath.roundDecimal(PlayState.SONG.speed, 2));

                notes.forEachAlive(function(daNote:Note)
                {
                    // instead of doing stupid y > FlxG.height
                    // we be men and actually calculate the time :)

                    if (!daNote.modifiedByLua)
                    {
                        if (PlayStateChangeables.useDownscroll)
                        {
                            if (daNote.mustPress)
                            {
                                daNote.y = (playerStrums.members[Math.floor(Math.abs(daNote.noteData))].y
                                    + 0.45 * ((Conductor.rawPosition - daNote.strumTime) / songMultiplier) * 
                                    (FlxMath.roundDecimal(PlayStateChangeables.scrollSpeed == 1 ? SONG.speed : PlayStateChangeables.scrollSpeed,
                                        2) )) 
                                    - daNote.noteYOff;
                            }
                            else
                                daNote.y = (strumLineNotes.members[Math.floor(Math.abs(daNote.noteData))].y
                                    + 0.45 * ((Conductor.rawPosition - daNote.strumTime) / songMultiplier) * (FlxMath.roundDecimal(PlayStateChangeables.scrollSpeed == 1 ? SONG.speed : PlayStateChangeables.scrollSpeed,
                                        2))) - daNote.noteYOff;
                            if (daNote.isSustainNote)
                            {
                                // Correct downscroll positioning
                                daNote.y -= daNote.height - stepHeight;

                                // If not in botplay, only clip sustain notes when properly hit, botplay gets to clip it everytime
                                if (!PlayStateChangeables.botPlay)
                                {
                                    if ((!daNote.mustPress || daNote.wasGoodHit || holdArray[Math.floor(Math.abs(daNote.noteData))])
                                        && daNote.y - daNote.offset.y * daNote.scale.y + daNote.height >= (strumLine.y + Note.swagWidth / 2))
                                    {
                                        // Clip to strumline
                                        var swagRect = new FlxRect(0, 0, daNote.frameWidth * 2, daNote.frameHeight * 2);
                                        swagRect.height = (strumLineNotes.members[Math.floor(Math.abs(daNote.noteData))].y
                                            + Note.swagWidth / 2
                                            - daNote.y) / daNote.scale.y;
                                        swagRect.y = daNote.frameHeight - swagRect.height;

                                        daNote.clipRect = swagRect;
                                    }
                                }
                                else
                                {
                                    var swagRect = new FlxRect(0, 0, daNote.frameWidth * 2, daNote.frameHeight * 2);
                                    swagRect.height = (strumLineNotes.members[Math.floor(Math.abs(daNote.noteData))].y
                                        + Note.swagWidth / 2
                                        - daNote.y) / daNote.scale.y;
                                    swagRect.y = daNote.frameHeight - swagRect.height;

                                    daNote.clipRect = swagRect;
                                }
                            }
                        }
                        else
                        {
                            if (daNote.mustPress)
                                daNote.y = (playerStrums.members[Math.floor(Math.abs(daNote.noteData))].y
                                    - 0.45 * ((Conductor.rawPosition - daNote.strumTime) / songMultiplier) * (FlxMath.roundDecimal(PlayStateChangeables.scrollSpeed == 1 ? SONG.speed : PlayStateChangeables.scrollSpeed,
                                        2))) + daNote.noteYOff;
                            else
                                daNote.y = (strumLineNotes.members[Math.floor(Math.abs(daNote.noteData))].y
                                    - 0.45 * ((Conductor.rawPosition - daNote.strumTime) / songMultiplier) * (FlxMath.roundDecimal(PlayStateChangeables.scrollSpeed == 1 ? SONG.speed : PlayStateChangeables.scrollSpeed,
                                        2))) + daNote.noteYOff;
                            if (daNote.isSustainNote)
                            {
                                if (!PlayStateChangeables.botPlay)
                                {
                                    if ((!daNote.mustPress || daNote.wasGoodHit || holdArray[Math.floor(Math.abs(daNote.noteData))])
                                        && daNote.y + daNote.offset.y * daNote.scale.y <= (strumLine.y + Note.swagWidth / 2))
                                    {
                                        // Clip to strumline
                                        var swagRect = new FlxRect(0, 0, daNote.width / daNote.scale.x, daNote.height / daNote.scale.y);
                                        swagRect.y = (strumLineNotes.members[Math.floor(Math.abs(daNote.noteData))].y
                                            + Note.swagWidth / 2
                                            - daNote.y) / daNote.scale.y;
                                        swagRect.height -= swagRect.y;

                                        daNote.clipRect = swagRect;
                                    }
                                }
                                else
                                {
                                    var swagRect = new FlxRect(0, 0, daNote.width / daNote.scale.x, daNote.height / daNote.scale.y);
                                    swagRect.y = (strumLineNotes.members[Math.floor(Math.abs(daNote.noteData))].y
                                        + Note.swagWidth / 2
                                        - daNote.y) / daNote.scale.y;
                                    swagRect.height -= swagRect.y;

                                    daNote.clipRect = swagRect;
                                }
                            }
                        }
                    }

only this btw no more code

image

and the sustain trails are like this, the trail ends are fine, but look at the trail itself

nintendofan44 commented 3 years ago

i just want a hint for it or something that can help a bit