Skip to content
/ yapre Public

Here comes Yet Another Portable Retro Engine!

License

Notifications You must be signed in to change notification settings

wo1fsea/yapre

Repository files navigation

yapre

yapre

Build Status

windows mac linux emscripten iOS Anodroid
Build Status Build Status Build Status Build Status Build Status Build Status

Intro

Here comes Yet Another Portable Retro Engine(yapre)!

It is a toy project for everyone to make retro games on any platform(for now Windows, MacOS, Linux, emscripten, iOS and Android are supported) using C++ and lua.

Try the demo app in your webbrowser by typping yapre.run in your address bar!

Examples

Build

windows

> git clone --recurse-submodules -j8 git@github.com:wo1fsea/yapre.git
> cd yapre
> .\build_scripts\build_windows.bat

mac

> git clone --recurse-submodules -j8 git@github.com:wo1fsea/yapre.git
> cd yapre
> sh ./build_scripts/build_mac.sh

linux

> git clone --recurse-submodules -j8 git@github.com:wo1fsea/yapre.git
> cd yapre
> sh ./build_scripts/build_linux.sh

generate ios xcode project on mac

for devices

> git clone --recurse-submodules -j8 git@github.com:wo1fsea/yapre.git
> cd yapre
> sh ./build_scripts/build_ios.sh

for simulators

> git clone --recurse-submodules -j8 git@github.com:wo1fsea/yapre.git
> cd yapre
> sh ./build_scripts/build_ios_simulator.sh

generate android studio project on mac

> git clone --recurse-submodules -j8 git@github.com:wo1fsea/yapre.git
> cd yapre
> sh ./build_scripts/build_android.sh

build emscripten version on mac/linux

build

> git clone --recurse-submodules -j8 git@github.com:wo1fsea/yapre.git
> cd yapre
> sh ./build_scripts/build_emscripten.sh

test run

> sh ./build_scripts/run_emscripten.sh

API

System

Init()

Deinit()

Update()

yapre.platform

yapre.Exit()

yapre.AddTimer(time_ms, callback_function)

Audio

yapre.Beep(freq, duration_ms)

Video

yapre.RenderSize(width, height)

yapre.SetClearColor(r, g, b, a)

yapre.DrawSprite(texture_path, x, y, z, width, height, rotate, r, g, b)

Input

yapre.BindKeyboardInputCallback(key, callback_function)

yapre.UnbindKeyboardInputCallback(key)

yapre.BindMouseInputCallback(key, callback_function)

yapre.UnbindMouseInputCallback(key)

yapre.BindTouchInputCallback(key, callback_function)

yapre.UnbindTouchInputCallback(key)