kaplay icon indicating copy to clipboard operation
kaplay copied to clipboard

bug: possible to go through colliders when alt-tabbing away from browser during movement

Open riidom opened this issue 1 year ago • 12 comments

Describe the bug

A clear and concise description of what the bug is.

While pressing arrow-left and colliding with the outer boundary collider, go out of browser with alt-tab, and then switch back to browser again - character is on other side of the collider.

Version

What version are you running?

"^3000.1.17"

To Reproduce

Steps to reproduce the behavior:

  1. Set up a scene with colliders and a movable object
  2. Repeat the alt-tab procedure mentioned above

Expected behavior

A clear and concise description of what you expected to happen.

It shouldnt be possible to pass the collider like that.

Screenshots

If applicable, add screenshots to help explain your problem.

How the scene is set up:

image

How it looks like afterwards:

image

riidom avatar Aug 03 '24 15:08 riidom

can you try master?

lajbel avatar Aug 08 '24 01:08 lajbel

Bug still there unfortunately.

Just to doublecheck: I changed the dependency in my package.json to "kaplay": "kaplayjs/kaplay", deleted node_modules and run npm install.

I also noticed, that the bug can be reproduced on: https://play.kaplayjs.com/?example=collision (use the ground tile).

riidom avatar Aug 08 '24 08:08 riidom

I don't think using Kaplay is master though. You need to use the git npm.

mflerackers avatar Aug 08 '24 09:08 mflerackers

Could you detail that a little bit? Npm is not my strongest suit unfortunately:)

riidom avatar Aug 08 '24 09:08 riidom

npm i github:kaplayjs/kaplay

mflerackers avatar Aug 08 '24 09:08 mflerackers

This gives me trouble, I get:

42 error code 128
43 error An unknown git error occurred
44 error command git --no-replace-objects ls-remote ssh://[email protected]/kaplayjs/kaplay.git
45 error [email protected]: Permission denied (publickey).

If this turns out to be complicated, we could as well wait until next release, and I will check it again then, and comment here or open new issue, what do you think?

I mostly think this is something that I wouldn't want to confront players with on a released game, but otherwise it's not a development show-stopper. But if you have a good idea what the above problem is about, give me a hint and I try that.

riidom avatar Aug 08 '24 09:08 riidom

let me release a new version

lajbel avatar Aug 08 '24 12:08 lajbel

Thanks for the release! Bug is still there, though.

riidom avatar Aug 08 '24 16:08 riidom

Now?

lajbel avatar Oct 05 '24 21:10 lajbel

Would be cool also if we got a reproducible example

lajbel avatar Oct 05 '24 21:10 lajbel

This kaplayground example does it too: https://play.kaplayjs.com/?example=collision

Collide with the ground tile, keep pressing the direction key that moves you towards the ground tile, then alt-tab twice and you are on the other side of the ground tile.

riidom avatar Oct 05 '24 22:10 riidom

We can't repro on OSX and Ubuntu, is a windows exclusive problem? Can you test using the version in master?

lajbel avatar Oct 06 '24 15:10 lajbel

I think this error is very specific. Maybe the current fix is pausing game on window toggling, but that may be on the user side. Re open if you don't think that

lajbel avatar Oct 19 '24 16:10 lajbel