3
ModuleApiGameLibGameDetails
Mees van der Wijk edited this page 2025-08-09 17:39:07 +02:00

ModuleApi - GameLib GameDetails

The game details decribe basic information about the game and specifies how the controller should behave.

Structure

{
   	"name": "Game Name",
	"description": "Game Description.",

    "hints"	: [
		"Hint A",
		"Hint B"
	],
	"icon": "/addressOfGameIcon",
	"controls": [
		control
    ]
}

Attribute Type Description
name string The name of the game.
description string The description of the game.
hints string[] List of hints for the game.
(Optional) icon string Path to the icon of the module.
controls Control The actions the controller should respect.

Control

Specifies an possible control to the controller. There is a standardized set of possible controls to ensure cooperability between controllers. If your game needs additional controls you can use custom actions.

Standard control

{
   	"type": "normal",
	"action": "up",
	"mode": "binary"
}

Attribute Type Description
type "normal" The type of control.
action "left" / "right" / "up" / "down" / "upleft" / "upright" / "downleft" / "downright" / "start" / "select" / "back" / "identify" The action to use.
mode "binary" / "analog" The mode of the control. Use binary for one step or use analog for multiple steps.
(Optional) steps number Only works when mode is analog. The amount of steps the action has.

Custom control

{
   	"type": "custom",
	"action": "rotate",
	"mode": "binary"
}

Attribute Type Description
type "normal" The type of control.
action string Any custom action id.
mode "binary" / "analog" The mode of the control. Use binary for one step or use analog for multiple steps.
(Optional) steps number Only works when mode is analog. The amount of steps the action has.