• Stars
    star
    965
  • Rank 47,414 (Top 1.0 %)
  • Language
    C++
  • License
    The Unlicense
  • Created almost 9 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

C++ game engine for Windows, macOS, Linux, iOS, tvOS, Android, and web browsers

ouzel

Ouzel v0.40

Build Status Build Status Quality Gate Join the chat at https://gitter.im/ouzelengine/Lobby

Ouzel is a C++ game engine mainly targeted for development of 2D games.

Supported platforms:

  • Windows 7, 8, 10
  • macOS 10.8+
  • GNU/Linux
  • iOS 8+
  • tvOS 9+
  • Android 3.0+
  • Emscripten (sample)

Supported rendering backends:

  • Direct3D 11
  • OpenGL 2, OpenGL 3 and OpenGL 4
  • OpenGL ES 2 and OpenGL ES 3
  • Metal

Supported audio backends:

  • XAudio 2
  • CoreAudio
  • OpenAL
  • OpenSL ES
  • ALSA

Features

  • Cross-platform (Windows, macOS, iOS, tvOS, Android, Linux, and Emscripten targets supported)
  • Multi-threaded (separate threads for rendering, sound, and game)
  • 2D and 3D scene management
  • GUI helper classes and management
  • Bitmap and true-type font support
  • Multiple side-by-side viewport support
  • XInput, DirectInput, IOKit, Apple GameController, and Linux evdev gamepad support
  • Actor animation (including tweening) system
  • Particle systems
  • Resource caching system
  • Localization support via loading string translations and UTF-8 string support
  • Software audio mixer for sound effect playback
  • High DPI support on Windows, macOS, and iOS
  • Easy to install (just pull the repository and build it)

Example app

The following code will open create a scene with a sprite in the center of it:

#include "assets/Bundle.hpp"
#include "core/Engine.hpp"
#include "scene/Camera.hpp"
#include "scene/Layer.hpp"
#include "scene/Scene.hpp"
#include "scene/SpriteRenderer.hpp"

class Example: public ouzel::Application
{
public:
    Example():
        assets{ouzel::engine->getCache(), ouzel::engine->getFileSystem()}
    {
        assets.loadAsset(ouzel::assets::Loader::Image, "player", "player.png");
        ouzel::engine->getSceneManager().setScene(&scene);
        scene.addLayer(&layer);
        cameraActor.addComponent(&camera);
        layer.addChild(&cameraActor);
        playerSprite.init("player");
        player.addComponent(&playerSprite);
        layer.addChild(&player);
    }

private:
    ouzel::scene::Scene scene;
    ouzel::scene::Layer layer;
    ouzel::scene::Camera camera;
    ouzel::scene::Actor cameraActor;
    ouzel::scene::SpriteRenderer playerSprite;
    ouzel::scene::Actor player;
    ouzel::assets::Bundle assets;
};

std::unique_ptr<ouzel::Application> ouzel::main(const std::vector<std::string>& args)
{
    return std::make_unique<Example>();
}

Showcase

2D platformer Bearslayer is being developed using Ouzel engine.

Bearslayer

Compilation

GNU makefile, Xcode project, and Visual Studio project files are located in the "build" directory. Makefile and project files for sample project are located in the "samples" directory.

You will need to download OpenGL (e.g. Mesa), ALSA, and OpenAL drivers installed in order to build Ouzel on Linux. For x86 Linux also libx11, libxcursor, libxi, libxrandr, and libxss are required.

To build Ouzel with Emscripten, pass "PLATFORM=emscripten" to "make" command, but make sure that you have Emscripten SDK installed before doing so:

$ make PLATFORM=emscripten

You can build Android samples and run them on an Android device by executing the following commands in "samples/android" directory (Android SDK and NDK must be installed and added to PATH):

$ gradle assembleDebug
$ gradle installDebug
$ adb shell am start -n org.ouzel/org.ouzel.MainActivity

To build Ouzel on Raspberry Pi, you will have to install Raspberry Pi development library (libraspberrypi-dev) and kernel headers (raspberrypi-kernel-headers)

Because on Raspbian Stretch libEGL.so was renamed to libbrcmEGL.so and libGLESv2.so to libbrcmGLESv2.so you will have to run the following commands before building the samples on Raspbian 8 (Jessie) or older:

$ sudo ln -s /opt/vc/lib/libEGL.so /opt/vc/lib/libbrcmEGL.so 
$ sudo ln -s /opt/vc/lib/libGLESv2.so /opt/vc/lib/libbrcmGLESv2.so

System requirements

  • Windows 7+ with Visual Studio 2017 or newer
  • macOS 10.10+ with Xcode 10+
  • Any reasonable new Linux distro (x86 and ARM are supported) with gcc 7+ or clang 5+

Getting help

You can ask question in the following locations:

License

Ouzel codebase is released to the Public Domain

More Repositories

1

HTTPRequest

Single-header C++ HTTP request class
C++
798
star
2

rtmp_relay

RTMP relay
C++
61
star
3

volkswagencpp

Volkswagen C++ makes your tests pass when run on a CI server
C++
55
star
4

contenttype

Go library for HTTP content type negotiation
Go
43
star
5

SoftwareRenderer

Simple header-only C++ software renderer
C++
31
star
6

RealisticWaterSceneNode

Realistic water scene node for Irrlicht
C++
24
star
7

signature_check

Mach-O signature check
C
23
star
8

cppsocket

C++ socket wrapper
C++
18
star
9

hlibs

Header-only C++ libraries
C++
14
star
10

bin2h

Store binary file in C header
C
12
star
11

self

Proposal for a self keyword for C++
8
star
12

OuzelShadingLanguage

Ouzel Shading Language is a high-level language, designed for writing cross-platform shaders
C++
5
star
13

gamepads

Gamepad configurations
C
4
star
14

FlurryX

C++ wrapper for Flurry Analytics for Cocos2d-x
C++
4
star
15

ouzel_spine

Ouzel Spine import
C++
3
star
16

smart_ptr

Custom smart pointer implementation
C++
3
star
17

json

C++
2
star
18

NoPreprocessor

C++
2
star
19

easing

Header-only C++ easing library
C++
2
star
20

CCShake

Shake action for cocos2d-x
C++
2
star
21

tvos-test

cocos2d-x test with tvOS
Objective-C++
2
star
22

Xcode-shortcuts

Xcode shortcuts
1
star
23

chat

C++
1
star
24

omath

C++
1
star
25

oc

C
1
star
26

EmptyWindow

Objective-C++
1
star
27

websocket

C++
1
star
28

carddetection

Playing card detection
C++
1
star
29

rebellion

Utilities for Star Wars: Rebellion board game
HTML
1
star
30

ecs

C++
1
star
31

video_play

Video player using Ouzel engine and libav
C++
1
star
32

metalpp

Header-only C++ Metal wrapper
C++
1
star
33

pcmplayer

C++
1
star
34

ini

C++
1
star
35

FileStdio

C++
1
star
36

nginx-screenshot-module

C
1
star
37

xml

C++
1
star