libretro-chailove/README.md
2017-09-04 19:12:47 -04:00

1.3 KiB

ChaiGame Build Status

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

ChaiGame Benchmark Screenshot

Games

Usage

ChaiGame is roughly inspired by the LÖVE API. The following main.chai is a Hello World sample application:

def load() {
	// Load assets.
}

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

def update(delta) {
	// Change something on the screen.
}

To run it, execute the following:

retroarch -L chaigame_libretro.so main.chai

Development

Building ChaiGame 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

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