An example project on how to load configuration from files and use them in our SDL2 programs.
By the end of this tutorial you'll know how to read values from a configuration file, set these values into variable and also how to reload the configuration in case you want to change some property of your program.
A video tutorial is availabe at
A written tutorial is available at https://www.codingwithjulio.com
SDL2 installed on your system.
This project was created on Linux. For other systems some adjustements might be necessary.
A Makefile.mac is provided in case you want to build it on a Mac.
For windows, the Makefile might need some adjustments as well as the included .vscode
config files.
This template uses as Makefile that was configured to build our application into the build/debug
directory.
In order to build the application, type:
$ make
In order to run the application, type:
$ ./build/debug/play
You should see the string "Hello SDL2!" being printed to the console output.