❤️ 2D Game Framework with ChaiScript
Go to file
2017-11-04 12:24:43 -04:00
examples Rename to ChaiLove 2017-10-28 18:00:32 -04:00
src Allow loading chaigame files 2017-11-03 00:19:28 -04:00
test Rename to ChaiLove 2017-10-28 18:00:32 -04:00
vendor Update to the ChaiScript_Extras disable flag 2017-10-31 20:18:29 -04:00
.editorconfig Initial commit 2017-06-19 15:30:00 -04:00
.gitignore Add more state support 2017-09-19 12:00:04 -04:00
.gitmodules Remove the old ChaiScript_Extras 2017-10-31 12:07:30 -04:00
.travis.yml Fix core name in Travis 2017-10-30 02:46:58 -04:00
chailove_libretro.info 0.6.0 2017-10-30 13:59:26 -04: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
main.chai Rename to ChaiLove 2017-10-28 18:00:32 -04:00
Makefile Remove OSX flags 2017-11-04 12:24:43 -04:00
Makefile.common Disable ChaiScript's isnan() and isinf() 2017-10-31 20:19:31 -04:00
Makefile.libretro Update the Makefile 2017-10-19 16:22:40 -07:00
README.md Fix badge status 2017-10-30 01:51:17 -04: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

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

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

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