Code Monkey home page Code Monkey logo

centurion's Introduction

Centurion

License version doxygen CI: Windows CI: Ubuntu CI: macOS

Introduction

Centurion is a modern C++ wrapper library for SDL2 designed to improve type-safety, memory safety and overall ease-of-use. The general aim of Centurion is to serve as an easy-to-use and intuitive alternative to raw SDL2, by providing the same features whilst being safer and easier to use. However, there are also aspects of the library that have no direct counterparts in SDL.

Not Just a Wrapper Library

Centurion is not just a wrapper library! A lot of effort has been put into improving the SDL APIs by utilising the full power of modern C++17 and C++20. Which has led to APIs that are far more expressive and intuitive to use, compared to plain C.

Features

The following is a (non-exhaustive) list of the features of Centurion.

  • Window management
  • Hardware-accelerated rendering (with basic support for OpenGL and Vulkan)
  • TrueType font handling
  • System events
  • Keyboard input
  • Mouse input
  • Game controller and joystick input
  • Force feedback
  • Sound effects
  • Music
  • System information about platform, CPU, RAM, screen, battery, clipboard, counters, locale, etc.
  • Filesystem information
  • Cursor management
  • Multi-threading utilities
  • Message boxes
  • Compiler information

Additionally, many Centurion components feature serialization support based on the Cereal API, string conversions, streaming support, etc. The library can be used with either C++17 or C++20, and will use appropriate facilities depending on the language version used. For example, the library will make use of std::format, if it is available.

Dependencies

The following table shows the supported versions of SDL2 and its extension libraries. Only the core SDL library is mandatory. The extension libraries can be disabled at compile-time, by defining any of CENTURION_NO_SDL_IMAGE , CENTURION_NO_SDL_MIXER or CENTURION_NO_SDL_TTF, respectively.

Dependency Source Supported versions
SDL2 www.libsdl.org 2.0.10 ... 2.24.0
SDL2_image (Optional) www.libsdl.org/projects/SDL_image 2.0.5 ... 2.6.2
SDL2_mixer (Optional) www.libsdl.org/projects/SDL_mixer 2.0.4 ... 2.6.2
SDL2_ttf (Optional) www.libsdl.org/projects/SDL_ttf 2.0.15 ... 2.20.1

Installation

The library is distributed as a header-only library, which can be found in the src directory. Just download the headers include them in your project, and the library it's ready to be used! You will of course also need to install SDL2.

Documentation

The Doxygen documentation for the latest stable release can be found here.

Projects using Centurion

The following is a list of known projects that make use of Centurion in some extent. Open a pull request if you're using Centurion and want to featured in this list.

centurion's People

Contributors

albin-johansson avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.