2.7 KiB
ChaiLove
Framework to make 2D games with ChaiScript and libretro/RetroArch. It's free, open-source, and works on Windows, Mac OS X, Linux, and ARM.
Games
Usage
ChaiLove is a libretro core, which can be run through RetroArch. To play the sample game Floppy Bird...
- Run RetroArch
- Online Updater → Core Updator → ChaiLove
- Online Updater → Content Downloader → ChaiLove → Floppy Bird
- Load Content → Downloads → Floppy Bird.chailove
You can also run ChaiLove through the command line by using:
retroarch -L chailove_libretro.so path/to/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
def load() {
logo = love.graphics.newImage("logo.png")
}
def draw() {
love.graphics.print("Hello World!", 400, 300)
love.graphics.draw(logo, 100, 100)
}
def update(delta) {
// Change something on the screen.
}
To run it, execute the following:
retroarch -L chailove_libretro.so main.chai
Development
Behind ChaiLove, there's the documentation, compiling it, along with testing.
Documentation
Visit the ChaiLove API documentation. Build it through Doxygen by using:
make docs
Compiling
Use the following command to compile the core:
make
Testing
To compile and run the testing framework, use:
retroarch -L chailove_libretro.so test/main.chai
You can run the unit tests, by executing:
make unittest
Authors
The following individuals contributed to ChaiLove: