❤️ 2D Game Framework with ChaiScript
Go to file
2017-11-29 11:58:54 -05:00
docs 0.9.0 2017-11-25 23:59:25 -05:00
examples Merge branch 'master' into simple-docs 2017-11-18 21:54:21 -05:00
jni Update Android.mk 2017-11-04 20:02:42 +01:00
src Update docs 2017-11-28 01:40:17 -05:00
test Add throwing an exception on fail 2017-11-29 03:03:11 -05:00
vendor Add noarch 2017-11-29 01:30:05 -05:00
.editorconfig Initial commit 2017-06-19 15:30:00 -04:00
.gitignore Fix deployment script 2017-11-18 19:35:35 -05:00
.gitmodules Add noarch 2017-11-29 01:30:05 -05:00
.travis.yml Add Unit Testing 2017-11-29 01:35:12 -05:00
chailove_libretro.info 0.9.0 2017-11-25 23:59:25 -05:00
configure Rename to ChaiLove 2017-10-28 18:00:32 -04:00
LICENSE.md Rename to ChaiLove 2017-10-28 18:00:32 -04:00
link.T Add ChaiScript 2017-06-19 23:03:52 -04:00
Makefile Update noarch command 2017-11-29 11:58:54 -05:00
Makefile.common Update testing 2017-11-29 02:31:31 -05:00
Makefile.libretro Remove SOURCES_C 2017-11-28 01:58:30 -05:00
README.md Merge branch 'master' into simple-docs 2017-11-18 21:54:21 -05:00

ChaiLove

Build Status platform libretro

Framework to make 2D games with ChaiScript and libretro/RetroArch.

ChaiLove Benchmark Screenshot

Games

Usage

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

  1. Run RetroArch
  2. Download the ChaiLove core through RetroArch at Online UpdaterCore UpdatorChaiLove
  3. Download Floppy Bird through RetroArch at Online UpdaterContent DownloaderChaiLoveFloppy Bird
  4. Launch the game over through Load ContentDownloadsFloppy 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 = graphics.newImage("logo.png")
}

def draw() {
    graphics.print("Hello World!", 400, 300)
    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

Building ChaiLove takes some time, so have patience. Use the following command to compile the core:

make

Testing

To compile and run the testing framework, use:

make examples

Documentation

make docs

Flags

There are a few flags you can enable to change how Chai is compiled and used.

  • HAVE_CHAISCRIPT=0 Remove the scripting environment for fast compilation
  • HAVE_TESTS=1 Enables test/Test.cpp for testing
make HAVE_CHAISCRIPT=0 HAVE_TESTS=1