Narrat games can have different screens which are 2D images used to illustrate the story. Screens are also interactive and can have buttons to click on elementsNarrat games can have different screens
In narrat games, the right side of the screen has the dialogue system, while the left side has the screens.
Screens mostly serve to illustrate a scene, in the way visual novel type games do. They can also be used to provide "point and click" features with interactive buttons, or be used as choice menus (for example an interactive map)
- id: shopButton
- id: parkButton
The path of
screens.yamlcan be customised in the main config file:
background: This is the id of an image loaded by the engine. Images are defined in the
imagessection of the config
buttons: This is an array of ids of interactive buttons that exist in the screen.
The path of
buttons.yamlcan be customised in the main config file:
enabled: Whether this button is enabled by default or not (this can later be changed on and off in the game's script)
background: ID of the image to use as the image for that button
position: An object with
heightto place the button in pixels relative to the top left of the screen. The size of the screen is defined in the
layoutpart of the config, for reference.
action: Defines which script label should be run when the button is clicked.
For example, with the following game script:
"You have reached the park!"
This script would be triggered by pressing the
mapscreen defined above.
defaultscreen must always exist, as it is the first screen the game gets loaded with.
Buttons can also have a
tagproperty in their config to use interaction tag, the same way inventory items can. See the guide below for more info on interaction tags (in the interaction tags section):
set_screenfunction switches the game to a different screen:
set_buttonfunction can enable or disable a button
set_button parkButton true