artsailor Posted September 11, 2017 Share Posted September 11, 2017 I'm developing simple game in TypeScript and HTML5 using Phaser. It is targeting to all major platforms (Android, IOS and UWP) and standalone web page. I've added basic keyboard implementation for player movement using Phaser engine implementation : this.leftKey = this.game.input.keyboard.addKey(Phaser.Keyboard.LEFT); this.rightKey = this.game.input.keyboard.addKey(Phaser.Keyboard.RIGHT); and after testing I've noticed strange input behavior in UWP native solution. The keyboard seems to lag. After searching solution I find this page https://docs.microsoft.com/en-us/windows/uwp/get-started/get-started-tutorial-game-js3d where I find recommended keyboard support in UWP apps using JavaScript (chapter 5 Adding player movement) . document.addEventListener('keydown', this.onKeyDown.bind(this), false); document.addEventListener('keyup', this.onKeyUp.bind(this), false); But after implementing it the problem still exist. Application seems not respond for events immediately, don't getting events at all or getting it in wrong order. This situation is occurs only in UWP app, in all other platforms movement works great. I even downloaded and test game from link above and noticed the same keyboard issues. Does anyone know solution to this problem or what causes it? Thanks! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.