Currently, when you cleanly quit the game, there is no clean-up actions that can be ran (disconnecting from a server, saving something to a file, etc...)
There should be a way that the engine call the code from the user when the game is shutting down.
There is a method in Application::shutdown which is unused and could be re-used for that purpose.
There are two places (or more?) where exit code could be placed: State and System.
State is annoying, because you will probably end up copy pasting the shutdown method between your states.
System on the other hand would be a bit better since you could have a shutdown() method added to them. However, usually you will want your systems to be stateless, so having a cleanup method isn't really idea here either.
An rfc would need to be opened for discussion by the person taking this issue in charge.
Thanks!
Currently, when you cleanly quit the game, there is no clean-up actions that can be ran (disconnecting from a server, saving something to a file, etc...)
There should be a way that the engine call the code from the user when the game is shutting down.
There is a method in Application::shutdown which is unused and could be re-used for that purpose.
There are two places (or more?) where exit code could be placed: State and System.
State is annoying, because you will probably end up copy pasting the shutdown method between your states.
System on the other hand would be a bit better since you could have a shutdown() method added to them. However, usually you will want your systems to be stateless, so having a cleanup method isn't really idea here either.
An rfc would need to be opened for discussion by the person taking this issue in charge.
Thanks!