From acc46194bd4838470b7c9c286832098c874ea909 Mon Sep 17 00:00:00 2001 From: Rob Loach Date: Thu, 13 Jul 2017 18:22:08 -0400 Subject: [PATCH] Update documentation --- README.md | 42 +++++++++++++++++++++++------------------- chaigame/src/Config.h | 4 ++-- 2 files changed, 25 insertions(+), 21 deletions(-) diff --git a/README.md b/README.md index 1cfbf2c..2c11ec0 100644 --- a/README.md +++ b/README.md @@ -1,25 +1,37 @@ # ChaiGame -Experimental framework to make 2D games with [libretro](https://www.libretro.com), inspired by [LÖVE](https://love2d.org). - -## Features - -- [libretro](https://www.libretro.com) -- [SDL](https://www.libsdl.org) -- [ChaiScript](http://chaiscript.com) -- [PhysFS](https://www.icculus.org/physfs/) +Framework to make 2D games with [ChaiScript](http://chaiscript.com/) and [libretro](https://www.libretro.com)/[RetroArch](http://retroarch.com). ## Usage -TODO: Add usage documentation. +ChaiGame is roughly inspired by the [LÖVE API](https://love2d.org/wiki/Main_Page). The following `main.chai` is a Hello World sample application: + +``` lua +def draw() { + graphics.print("Hello World!", 400, 300) +} +``` + +To run it, execute the following: + +``` +retroarch -L chaigame_libretro.so main.chai +``` ## Development -Building takes some time, so be patient. +Building ChaiGame takes some time, so have patience. Use the following command to compile the core: ``` make -retroarch -L chaigame_libretro.so main.chai +``` + +### Testing + +To compile and run the testing framework, use: + +``` +make testscripts ``` ### Flags @@ -32,11 +44,3 @@ There are a few flags you can enable to change how Chai is compiled and used. ``` make HAVE_CHAISCRIPT=0 HAVE_TESTS=1 ``` - -### Testing - -To compile and run the testing framework, use: - -``` -make test -``` diff --git a/chaigame/src/Config.h b/chaigame/src/Config.h index aa6d70e..5681d1f 100644 --- a/chaigame/src/Config.h +++ b/chaigame/src/Config.h @@ -5,8 +5,8 @@ namespace chaigame { struct windowConfig { - int width = 640; - int height = 480; + int width = 800; + int height = 600; int bbp = 32; std::string title = "ChaiGame"; };