
sunlight
is an open source library written in C++ to make 2D games. Overall, its present main features include a manager that can deal with map, collision, sprites and graphic primitives.
raylib was used for graphic backend, but the project aims to be extended to SDL and many others.
In order to make sunlight
run as desired, it is necessary to install the dependencies listed below beforehand:
You may install the package on its official page. Higher versions are also supported.
-
For Linux
Ubuntu/Debian users can install the package by using the command
apt-get
on their Linux shell.It is also recommended to install by using the standard package manager offered by your prefered distro.
-
For MacOS
Mac users may obtain the package through MacPorts or Homebrew.
Use vcpkg to integrate C/C++ libraries using Visual Studio.
By default, the project's CMakeLists will automatically search LibXML and its dependencies (LibIconv). For those who might want to use the library installed on your system, the following parameter should be used to call CMake:
cmake -DUSE_LOCAL_LIBXML2
zlib can be installed by using your standard package manager.
The installation steps for which OS are listed below.
- Ubuntu/Debian family
apt-get install zlib1g-dev
- Windows (vcpkg)
.\vcpkg\vcpkg install zlib:x64-windows
You may find the detailed instructions by clicking here and following the steps regarding the operational system you're using.
By default, sunlight
doesn't build the projects' samples.
In order to make it compile with samples, it is necessary to open the CMakeLists on the project's root to change the option from OFF to ON, as shown below:
option(BUILD_LIBRARY_SAMPLES "Build SunLight library samples" ON)
Note
You may also use the following command line on your system's shell:
cmake -DBUILD_LIBRARY_SAMPLES=ON
If you intend to use VsCode as your IDE, follow the instructions shown here.
In order to get proper info on the samples usage, you may find more on here.