flingengine / FlingEngine

A Vulkan game engine with a focus on data oriented design
https://fling-engine.site/
MIT License
408 stars 16 forks source link

Add a nice way to do command line arguments #154

Open BenjaFriend opened 4 years ago

BenjaFriend commented 4 years ago

Right now we don't have any good way to handle command line arguments outside of the core Engine.cpp file. We should have a good, easily accessible command line argument parser. This could go hand in hand with refactoring our config file parser to take an approach similar to UE, which has "Config Variables" that you can set via ini files or special C++ variables.

That may be more work than it's worth though, and we can probably get away with a simple command line parser with a layout like this:

./Sandboxe.exe -KeyString=Value -KeyInt=12 -keyString="I like this format" -BoolFlag

If you add a bool flag, then just adding -BoolFlag will automatically be set to true. We should still allow for you to explicitly say -BoolFag=OFF though, so that users can use some environment variables as well.