Swift and Cute 2D Game Framework: Setting Up a Project with CMake
a year ago
- #swift
- #game-development
- #cmake
- Cute Framework is a C/C++ framework for building 2D games using the modern GPU pipeline.
- This post explains setting up a project with Cute Framework using CMake and Swift.
- Prerequisites include Swift (latest version), CMake (3.20+), and Ninja.
- Project structure involves creating directories for src, include, and CMakeLists.txt.
- CMakeLists.txt configures the project, sets up dependencies, and links Cute Framework.
- Swift interoperability is set up via a C header file (shim.h) and a module map.
- Example Swift code demonstrates initializing the app, creating a sprite, and running a loop.
- Build and run the project using CMake and Ninja, then execute the generated binary.