libretro-chailove/README.md
2018-03-21 09:28:33 -07:00

3.1 KiB

ChaiLove

Build Status platform libretro Documentation

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.

Floppy Bird Gameplay

Games

Usage

ChaiLove is a libretro core, which can be run through RetroArch. Floppy Bird is a free game you can download and play...

  1. Run RetroArch
  2. Online UpdaterCore UpdatorChaiLove
  3. Online UpdaterContent DownloaderChaiLoveFloppy Bird
  4. Load ContentDownloadsFloppy Bird.chailove

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

wget https://buildbot.libretro.com/assets/cores/ChaiLove/Floppy%20Bird.chailove
retroarch -L chailove_libretro.so Floppy\ Bird.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.

Compiling

Use the following command to compile the core:

make

Testing

Run the automated tests by executing:

make test

Run the usability tests with:

retroarch -L chailove_libretro.so test/main.chai

Documentation

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

make docs

Authors

The following individuals contributed to ChaiLove: