Version 0.1.0 released

This release focuses on supporting Android as a target platform as well as making the process of creating a game much simpler. Previously, game templates were created using the CreateGame.py script, which has now been replaced by a ready-to-run game template located in the MyGame folder.

MyGame additionally comes with a CMakePresets.json file which uses CMake Presets to simplify the build process substantially. Lastly, shell scripts are included in the package that generate ready-to-use projects for Visual Studio and Xcode.

What’s new

  • Support for targeting Android
  • Improve event handling by exposing events as virtual methods in the Game class
    • This replaces the std::variant-based Event type that required a visitor pattern.
    • Now, simply override a method in your Game class for the event you want to handle.
  • Add tweening
    • New class: cer::Tween
    • New functions in namespace cer::tween to be used in conjunction with the Tween class
  • Change static colors from variables to methods
    • Example: Color::CornflowerBlue now becomes Color::CornflowerBlue()
  • Change Matrix::Zero variable to a function, i.e. Matrix::Zero()
  • Remove ASSETS_DIR parameter in the cerlib_add_executable function. The game asset folder is now called "Assets" and is unchangeable.
  • The game template now specifies its source files in a separate file called files.cmake
  • Add GenerateVisualStudioProject.bat to the game template
    • Convenience script that creates a Visual Studio 2022 project for the game
  • Add GenerateXcodeProject.command to the game template
    • Convenience script that creates an Xcode project for the game
  • Add ImageFormat::Unknown
  • Default-initialize DisplayMode members
  • Add Image::GetSizeInBytes()
  • Add an Image constructor that loads an image from a file on disk. This function is only supported on desktop platforms. Calling it on non-desktop platforms will raise an error.
  • Add cer::GetCurrentCanvas()
    • Gets the current canvas that was set by cer::SetCanvas()
  • Add cer::GetCanvasDataInto() and cer::GetCanvasData()
    • Gets the pixel data that is currently stored in a Canvas
  • Add cer::SaveCanvasToFile() and cer::SaveCanvasToMemory()
    • Saves the pixel data of a canvas as converted image data, such as PNG or JPEG
    • New enum: ImageFileFormat
  • Remove Game::FirstUpdateOfFrame()
  • Improved documentation of various types