Cute Framework (CF) is the cutest framework available for making 2D games in C++. It provides a portable foundational layer for building 2D games in C/C++ without baggage, gnarly dependencies, or cryptic APIs. CF runs almost anywhere, including Windows, MacOS, iOS, Android, Linux, and more!
NOTE: Cute Framework is currently in flux for it's v1.0 release! These notes/docs will be changed as they get rolled out and come online.
The easiest option is to head over and pickup the latest pre-built version This link is currently out of date, and awaiting the soon to be v1.0 release (see below for building latest from source). You can link your project against CF as either a static or shared library. Be sure to also visit the Cute Framwork documentation site.
Another option for those familiar with CMake is to build from source with CMake.
- Download and install CMake v3.14+ (for easy cross-platform building), and git.
- Copy CMakeLists.txt (this one here) into the top-level of your project directory.
- Find + replace "my_project_name".
- Make a folder called
src
in the top-level of your project, and place your initialmain.cpp
there. - Run CMake on your project folder.
Creating a window and closing it.
#include <cute.h>
using namespace Cute;
int main(int argc, char* argv[])
{
// Create a window with a resolution of 640 x 480.
int options = APP_OPTIONS_DEFAULT_GFX_CONTEXT | APP_OPTIONS_WINDOW_POS_CENTERED;
Result result = make_app("Fancy Window Title", 0, 0, 640, 480, options, argv[0]);
if (is_error(result)) return -1;
while (app_is_running())
{
app_update();
// All your game logic and updates go here...
app_draw_onto_screen();
}
destroy_app();
return 0;
}
The documentation website is the go-to place for finding all the resources available. Here are some quick-links to get you started:
If you're stuck and need help then check out the Discord chat. Feel free to pop in and ask questions, make suggestions, or have a discussion. General gamedev chatting unrelated to CF is also welcome!
Feel free to open up an issue right here on GitHub to ask any questions. If you'd like to make a pull request I highly recommend opening a GitHub issue first to start a discussion on any changes you would like to make.