Impact

This forum is read only and just serves as an archive. If you have any questions, please post them on github.com/phoboslab/impact

1 decade ago by Belohlavek

Nothing else to say, my character keeps walking in the direction I was pressing even after I swich tabs in Google Chrome.

Any way to solve this?

Thanks!

1 decade ago by jerev

Could you show the "update" method of your character entity?

Are you using this.vel.x or are you moving the entity with this.pos.x ?

1 decade ago by Belohlavek

Here you have http://pastebin.com/SU6LP7NH

I'm using this.vel.x.

Thanks for answering.

1 decade ago by dominic

The browser doesn't send the keyup event when switching tabs. If you then release the key in another tab, your game will never receive the keyup and will continue to think the key is still pressed.

We could probably fix it by explicitly releasing all keys when the game goes out of focus. But honestly, I don't think it's a big deal.

Opinions? Did anyone else encounter this issue?

1 decade ago by Belohlavek

If it is a multiplayer game then the players would keep going and it could lead into some weird accidents.
I'll try to implement that idea about the game focus, thanks.

1 decade ago by Ant101

Just wanted to +1 that this was an issue for us too.
Page 1 of 1
« first « previous next › last »