The examples are currently available in the documentation directory on the sdl2-port branch and contains :

  • screen: creates a window and wait for the user to close it. You can use this example to check your installation of the engine.
  • display: draws a rectangle in the middle of the window. We start to draw things!
  • sprite: draws a sprite in the middle of the window. Sprites are a key part of 2D games, let's see how to load them and to display them!
  • text: need to explain something to the player? Here you will learn to write a text using a true type font.
  • keyboard: an example of how to handle the keyboard, here to control a sprite using the arrows.
  • mouse: an example of how to handle the mouse, here to move and to scale a sprite.
  • joystick: an example of how to handle the joystick, here to move, to scale, to flip and to rotate a sprite.
  • music: you'll certainly need a music in your game, here you will learn how to load it and to play it.
  • sounds: bang! fzzz! Sound effects!
  • stars: draws a star in the middle of the screen.
  • animation: an example of how to play an animation.
  • shader: sprites again, but this time with a fragment shader applied to them.

For those who prefer to start immediately with a game, there is also a sample project accompanied with a project wizard to help you starting with the engine. Just download this archive, extract it, ensure that you have the dependencies installed, then run ./ The script will perform the following tasks:

  • ask for your project's name,
  • clone the Bear Engine's directory, build and install it,
  • create a minimalistic project,
  • build this project and run it.

You can then use this sample project as the base for your game!

Update: the SDL 2 branch has been merged into master. The new project wizard now pulls from it!