News for hackers. Stuff that matters.
Re:Show HN: Lunar lander-type game with computational fluid ... by blunte on Saturday September 15, 2018 @10:43AM (#17994445)
Am I the only one experiencing a game-breaking bug/behavior?

The D thrust gets stuck on if you press it once, and randomly the W comes on and gets stuck too.

Also, after the first ship, every additional ship starts with W and D thrusts on, permanently.

Re:Show HN: Lunar lander-type game with computational fluid ... by s-macke on Saturday September 15, 2018 @11:03AM (#17994517)
This happens to me when I use the Internet Explorer. My best guess is, that the problem is, that the game tries to use all the computing power available. The game does use the "setTimeout(Loop, 0)" trick to accomplish this. Usually there is no problem if the event queue is a queue. Then the setTimeout function is the last one in the queue and keypresses are handled first. If the events are handled differently, for example by using a stack, such games are in big trouble.
Re:Show HN: Lunar lander-type game with computational fluid ... by luckettpat on Saturday September 15, 2018 @12:58PM (#17994987)
Yep, happening to me as well - MacOS and Chrome.
Re:Show HN: Lunar lander-type game with computational fluid ... by 0xfeba on Sunday September 16, 2018 @09:19AM (#17998774)
I had a similar issue with FF. IT looks like the canvas kept losing focus and FF was interpreting the letter keys as search terms sometimes. I believe when it looses focus with the keydown caused the sticking issue.

No issues in Chrome.

Re:Show HN: Lunar lander-type game with computational fluid ... by sokoloff on Saturday September 15, 2018 @10:50AM (#17994468)
Doesn't happen here. (MacOS Chrome 68.0.3440.106)
Re:Show HN: Lunar lander-type game with computational fluid ... by wongarsu on Sunday September 16, 2018 @03:37PM (#18000660)
Had the same issue with Windows 10 and Chrome, but no problems with Firefox
Re:Show HN: Lunar lander-type game with computational fluid ... by sliken on Saturday September 15, 2018 @01:20PM (#17995077)
Doesn't happen to me with linux + chrome. Just finished all 8 levels.
Re:Show HN: Lunar lander-type game with computational fluid ... by stevenhuang on Saturday September 15, 2018 @07:07PM (#17996467)
Keys get stuck for me too. Windows, Chrome 68.0.3440.106.