Hi, I submitted this as a bug report but the issue is caused by the browser having no access to key down and key up triggers when it is not in focus.
Have a look at this simple example and you'll see that, if a key is down when the browser becomes out of focus, the c2 engine never receives a key up trigger - so when you return to the game it continues as if the key is still being continually pressed, even though it is not!
When running in a browser tab this can be detected by the Page is Visible Browser condition, but if you run a game in a stand-alone browser- or NW window - then nothing gets triggerd that can be detected by c2. This is a real problem when running a game in NW... and I can't think of a robust work-around to detect when something else on the desktop has been put into focus.
I have tried using the Browser: On Suspended / On Resumed / Page is Visible conditions. However, none of these work when the browser/NW window is stand-alone, they only register when if page/tab/window is minimized...
Develop games in your browser. Powerful, performant & highly capable.
A small Friday night bump back to the top.
The more I think about this, the more of a potential problem this could be for non-browser (NW) based games if they are not always played in full screen. Anyone for trying to sell a game with apparently run-away controls? No, me neither... :/
spongehammer - I tag you here because it appears that my earlier advice about your game in immediate full screen might not have been the best advice after all.... Sorry!