Revolutionary-Games / Thrive

The main repository for the development of the evolution game Thrive.
https://revolutionarygamesstudio.com/
Other
2.85k stars 507 forks source link

Add a debug console #3414

Open athariqk opened 2 years ago

athariqk commented 2 years ago

We should add a debug/command console to the game that could handle command inputs and showing the game logs during runtime. This will be extremely helpful for playtesting and debugging where we could have easier access to many more cheats and debugging tools.

hhyyrylainen commented 2 years ago

One idea that was presented was to roll our own command parser and use C# reflection to allow it to call C# methods that do stuff.

Edit: and auto-complete in the console text input would be nice to have but not mandatory.

Edit 2: console commands with auto complete and history remembering, would make it easy to load specific save or go to specific scene easily, and adding a bunch of cheats

hhyyrylainen commented 1 year ago

I've added a dedicated folder for scenes that just load a specific stage in the game, it'd be pretty handy if the console could be used to switch to these scenes with a quick command to allow people playing a release version of Thrive to jump to a specific stage.

hhyyrylainen commented 1 year ago

Note that it seems there's currently no way to get current log output from Godot, so we couldn't show Godot messages in the console...

Relevant godot proposal:

https://github.com/godotengine/godot-proposals/issues/5937

hhyyrylainen commented 10 months ago

Also once this is done the testing wiki page needs to be updated to mention these new powerful tools: https://wiki.revolutionarygamesstudio.com/wiki/Testing

hhyyrylainen commented 8 months ago

This could be taken inspiration from: https://github.com/MASSHUU12/godot-yat (or maybe even used as-is if system commands can be disabled for more safety).