❤️ 2D Game Framework with ChaiScript
Go to file
Rob Loach b11c909336
Some checks failed
Build / linux (push) Has been cancelled
Add git submodule docs
2024-11-05 17:51:53 -05:00
.github/workflows Update GitHub Actions 2023-09-29 10:10:39 -04:00
docs 1.0.0 2019-08-23 01:19:27 -04:00
examples vendor: Fix libretro-common changes 2022-01-02 14:01:30 -05:00
jni Switch straight file I/O to VFS 2022-05-11 01:54:03 +02:00
src v1.3.0 2024-05-11 20:15:59 -04:00
test Remove love.filesystem.remove() 2022-04-16 23:38:27 -04:00
vendor Update noarch 2024-05-18 10:16:42 -04:00
.editorconfig Initial commit 2017-06-19 15:30:00 -04:00
.gitattributes Create .gitattributes 2020-03-14 11:48:14 -04:00
.gitignore Replace filesystem/path.h 2018-11-03 18:54:15 -04:00
.gitlab-ci.yml Add switch compilation 2022-05-07 03:18:50 +02:00
.gitmodules SDL_tty: Update 2023-09-23 23:15:51 +02:00
CHANGELOG.md v1.3.0 (#428) 2024-05-11 20:14:30 -04:00
configure 0.21.0 (#243) 2018-05-02 10:14:53 -04:00
COPYING 1.0.0 2019-08-23 01:19:27 -04:00
link.T Add ChaiScript 2017-06-19 23:03:52 -04:00
Makefile Remove cpplint from make test 2023-09-29 11:19:51 -04:00
Makefile.common v1.3.0 (#428) 2024-05-11 20:14:30 -04:00
Makefile.libretro tvos: properly set min supported version 2024-10-15 12:39:57 -04:00
README.md Add git submodule docs 2024-11-05 17:51:53 -05:00

ChaiLove ❤️

Tests platform libretro Documentation

ChaiLove is an awesome framework you can use to make 2D games in ChaiScript. It's free, open-source, and works on Windows, Mac OS X, Linux, Android, and ARM through libretro/RetroArch.

Floppy Bird Gameplay

Installation

ChaiLove is a libretro core, which can be installed through RetroArch.

  1. Run RetroArch
  2. Online UpdaterCore UpdatorChaiLove

Usage

Floppy Bird is a free game you can download and play...

  1. Run RetroArch
  2. Online UpdaterContent DownloaderChaiLoveFloppyBird.chailove
  3. Load ContentDownloadsFloppyBird.chailove

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

curl -o FloppyBird.chailove https://github.com/RobLoach/ChaiLove-FloppyBird/releases/download/1.0.1/FloppyBird.chailove
retroarch -L chailove_libretro.so 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
global x = 10.0f

def load() {
	logo = love.graphics.newImage("logo.png")
}

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

def update(dt) {
	x = x + 20.0f * dt
}

To run it, execute the following:

retroarch -L chailove_libretro.so main.chai

See the ChaiLove API for coverage of all the callbacks and methods in ChaiLove.

Development

The following are some notes about the development process behind ChaiLove.

Compiling

ChaiLove requires a C++14 compiler, and has been tested with g++>=5.2. To compile it, run:

git submodule update --init
make

Testing

The automated tests can be run with:

make test

Run the testing suite through RetroArch with:

retroarch -L chailove_libretro.so test/main.chai

Documentation

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

make docs

Contributors

The following individuals contributed to ChaiLove in some way: