0.1.3 • Published 5 years ago
kibounohana v0.1.3
Kibounohana (希望の花)
Introduction
Web-based AVG engine.
Usage
Include Kibounohana JS File
yarn add kibounohana<script src="./node_modules/kibounohana/index.js"></script>Write Your Story
See neruthes/kibounohana-demo for demo and here is the online demo.
Sample story:
const myGame = {};
myGame.scenes = {
    s0: {
        type: 'basic',
        dialogue: [
            { char: 'Alice', bg: '1.png', text: 'Hey, Bob!' },
            { char: 'Bob', bg: '2.png', text: 'How are you, Alice!' }
        ],
        choices: [
            { label: 'Start Over', jump: 's0' }
        ]
    }
};Boot The game
kibounohana.Initd.boot(myGame, '#displayTarget');This method accept 2 arguments:
| Argument | Description | 
|---|---|
| arg1 | Game story object. | 
| arg2 | CSS selector string for the display target. | 
Notice These As Well
- Set kibounohana.config.deploymentTargetto un string likehttp://localhost:8000.
- Background images for dialogues should be placed in /assets/img/.
- You can define your own scene types (eg mySceneType) by settingkibounohana.View.renderMainView_mySceneTypeas un function which acceptcurrentSceneObjasarguments[0].
Copyright
Copyright (c) 2020 Neruthes.
Published under GNU AGPL v3.