/sdl2-samples-and-projects

This repository contains a list of SDL/SDL2 samples and projects. Mirror of https://gitlab.com/aminosbh/sdl-samples-and-projects

MIT LicenseMIT

SDL/SDL2 samples and projects

This repository contains a list of samples and projects related to the SDL/SDL2 library.

Samples

  • Basic C SDL2 project [@aminosbh]:
    This project is a basic C SDL2 project that uses CMake as a build system.
    It contains build instructions and explains how to open it with an IDE.

  • Basic C++ SDL2 project [@aminosbh]:
    This project is a basic C++ SDL2 project that uses CMake as a build system.
    It contains build instructions and explains how to open it with an IDE.

  • SDL2 pointerless [@aminosbh]:
    This is a one-file C SDL2 project. It is meant for beginners to let them create SDL-based projects without any pointer specific knowledge. It offers a micro-library that help create any grid-based user interface.
    The only dependency of this project is the SDL2 library.

  • SDL2_image sample [@aminosbh]:
    This project is a basic sample written in C that demonstrates the usage of the SDL2 and SDL2_image libraries. It uses CMake as a build system.
    This sample loads Tunisia flag image and render it. It contains build instructions and explains how to open it with an IDE.

  • SDL2_ttf sample [@aminosbh]:
    This project is a basic sample written in C that demonstrates the usage of the SDL2 and SDL2_ttf libraries. It uses CMake as a build system.
    This sample loads the Pacifico font and renders a sample text. It contains build instructions and explains how to open it with an IDE.

  • SDL2 audio sample [@aminosbh]:
    This project is a basic sample written in C that demonstrates how we can play audio using the SDL2 library. It uses CMake as a build system. This program will start playing waves sound that can be paused/resumed by pressing the SPACE key. It contains build instructions and explains how to open it with an IDE.

  • SDL2_mixer sample [@aminosbh]:
    This project is a basic sample written in C that demonstrates the usage of the SDL2 and SDL2_mixer libraries. It uses CMake as a build system. This program will start playing waves sound that can be paused/resumed by pressing the SPACE key. When one of the arrows keys is pressed a sound effect is played parallelly with the waves sound. It contains build instructions and explains how to open it with an IDE.

  • Basic C SDL2 project - Tunisia flag [@aminosbh]:
    This project is a basic C SDL2 project that uses CMake as a build system.
    It draws the flag of Tunisia using basic graphics primitives.
    It contains build instructions and explains how to open it with an IDE.

  • Basic C SDL2 game [@aminosbh]:
    This project is a basic C SDL2 game that uses CMake as a build system.
    It shows how we can develop a basic grid-based game.
    It contains build instructions and explains how to open it with an IDE.

Projects

Tutorials