crystal-bit / godot-game-template

Generic template for Godot games
MIT License
598 stars 47 forks source link

Debug shortcuts are still functional on release builds #86

Closed Evanaellio closed 9 months ago

Evanaellio commented 9 months ago

The debug shortcuts (Q to quit, R to restart and P to pause) are still enabled even on a release build, so players might trigger them by accident.

Evanaellio commented 9 months ago

This is how we fixed that in our game : https://github.com/Evanaellio/ludumdare54/commit/88d74f597b7cb8cd063b71ad2cd440d2d15f2474

davcri commented 9 months ago

Hi @Evanaellio, thank you very much for reporting the issue. Sorry for the bug, I backported this functionality from one of my jam games and I made a mistake.

The best approach is to remove the DebugShortcuts scene entirely if the game is running in releas builds so that performances are not affected.

https://github.com/crystal-bit/godot-game-template/blob/main/addons/ggt-debug-shortcuts/autoload/debug_shortcuts.gd