You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think it would be fun to implement "compiled game" support. This would mean that data structures are loaded from game.xml once, then compiled into data that gets injected directly into the binary at runtime to avoid future parsing.
This would be relatively simple (at least in theory.) My method would go something like this:
In Game::init():
if (game.xml exists) {
parse it and use its data;
}
else {
attempt to load shared object (game.so, game.dll, etc.);
if (doesn't exist) {
error and exit;
}
}
There would be a separate tool that would use the Parser class to parse game.xml, create a C++ file that corresponds to it (instantiating entities, configuring them via setters, etc.) and compile it into a shared object that can then be loaded by the game at runtime.
I think it would be fun to implement "compiled game" support. This would mean that data structures are loaded from game.xml once, then compiled into data that gets injected directly into the binary at runtime to avoid future parsing.
This would be relatively simple (at least in theory.) My method would go something like this:
In Game::init():
There would be a separate tool that would use the Parser class to parse game.xml, create a C++ file that corresponds to it (instantiating entities, configuring them via setters, etc.) and compile it into a shared object that can then be loaded by the game at runtime.
To make shared objects as cross-platform as possible, look into this: http://boost-extension.redshoelace.com/docs/boost/extension/index.html
The text was updated successfully, but these errors were encountered: