Hi!
A feature I'd really love to have would be to be able to execute code before exiting Game Mode.
Currently, GE returns to the editor right when one presses ESC in Game Mode, no matter which option is selected for the "Press ESC to exit game". Now this is a problem when one uses dynamic allocation for something in his game. That allocated memory should be freed, but even if I put the memory freeing code in View -> Key Down -> Esc it won't actually free the memory. It just exits the game. And so it leaks memory. After I go back and forth between Game Mode and editor mode a couple of times, GE's memory consumption has risen drastically.
I could of course free the memory in some other event, but that would require me to always remember to press that key / click that button before finishing testing my game. And actually, if it was just my problem when developing something, I'd be fine with that. But as I'm developing a template GE project for other people to use, this becomes a serious issue.
So, the possible fix I'd suggest would be to either:
A) make the "Press Esc to exit game: no" effective in editor as well
or
B) make GE first execute any code in Key Down Esc, and only after that go back to the editor view
Thanks for reading.
lcl