Documentation and tutorials for the Bear Engine
By Julien on Saturday 11 January 2014, 23:40 - Permalink
The Bear Engine is the cross platform open source C++ game engine on which we have built Plee the Bear, Andy's Super Great Park and Tunnel. It is available on GitHub under the terms of the version 3 of the GPL.
Since a few weeks I started to work on simple examples and tutorials in order to help anyone wanting to build a game easily with this engine. The lack of documentation was the main critic against the engine since the early years of the project, so I hope it will make things better.
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
./project-wizard.sh. The script will perform the following
- 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!