Ouzel is a C++ game engine mainly targeted for development of 2D games.
Supported platforms:
Supported rendering backends:
Supported audio backends:
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>();
}
2D platformer Bearslayer is being developed using Ouzel engine.
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
You can ask question in the following locations:
Ouzel codebase is released to the Public Domain
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。
1. 开源生态
2. 协作、人、软件
3. 评估模型