This is a microgame collection developed with the Godot Engine. The microgames are made by participants in a game jam during the GPN23.
To add a new micogame, follow these steps:
- Fork this repository.
- Create a new directory for your game in
microgames/. - Create your game. The script of the main scene should extend the
MicroGameclass and send thefinishedsignal to indicate a win or a loss. When the time is up, theon_timeoutfunction will be called. By default, it will returnResult.Loss, but this behaviour can be overwritten. You can also adjust the default time by editing thetimeexport var. - Add your main scene to the
scenesarray inmicrogames/microgames.gd. - Open a PR with your changes.
For an example, take a look at microgames/hello/.
left, right, up, down and submit for input methods! This way the game is playable with only keyboard or only game pad.
The MicroGame class provides the interface for a microgame.
-
signal finishedThis signal must be emitted on a win (
finished.emit(Result.Win))) or loss (finished.emit(Result.Loss))). Only the first signal emitted will be considered. -
func timeoutThis function is called, when the timer expires. By default, it returns
Result.Loss(i.e. you loose if the time ri). You can overwrite this behaviour, for example to check a condition on timeout. -
@export var timeThe default time for your microgame. This time will get scaled down the more microgames you complete (currently to a maximum of 0.4). Since this is an export var, it should be changed in your main scene via the properties editor.
-
storageA dictionary that is persistent per run (i.e. it will be reset when you're at the scoreboard). For example, it can be used to track how often your microgame was played in the current run.