-
Notifications
You must be signed in to change notification settings - Fork 1
Storyboard
A mini-game is described in a single JSON file termed storyboard.json. This file is an array of various objects (or nodes) — defined by a unique ID — belonging to one of these five categories (called class, here):
sceneitemswitchmachine-
sprite(all the other cases). See definition in Wikipedia.
A storyboard.json is thus organized as follows:
[
{"id":1 , "class"="scene", ...},
{"id":5 , "class"="item", ...},
{"id":17, "class"="switch", ...},
{"id":22, "class"="machine", ...},
{"id":34, "class"="machine.lockDigit[4]", ...}
]The storyboard describes a scenegraph [Wikipedia] . Thus, in this data structure, objects are classified in two categories:
- Group Objects containing children like
scene,switch. - Leaf Objects like
machine,item, andsprite.
Each object is defined by a unique ID and at minima contains:
-
id: a numerical identifier. -
class: a class amongscene,item,switch,machine, andsprite. -
description: A comment describing the object. Not use by the crazyBioGame Engine. -
display: a section defining how the object is displayed in the scene. Not mandatory forswitch -
features: a parameter section defining the object's behavior. Not mandatory forspritesor forswitch
{
"id": 12,
"class":"item",
"description": "A cup",
"display":{
"height":210,
"width":340,
"media":{
"image":"assets/yourimage.png"
},
},
"features": {
"popup" : {
"title": "A cup of coffee"
}
}Sometimes, the objects must be displayed in the scene (with or without user interaction).
...
"display": {
"position": [100,200],
"width": 512,
"height": 256,
"media": {
"image": "path/filename.png"
}
}
...If you want to display an audio file or a video you must replace the property image by, respectively audio or video
Except the scene, most of the objects are available via a user interaction (pointer click) and displayed in a popup window. The window contains a maximum of three parts:
- a
title( mandatory - a single line of text) - a
contentsection [optional] - a
graphicssection [optional]
using the following layout.

| Popup Layout |
|---|
| A popup contains a maximum of three sub-sections corresponding to the (i) description, (ii) content, and (iii) graphics |
and the corresponding JSON ...
...
"popup": {
"title": "Description"
"content": [
"<h3>Content</h3>",
"<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. ",
"Phasellus volutpat bibendum egestas. ",
"Sed euismod et tellus vel finibus. Quisque ac ipsum ut ipsum pulvinar hen.</p>"
],
"media": {
"image": "path/filename.png"
}
}
...