AGS4 suggestion: runtime Warnings vs Errors

Started by Radiant, Wed 30/08/2023 19:37:26

Previous topic - Next topic

Radiant

By my understanding, AGS has three levels of messaging the end user.
The first (INFO) appears in the debug terminal that pops up if you press `, e.g. if a GUI is turned visible when it's already visible.
The second (WARN) appears in a textual logfile in the game's executable folder, e.g. if a nonexistent sound effect is played.
The third (ERROR) immediately terminates the game, showing a windows popup dialog.

I suggest that the first one isn't useful (at least, not for exceptions) and should be deprecated. I say this because it shows only the last five lines of text, where a game using repeatedly_execute() can easily generate a dozen lines per second. Placing this output in the logfile is much easier to read back.

And I suggest that the third one be used less than it currently is, because it is impractical for players. For instance, if the script tries to animate a character with a nonexistent loop, IMHO generating a warning (and no animation) is preferable to having the game terminate. I'm sure there are some valid reasons for terminating, but older AGS versions terminate too easily.

In other words, what I'd like to see for AGS4 is a clear definition of "critical error", and that anything short of a critical error is printed to the logfile instead of terminating the game.

Crimson Wizard

#1
This is totally a valid request, but some assumptions above are incorrect or outdated.

First of all, the "debug console" appearing on "~" key press is totally useless, as you stated, and seem to be ignored in general. There is a number of issues with it, starting with it relying on a game font and color settings, which may not be suitable for the console. Personally I'm fine in removing it or at least disabling temporarily before something better is implemented.

Now, in regards to logging, AGS uses what is known as "log sinks" or "outputs", meaning that same log messages can be sent into multiple "recipients". The in-game console is just one of them.
Which messages go where may be configured (with a few exceptions for hardcoded engine behavior). This is explained here in more detail:
https://github.com/adventuregamestudio/ags/blob/master/OPTIONS.md
if you scroll down to "[log]" section.

So, there's not 3 levels, but more levels, and they may be printed anywhere, in theory.

Besides the above, there's also a output target missing in this document, it's the "IDE debugger", and it's currently activated by the 3.6.1+ Editor running game in a test mode. The messages are landing in the new Log Panel in the Editor, see 3.6.1 Beta post for details.

Spoiler

[close]


Finally, in regards to the suggestion of reducing number of game-stopping error cases. There's actually an opened ticket regarding this, which suggests a configurable behavior:
https://github.com/adventuregamestudio/ags/issues/1488

This is my own proposal, based on some past conversations with other users, both game devs and players who used a standalone engine to play old games.
But of course this may be discussed further, here, or in the ticket.

SMF spam blocked by CleanTalk