GithubHelp home page GithubHelp logo

dingyong4223 / ouzel Goto Github PK

View Code? Open in Web Editor NEW

This project forked from elnormous/ouzel

0.0 2.0 0.0 33.34 MB

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

License: BSD 2-Clause "Simplified" License

Makefile 0.79% C 15.72% C++ 72.49% Objective-C++ 10.28% Objective-C 0.23% HLSL 0.06% Batchfile 0.02% Metal 0.10% Shell 0.17% GLSL 0.15%

ouzel's Introduction

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+
  • 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
  • DirectSound
  • 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 it's subrepositories and build it)

Example app

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

#include "ouzel.hpp"

class Example: public ouzel::Application
{
public:
    Example():
        assets(ouzel::engine->getCache())
    {
        assets->loadAsset(ouzel::assets::Loader::IMAGE, "player.png");
        ouzel::engine->getSceneManager().setScene(&scene);
        scene.addLayer(&layer);
        cameraActor.addComponent(&camera);
        layer.addChild(&cameraActor);
        playerSprite.init("player.png");
        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::Sprite playerSprite;
    ouzel::scene::Actor player;
    ouzel::assets::Bundle assets;
}

std::unique_ptr<ouzel::Application> ouzel::main(const std::vector<std::string>& args)
{
    return std::unique_ptr<ouzel::Application>(new 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, 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

System requirements

  • Windows 7+ with Visual Studio 2015 or Visual Studio 2017
  • macOS 10.10+ with Xcode 7.2+
  • Any reasonable new Linux distro (x86 and ARM are supported)

Getting help

You can ask question in the following locations:

License

Ouzel codebase is licensed under the BSD license. Please refer to the LICENSE file for detailed information.

ouzel's People

Contributors

elnormous avatar princedeveloperof avatar jorgenpt avatar gitter-badger avatar archo5 avatar

Watchers

 avatar James Cloos 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.