-
Notifications
You must be signed in to change notification settings - Fork 97
Minigame Coding
Minigames in Gamutoware must have certain signals and variables that will interact with the minigame loader. This page will explain the basics of minigame implementation.
Minigames will be loaded with the resolution given by the WIDTH and HEIGHT constants and then scaled up to fit the screen. You can change these to any value, but the must maintain the aspect ratio of 16:9
The default _ready() function uses NotificationCenter to display an explanation text at the start of a minigame. It is recommended that minigames change this text to provide a clue as to what the player should do once the minigame starts.
The minigame loader will constantly listen to the win and lose signals in the minigame's script to determine whether the minigame has been won or lost. By default, the minigame will be lost. The functions register_win() and register_lose() can be called to change the won state of the minigame. At the end of the minigame time, either the last function called will determine whether the game was won or lost or, if neither function was ever called, the minigame will be lost.