landgreen / n-gon

2-d physics rogue-lite platformer shooter
https://landgreen.github.io/n-gon/
GNU General Public License v3.0
151 stars 222 forks source link

minor bug report: inconsistent wall jump #217

Closed AnnonymousNerd87 closed 5 months ago

AnnonymousNerd87 commented 5 months ago

with some jump increases (time dilation, nitinol, etc.) you can sometimes do a mini wall jump. I love this and don't want it to be patched, but its inconsistent and definitely a bug. Screen recording 2024-04-22 5.05.10 PM.webm

LinuxRocks2000 commented 5 months ago

That isn't a wall jump, and you can do it without td/nitinol. It's because hitting vertical walls doesn't immediately arrest velocity on the Y axis, and you can maneuver a little bit while in midair, so you can hit a wall and keep moving up (over the brim), at which point you'll be able to steer onto the block. Occasionally the jump event "bounces" just-in-time, allowing you to take a second jump very quickly after cresting the block.

AnnonymousNerd87 commented 5 months ago

well I'm use to calling stuff like that a wall jump

LinuxRocks2000 commented 5 months ago

Wall jumps are when you get an extra hop while still in contact with the wall; this is not that.

AnnonymousNerd87 commented 5 months ago

then what do you call this? Screen recording 2024-04-22 5.21.10 PM.webm

LinuxRocks2000 commented 5 months ago

Oh that's really weird, looks like a real wall-jump bug does in fact exist. My apologies for doubting you.

3xionDev commented 5 months ago

i've known this for a while. i actually use this most runs, namely in reactor, because it allows me to grab the rest of the upgrades that get stuck on top of the moving platform. again, this feels like another way to break the game and "trick" the developer, and I personally do not think it should be patched.

AnnonymousNerd87 commented 5 months ago

more vid just to prove my superior intellect Screen recording 2024-04-23 7.55.58 AM.webm

AnnonymousNerd87 commented 5 months ago

Yeah I love this bug and don't want it to be patched

seems more consistent with better Fx and jumpForce (move and jump), to test this I'm adding a constant 2x multiplier to both in Dumb n-gon https://annonymousnerd87.github.io/

AnnonymousNerd87 commented 5 months ago

yep, I got time dilation + nitinol and its much more consistent with the 2x bonus Screen recording 2024-04-23 8.12.02 AM.webm

AnnonymousNerd87 commented 5 months ago

I got all the move speed bonus tech and I can tell that wall jumping is much more consistent, but because you jump so high its hard to find tall enough walls Screen recording 2024-04-23 8.17.24 AM.webm

AnnonymousNerd87 commented 5 months ago

ok you can also chain jump in corners Screen recording 2024-04-23 8.20.04 AM.webm

landgreen commented 5 months ago

this is a known bug caused by the "on ground" sensor triggering if the player moves fast enough horizontally to get the sensor to touch the wall. I don't see a reason to fix this since it doesn't really impact gameplay.

AnnonymousNerd87 commented 5 months ago

actually can you tell me where I can change the size/location of the sensor? I'd like to make it larger in Dumb n-gon.

landgreen commented 5 months ago

it's near the top of the player.js

    jumpSensor = Bodies.rectangle(0, 46, 36, 6, {
        //this sensor check if the player is on the ground to enable jumping
        sleepThreshold: 99999999999,
        isSensor: true
    });
AnnonymousNerd87 commented 5 months ago

cool thanks

On Tue, Apr 23, 2024 at 7:00 PM landgreen @.***> wrote:

it's near the top of the player.js

jumpSensor = Bodies.rectangle(0, 46, 36, 6, {
    //this sensor check if the player is on the ground to enable jumping
    sleepThreshold: 99999999999,
    isSensor: true
});

— Reply to this email directly, view it on GitHub https://github.com/landgreen/n-gon/issues/217#issuecomment-2073855318, or unsubscribe https://github.com/notifications/unsubscribe-auth/BHEAKNB4EAQFDYVGG7XQHQLY64G2PAVCNFSM6AAAAABGTXC6ACVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANZTHA2TKMZRHA . You are receiving this because you authored the thread.Message ID: @.***>

AnnonymousNerd87 commented 5 months ago

I buffed it up to (0, 46, 50, 6) so now all you have to do is hold towards a wall and hold w

landgreen commented 5 months ago

I should probably make that a skin tech.

AnnonymousNerd87 commented 5 months ago

interesting...

On Wed, Apr 24, 2024 at 3:10 PM landgreen @.***> wrote:

I should probably make that a skin tech.

— Reply to this email directly, view it on GitHub https://github.com/landgreen/n-gon/issues/217#issuecomment-2075937842, or unsubscribe https://github.com/notifications/unsubscribe-auth/BHEAKNE7UWFBAODABEBHFODY7AUVHAVCNFSM6AAAAABGTXC6ACVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANZVHEZTOOBUGI . You are receiving this because you authored the thread.Message ID: @.***>

landgreen commented 5 months ago

just tried it out. The legs don't move right, but I could still make it a JUNK tech.

AnnonymousNerd87 commented 5 months ago

yeah, depends on the parameters. I use (0, 46, 50, 6)

On Wed, Apr 24, 2024 at 3:20 PM landgreen @.***> wrote:

just tried it out. The legs don't move right, but I could still make it a JUNK tech.

— Reply to this email directly, view it on GitHub https://github.com/landgreen/n-gon/issues/217#issuecomment-2075948264, or unsubscribe https://github.com/notifications/unsubscribe-auth/BHEAKNHNLFE7EVAJJTW7SBDY7AV4BAVCNFSM6AAAAABGTXC6ACVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANZVHE2DQMRWGQ . You are receiving this because you authored the thread.Message ID: @.***>

landgreen commented 5 months ago

I just added it with this command

{
    name: "wall jump",
    description: "jump on walls",
    maxCount: 1,
    count: 0,
    frequency: 0,
    isJunk: true,
    allowed() {
        return !m.isShipMode
    },
    requires: "",
    effect() {
        jumpSensor.vertices[0].x += -22
        jumpSensor.vertices[3].x += -22
        jumpSensor.vertices[1].x += 22
        jumpSensor.vertices[2].x += 22
    },
    remove() { }
},
AnnonymousNerd87 commented 5 months ago

cool!

On Wed, Apr 24, 2024 at 3:43 PM landgreen @.***> wrote:

I just added it to the live game with this command

{ name: "wall jump", description: "jump on walls", maxCount: 1, count: 0, frequency: 0, isJunk: true, allowed() { return !m.isShipMode }, requires: "", effect() { jumpSensor.vertices[0].x += -22 jumpSensor.vertices[3].x += -22 jumpSensor.vertices[1].x += 22 jumpSensor.vertices[2].x += 22 }, remove() { } },

— Reply to this email directly, view it on GitHub https://github.com/landgreen/n-gon/issues/217#issuecomment-2075968941, or unsubscribe https://github.com/notifications/unsubscribe-auth/BHEAKNEPEEVHY264FSXH5SDY7AYRTAVCNFSM6AAAAABGTXC6ACVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANZVHE3DQOJUGE . You are receiving this because you authored the thread.Message ID: @.***>

AnnonymousNerd87 commented 5 months ago

oh btw how do I increase the size/radius of wave packets? I found the code bullet[me] = Bodies.polygon(m.pos.x + 25 * Math.cos(m.angle), m.pos.y + 25 * Math.sin(m.angle), 5, 4, { and want to know what number in there is the radius

AnnonymousNerd87 commented 5 months ago

that code is for the fire transverse section of wave code

landgreen commented 5 months ago
{
    name: "amplitude",
    description: "<strong>1.4x</strong> wave <strong class='color-d'>damage</strong><br><strong>1.4x</strong> wave bullet <strong>amplitude</strong>",
    isGunTech: true,
    maxCount: 3,
    count: 0,
    frequency: 2,
    frequencyDefault: 2,
    allowed() {
        return tech.haveGunCheck("wave") || tech.isSoundBotUpgrade
    },
    requires: "wave",
    effect() {
        tech.waveFrequency *= 0.66
        tech.wavePacketDamage *= 1.4
    },
    remove() {
        tech.waveFrequency = 0.2  //adjust this to make the waves much larger
        tech.wavePacketDamage = 1
    }
},
AnnonymousNerd87 commented 5 months ago

I mean the size of the individual pellets, not the amplitude. I should have clarified that. oh and also I broke something in Dumb n-gon and now the interface is working fine, but when you start the game it crashes and you are left with a blank screen.

On Thu, Apr 25, 2024 at 4:11 PM landgreen @.***> wrote:

{ name: "amplitude", description: "1.4x wave damage
1.4x wave bullet amplitude", isGunTech: true, maxCount: 3, count: 0, frequency: 2, frequencyDefault: 2, allowed() { return tech.haveGunCheck("wave") || tech.isSoundBotUpgrade }, requires: "wave", effect() { tech.waveFrequency = 0.66 tech.wavePacketDamage = 1.4 }, remove() { tech.waveFrequency = 0.2 //adjust this to make the waves much larger tech.wavePacketDamage = 1 } },

— Reply to this email directly, view it on GitHub https://github.com/landgreen/n-gon/issues/217#issuecomment-2078315942, or unsubscribe https://github.com/notifications/unsubscribe-auth/BHEAKNCVQXBY7IB44RJEGNDY7GESNAVCNFSM6AAAAABGTXC6ACVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANZYGMYTKOJUGI . You are receiving this because you authored the thread.Message ID: @.***>