JordanSantiagoYT / FNF-JS-Engine

JS Engine is basically Psych Engine but with (almost) no botplay lag and NEW features!
Apache License 2.0
43 stars 27 forks source link

Icon Bop doesn't stretch, it just goes up in scale. #307

Closed TheKamboy closed 3 months ago

TheKamboy commented 4 months ago

Describe your bug here. Mind you, if you are modding, please try testing your bug in a clean version of the engine instead, this ensures the bug is actually caused by the engine itself. Also, if you're using an older version of JSE, please try the latest action build in the Actions tab or the latest release build. The issue has probably been fixed since that version. Oh yeah, and also be sure to check the pinned 'JS Engine: Known Issues' issue, to double check if your issue hasn't already been found!

I don't know how else to describe it. Here's a video to show what is going on:

https://github.com/JordanSantiagoYT/FNF-PsychEngine-NoBotplayLag/assets/89111294/d92bff0e-9599-4750-b716-715930dbb938

Command Prompt/Terminal/Crash logs (if existing)

No response

Have you identified any steps to reproduce the bug? If so, please describe them below in as much detail as possible. Use images if possible.

No response

Are you modding a build from source or with Lua?

Lua

What is your build target?

Windows

Did you edit anything in this build? If so, mention or summarize your changes.

no

If you use 1.12.0 or earlier, did you have Optimized Chart Loading turned on?

None

Did you check for any similar issues to what you're reporting? Check, then come back here. If there is a similar issue, then do not report the issue, otherwise it will be marked as a duplicate.

Yes

JordanSantiagoYT commented 4 months ago

which icon bop type are you using? also, this should be expected because image

TheKamboy commented 4 months ago

That was just a song I used to show the issue, it happens with other songs. I'm using a custom icon bop script but it didn't break like what's going on right now. I even tested with the built in icon bops and the issue still persists.

JordanSantiagoYT commented 4 months ago

show me a video of this happening on a slower song, like 200-300BPM

JordanSantiagoYT commented 4 months ago

or more like 100-200

TheKamboy commented 4 months ago

https://github.com/JordanSantiagoYT/FNF-PsychEngine-NoBotplayLag/assets/89111294/3d476061-fe74-4579-b761-baab1b9ba530

TheKamboy commented 4 months ago

oops i sent the wrong video

https://github.com/JordanSantiagoYT/FNF-PsychEngine-NoBotplayLag/assets/89111294/1628a00a-07f6-4782-8c14-9e1a451b81c2

TheKamboy commented 4 months ago

theres also this going on too image

JordanSantiagoYT commented 4 months ago

theres also this going on too image

that's because of the note recycling + sorting system, not much i can do about that

JordanSantiagoYT commented 4 months ago

oops i sent the wrong video

guh.mp4

also this is still the wrong video because the icons ARE stretching well i did see the other one but idk what's causing it

TheKamboy commented 4 months ago

Man I'm stupid the one I said was wrong was the right one the video I sent to correct it is a video showing what its supposed to look like in old version. No scaling when its stretching

TheKamboy commented 4 months ago

since there has been no updates im just gonna downgrade for the time being

TheKamboy commented 4 months ago

@JordanSantiagoYT github is being shit and won't let me make a pull request but i formatted the icon bop script to make it easier to find the bug

    public function bopIcons(?bopBF:Bool = false)
    {
        iconBopsThisFrame++;
        if (ClientPrefs.iconBopWhen == 'Every Beat')
        {
            if (ClientPrefs.iconBounceType == 'Dave and Bambi') {
                final funny:Float = Math.max(Math.min(healthBar.value,(maxHealth/0.95)),0.1);

                //health icon bounce but epic
                if (!opponentChart)
                {
                    iconP1.setGraphicSize(Std.int(iconP1.width + (50 * (funny + 0.1))),Std.int(iconP1.height - (25 * funny)));
                    iconP2.setGraphicSize(Std.int(iconP2.width + (50 * ((2 - funny) + 0.1))),Std.int(iconP2.height - (25 * ((2 - funny) + 0.1))));
                } else {
                    iconP2.setGraphicSize(Std.int(iconP2.width + (50 * funny)),Std.int(iconP2.height - (25 * funny)));
                    iconP1.setGraphicSize(Std.int(iconP1.width + (50 * ((2 - funny) + 0.1))),Std.int(iconP1.height - (25 * ((2 - funny) + 0.1))));
                }
            }
            if (ClientPrefs.iconBounceType == 'Old Psych') {
                iconP1.setGraphicSize(Std.int(iconP1.width + 30));
                iconP2.setGraphicSize(Std.int(iconP2.width + 30));
            }
            if (ClientPrefs.iconBounceType == 'Strident Crisis') {
                final funny:Float = (healthBar.percent * 0.01) + 0.01;

                //health icon bounce but epic
                iconP1.setGraphicSize(Std.int(iconP1.width + (50 * (2 + funny))),Std.int(iconP2.height - (25 * (2 + funny))));
                iconP2.setGraphicSize(Std.int(iconP2.width + (50 * (2 - funny))),Std.int(iconP2.height - (25 * (2 - funny))));

                iconP1.scale.set(1.1, 0.8);
                iconP2.scale.set(1.1, 0.8);

                FlxTween.angle(iconP1, -15, 0, Conductor.crochet / 1300 * gfSpeed, {ease: FlxEase.quadOut});
                FlxTween.angle(iconP2, 15, 0, Conductor.crochet / 1300 * gfSpeed, {ease: FlxEase.quadOut});

                FlxTween.tween(iconP1, {'scale.x': 1, 'scale.y': 1}, Conductor.crochet / 1250 * gfSpeed / playbackRate, {ease: FlxEase.quadOut});
                FlxTween.tween(iconP2, {'scale.x': 1, 'scale.y': 1}, Conductor.crochet / 1250 * gfSpeed / playbackRate, {ease: FlxEase.quadOut});
            }
            if (ClientPrefs.iconBounceType == 'Plank Engine') {
                iconP1.scale.x = 1.3;
                iconP1.scale.y = 0.75;
                iconP2.scale.x = 1.3;
                iconP2.scale.y = 0.75;
                FlxTween.cancelTweensOf(iconP1);
                FlxTween.cancelTweensOf(iconP2);
                FlxTween.tween(iconP1, {"scale.x": 1, "scale.y": 1}, Conductor.crochet / 1000 / playbackRate, {ease: FlxEase.backOut});
                FlxTween.tween(iconP2, {"scale.x": 1, "scale.y": 1}, Conductor.crochet / 1000 / playbackRate, {ease: FlxEase.backOut});
                if (curBeat % 4 == 0) {
                    iconP1.offset.x = 10;
                    iconP2.offset.x = -10;
                    iconP1.angle = -15;
                    iconP2.angle = 15;
                    FlxTween.tween(iconP1, {"offset.x": 0, angle: 0}, Conductor.crochet / 1000 / playbackRate, {ease: FlxEase.expoOut});
                    FlxTween.tween(iconP2, {"offset.x": 0, angle: 0}, Conductor.crochet / 1000 / playbackRate, {ease: FlxEase.expoOut});
                }
            }
            if (ClientPrefs.iconBounceType == 'New Psych') {
                iconP1.scale.set(1.2, 1.2);
                iconP2.scale.set(1.2, 1.2);
            }
            //you're welcome Stefan2008 :)
            if (ClientPrefs.iconBounceType == 'SB Engine') {
                if (curBeat % gfSpeed == 0) {
                    if (curBeat % (gfSpeed * 2) == 0) {
                        iconP1.scale.set(0.8, 0.8);
                        iconP2.scale.set(1.2, 1.3);

                        iconP1.angle = -15;
                        iconP2.angle = 15;
                    } else {
                        iconP2.scale.set(0.8, 0.8);
                        iconP1.scale.set(1.2, 1.3);

                        iconP2.angle = -15;
                        iconP1.angle = 15;
                    }
                }
            }

            if (curBeat % gfSpeed == 0 && ClientPrefs.iconBounceType == 'Golden Apple') {
                curBeat % (gfSpeed * 2) == 0 * playbackRate ? {
                iconP1.scale.set(1.1, 0.8);
                iconP2.scale.set(1.1, 1.3);

                FlxTween.angle(iconP1, -15, 0, Conductor.crochet / 1300 / playbackRate * gfSpeed, {ease: FlxEase.quadOut});
                FlxTween.angle(iconP2, 15, 0, Conductor.crochet / 1300 / playbackRate * gfSpeed, {ease: FlxEase.quadOut});
                } : {
                    iconP1.scale.set(1.1, 1.3);
                    iconP2.scale.set(1.1, 0.8);

                    FlxTween.angle(iconP2, -15, 0, Conductor.crochet / 1300 / playbackRate * gfSpeed, {ease: FlxEase.quadOut});
                    FlxTween.angle(iconP1, 15, 0, Conductor.crochet / 1300 / playbackRate * gfSpeed, {ease: FlxEase.quadOut});
                }

                FlxTween.tween(iconP1, {'scale.x': 1, 'scale.y': 1}, Conductor.crochet / 1250 / playbackRate * gfSpeed, {ease: FlxEase.quadOut});
                FlxTween.tween(iconP2, {'scale.x': 1, 'scale.y': 1}, Conductor.crochet / 1250 / playbackRate * gfSpeed, {ease: FlxEase.quadOut});
            }
            if (ClientPrefs.iconBounceType == 'VS Steve') {
                if (curBeat % gfSpeed == 0)
                {
                    curBeat % (gfSpeed * 2) == 0 ?
                    {
                        iconP1.scale.set(1.1, 0.8);
                        iconP2.scale.set(1.1, 1.3);
                        //FlxTween.angle(iconP2, -15, 0, Conductor.crochet / 1300 * gfSpeed / playbackRate, {ease: FlxEase.quadOut});
                        //FlxTween.angle(iconP1, 15, 0, Conductor.crochet / 1300 * gfSpeed / playbackRate, {ease: FlxEase.quadOut});
                    }
                    : {
                        iconP1.scale.set(1.1, 1.3);
                        iconP2.scale.set(1.1, 0.8);
                        FlxTween.angle(iconP1, -15, 0, Conductor.crochet / 1300 * gfSpeed / playbackRate, {ease: FlxEase.quadOut});
                        FlxTween.angle(iconP2, 15, 0, Conductor.crochet / 1300 * gfSpeed / playbackRate, {ease: FlxEase.quadOut});

                    }

                    FlxTween.tween(iconP1, {'scale.x': 1, 'scale.y': 1}, Conductor.crochet / 1250 * gfSpeed / playbackRate, {ease: FlxEase.quadOut});
                    FlxTween.tween(iconP2, {'scale.x': 1, 'scale.y': 1}, Conductor.crochet / 1250 * gfSpeed / playbackRate, {ease: FlxEase.quadOut});
                }
            }
        }
        else if (ClientPrefs.iconBopWhen == 'Every Note Hit')
        {
            iconBopsTotal++;
            if (ClientPrefs.iconBounceType == 'Dave and Bambi') {
                final funny:Float = Math.max(Math.min(healthBar.value,(maxHealth/0.95)),0.1);

                //health icon bounce but epic
                if (!opponentChart)
                {
                    if (bopBF) iconP1.setGraphicSize(Std.int(iconP1.width + (50 * (funny + 0.1))),Std.int(iconP1.height - (25 * funny)));
                    iconP2.setGraphicSize(Std.int(iconP2.width + (50 * ((2 - funny) + 0.1))),Std.int(iconP2.height - (25 * ((2 - funny) + 0.1))));
                } else {
                    if (!bopBF) iconP2.setGraphicSize(Std.int(iconP2.width + (50 * funny)),Std.int(iconP2.height - (25 * funny)));
                    else iconP1.setGraphicSize(Std.int(iconP1.width + (50 * ((2 - funny) + 0.1))),Std.int(iconP1.height - (25 * ((2 - funny) + 0.1))));
                    }
            }
            if (ClientPrefs.iconBounceType == 'Old Psych') {
                if (bopBF) iconP1.setGraphicSize(Std.int(iconP1.width + 30), Std.int(iconP1.height + 30));
                else iconP2.setGraphicSize(Std.int(iconP2.width + 30), Std.int(iconP2.height + 30));
            }
            if (ClientPrefs.iconBounceType == 'Strident Crisis') {
                final funny:Float = (healthBar.percent * 0.01) + 0.01;

                iconP1.setGraphicSize(Std.int(iconP1.width + (50 * (2 + funny))),Std.int(iconP2.height - (25 * (2 + funny))));
                iconP2.setGraphicSize(Std.int(iconP2.width + (50 * (2 - funny))),Std.int(iconP2.height - (25 * (2 - funny))));

                FlxTween.cancelTweensOf(iconP1);
                FlxTween.cancelTweensOf(iconP2);

                FlxTween.angle(iconP1, -15, 0, Conductor.crochet / 1300 * gfSpeed / playbackRate, {ease: FlxEase.quadOut});
                FlxTween.angle(iconP2, 15, 0, Conductor.crochet / 1300 * gfSpeed / playbackRate, {ease: FlxEase.quadOut});

                FlxTween.tween(iconP1, {'scale.x': 1, 'scale.y': 1}, Conductor.crochet / 1250 * gfSpeed / playbackRate, {ease: FlxEase.quadOut});
                FlxTween.tween(iconP2, {'scale.x': 1, 'scale.y': 1}, Conductor.crochet / 1250 * gfSpeed / playbackRate, {ease: FlxEase.quadOut});
            }
            if (ClientPrefs.iconBounceType == 'Plank Engine') {
                iconP1.scale.x = 1.3;
                iconP1.scale.y = 0.75;
                FlxTween.cancelTweensOf(iconP1);
                FlxTween.tween(iconP1, {"scale.x": 1, "scale.y": 1}, Conductor.crochet / 1000 / playbackRate, {ease: FlxEase.backOut});
                iconP2.scale.x = 1.3;
                iconP2.scale.y = 0.75;
                FlxTween.cancelTweensOf(iconP2);
                FlxTween.tween(iconP2, {"scale.x": 1, "scale.y": 1}, Conductor.crochet / 1000 / playbackRate, {ease: FlxEase.backOut});
                if (iconBopsTotal % 4 == 0) {
                    iconP1.offset.x = 10;
                    iconP1.angle = -15;
                    FlxTween.tween(iconP1, {"offset.x": 0, angle: 0}, Conductor.crochet / 1000 / playbackRate, {ease: FlxEase.expoOut});
                    iconP2.offset.x = -10;
                    iconP2.angle = 15;
                    FlxTween.tween(iconP2, {"offset.x": 0, angle: 0}, Conductor.crochet / 1000 / playbackRate, {ease: FlxEase.expoOut});
                }
            }
            if (ClientPrefs.iconBounceType == 'New Psych') {
                if (bopBF) iconP1.scale.set(1.2, 1.2);
                else iconP2.scale.set(1.2, 1.2);
            }
            //you're welcome Stefan2008 :)
            if (ClientPrefs.iconBounceType == 'SB Engine') {
                if (iconBopsTotal % 2 == 0) {
                    if (iconBopsTotal % 2 == 0) {
                        iconP1.scale.set(0.8, 0.8);
                        iconP2.scale.set(1.2, 1.3);

                        iconP1.angle = -15;
                        iconP2.angle = 15;
                    } else {
                        iconP2.scale.set(0.8, 0.8);
                        iconP1.scale.set(1.2, 1.3);

                        iconP2.angle = -15;
                        iconP1.angle = 15;
                    }
                }
            }
            if (ClientPrefs.iconBounceType == 'Golden Apple') {
                FlxTween.cancelTweensOf(iconP1);
                FlxTween.cancelTweensOf(iconP2);
                iconBopsTotal % 2 == 0 * playbackRate ? {
                    iconP1.scale.set(1.1, 0.8);
                    iconP2.scale.set(1.1, 1.3);

                    FlxTween.angle(iconP1, -15, 0, Conductor.crochet / 1300 / playbackRate * gfSpeed, {ease: FlxEase.quadOut});
                    FlxTween.angle(iconP2, 15, 0, Conductor.crochet / 1300 / playbackRate * gfSpeed, {ease: FlxEase.quadOut});
                } : {
                    iconP1.scale.set(1.1, 1.3);
                    iconP2.scale.set(1.1, 0.8);

                    FlxTween.angle(iconP2, -15, 0, Conductor.crochet / 1300 / playbackRate * gfSpeed, {ease: FlxEase.quadOut});
                    FlxTween.angle(iconP1, 15, 0, Conductor.crochet / 1300 / playbackRate * gfSpeed, {ease: FlxEase.quadOut});
                }

                FlxTween.tween(iconP1, {'scale.x': 1, 'scale.y': 1}, Conductor.crochet / 1250 / playbackRate * gfSpeed, {ease: FlxEase.quadOut});
                FlxTween.tween(iconP2, {'scale.x': 1, 'scale.y': 1}, Conductor.crochet / 1250 / playbackRate * gfSpeed, {ease: FlxEase.quadOut});
            }
            if (ClientPrefs.iconBounceType == 'VS Steve') {
                FlxTween.cancelTweensOf(iconP1);
                FlxTween.cancelTweensOf(iconP2);
                if (iconBopsTotal % 2 == 0)
                    {
                    iconBopsTotal % 2 == 0 ?
                    {
                        iconP1.scale.set(1.1, 0.8);
                        iconP2.scale.set(1.1, 1.3);
                        //FlxTween.angle(iconP2, -15, 0, Conductor.crochet / 1300 * gfSpeed / playbackRate, {ease: FlxEase.quadOut});
                        //FlxTween.angle(iconP1, 15, 0, Conductor.crochet / 1300 * gfSpeed / playbackRate, {ease: FlxEase.quadOut});
                    }
                    :
                    {
                        iconP1.scale.set(1.1, 1.3);
                        iconP2.scale.set(1.1, 0.8);
                        FlxTween.angle(iconP1, -15, 0, Conductor.crochet / 1300 * gfSpeed / playbackRate, {ease: FlxEase.quadOut});
                        FlxTween.angle(iconP2, 15, 0, Conductor.crochet / 1300 * gfSpeed / playbackRate, {ease: FlxEase.quadOut});

                    }

                    FlxTween.tween(iconP1, {'scale.x': 1, 'scale.y': 1}, Conductor.crochet / 1250 * gfSpeed / playbackRate, {ease: FlxEase.quadOut});
                    FlxTween.tween(iconP2, {'scale.x': 1, 'scale.y': 1}, Conductor.crochet / 1250 * gfSpeed / playbackRate, {ease: FlxEase.quadOut});
                }
            }
        }
        iconP1.updateHitbox();
        iconP2.updateHitbox();
    }
TheKamboy commented 3 months ago

Closing this issue since it seems like it may not be an issue with JS Engine.