Skip to content

libretro/libretro-chailove

Folders and files

NameName
Last commit message
Last commit date

Latest commit

467cd45 · Feb 13, 2025
Feb 5, 2025
Feb 5, 2025
Feb 5, 2025
May 10, 2022
Feb 13, 2025
Feb 8, 2025
Feb 8, 2025
Jun 19, 2017
Mar 14, 2020
Nov 3, 2018
May 7, 2022
Feb 5, 2025
Feb 5, 2025
Feb 5, 2025
Feb 7, 2025
Feb 8, 2025
Feb 5, 2025
May 2, 2018
Jun 20, 2017

Repository files navigation

ChaiLove ❤️

Tests platform libretro Documentation

ChaiLove is an awesome framework you can use to make 2D games in ChaiScript. It's free, open-source, and works on Windows, Mac OS X, Linux, Android, and ARM through libretro/RetroArch.

Floppy Bird Gameplay

Gallery

Installation

ChaiLove is a libretro core, which can be installed through RetroArch.

  1. Run RetroArch
  2. Online UpdaterCore UpdatorChaiLove

Usage

Floppy Bird is a free game you can download and play...

  1. Run RetroArch
  2. Online UpdaterContent DownloaderChaiLoveFloppyBird.chailove
  3. Load ContentDownloadsFloppyBird.chailove

Alternatively, you can run the ChaiLove core through RetroArch via the command line:

curl -o FloppyBird.chailove https://github.com/RobLoach/ChaiLove-FloppyBird/releases/download/1.0.1/FloppyBird.chailove
retroarch -L chailove_libretro.so FloppyBird.chailove

API

The ChaiLove API is roughly inspired by the LÖVE API. The following main.chai is a simple Hello World example:

global logo
global x = 10.0f

def load() {
	logo = love.graphics.newImage("logo.png")
}

def draw() {
	love.graphics.print("Hello World!", 400, 300)
	love.graphics.draw(logo, x, 100)
}

def update(dt) {
	x = x + 20.0f * dt
}

To run it, execute the following:

retroarch -L chailove_libretro.so main.chai

See the ChaiLove API for coverage of all the callbacks and methods in ChaiLove.

Development

ChaiLove is built with pntr_app under the hood to handle its graphics, audio and input.

Compiling

ChaiLove requires a C++14 compiler, and has been tested with g++>=5.2. To compile it, run:

git submodule update --init
make

Testing

The automated tests can be run with:

make test

Run the testing suite through RetroArch with:

retroarch -L chailove_libretro.so test/main.chai

Documentation

See the ChaiLove API documentation. Build it through Doxygen by using:

make docs

Contributors

The following individuals contributed to ChaiLove in some way:

And many others!

License

MIT