A logic game based on the Clips rule engine.
Play it here: https://md5crypt.github.io/clipsgame/
https://md5crypt.github.io/clipsgame/#how-to-play
contact me :D - borsuczek (at) gmail (dot) com
- adding levels does not require rebuilding the application
- level definition files are located in the
levelsfolder levels/index.jsonholds a list of available levels, The order of elements defines the level order- for each level two files should exist
<name>.clpfile with the level's clips code<name>.jsonfile with the level's definition (see below)
export interface LevelDefinition {
/** title displayed in the header */
title: string
/** description / flavor text, markdown enabled */
description: string
/** goal description, markdown enabled, markdown enabled */
goalDescription: string
/** message displayed after completing the level, markdown enabled */
winMessage: string
/**
* the fact / facts needed to complete the game
* facts need to be given with ( ) and exactly one space
* between words
*/
goal: string | string[]
/**
* array of restricted facts
* - facts need to be given with ( ) and exactly one space
* between words
* - ? can be used instead of a word to match all words
* - | can be used to create word union
* example: (foo bar|baz)
*/
tabu?: string[]
/** amount of allowed assertions, omit or set to -1 for not restriction */
limit?: number
}npm install
npm run buildTo start the local dev server
npm startMake sure emscripten is installed and:
cd clips
./build.shNote that:
- build set up to work with emsdk 4.0.13
- using older version will not work due to use of custom syscall wrappers
- using newer version might not work for the same reasons but results can vary
- CLIPS source code link in
build.shmight be broken