Currently I've enabled the console window in #16 because we want to be able to debug the game started from terminal. In Windows there's no easy way to control whether I want or don't want to enable the console window. The most obvious way is to compile the application for a console subsystem (see TankDriver.App.csproj:9). This have an undesirable effect: the game will now show the console window every time anybody is starting it. And we don't want to scare ordinary gamers with out black console windows. So we'll need a way to disable console in release mode.
We can recompile application for Windows subsystem, but
there's no easy way to switch compilation mode depending on build configuration;
NLog fails if it cannot set or encoding color for the console (and it fails to set it without the actual console); (fixed with 8ea8f5c2213e732bd73f24a32f6421a0ef8f7cb3)
I want to be able to control console with command line parameters or even by simply starting the application from console.
So, I think that we need to provide a small Windows-specific piece of code that will detect if an application was launched with specific command line arguments and show (or hide?) console based on that.
See something like that SO answer as a reference implementation.
Currently I've enabled the console window in #16 because we want to be able to debug the game started from terminal. In Windows there's no easy way to control whether I want or don't want to enable the console window. The most obvious way is to compile the application for a console subsystem (see TankDriver.App.csproj:9). This have an undesirable effect: the game will now show the console window every time anybody is starting it. And we don't want to scare ordinary gamers with out black console windows. So we'll need a way to disable console in release mode.
We can recompile application for Windows subsystem, but
NLog fails if it cannot set or encoding color for the console (and it fails to set it without the actual console);(fixed with 8ea8f5c2213e732bd73f24a32f6421a0ef8f7cb3)So, I think that we need to provide a small Windows-specific piece of code that will detect if an application was launched with specific command line arguments and show (or hide?) console based on that.
See something like that SO answer as a reference implementation.