libretro-chailove/README.md
2017-12-28 23:41:06 -05:00

2.7 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.

ChaiLove Benchmark Screenshot

Games

Usage

ChaiLove is a libretro core, which can be run through RetroArch. To play the sample game Floppy Bird...

  1. Run RetroArch
  2. Online UpdaterCore UpdatorChaiLove
  3. Online UpdaterContent DownloaderChaiLoveFloppy Bird
  4. Load ContentDownloadsFloppy 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: