Skip to content

Implementing Minigames

Moraguma edited this page Apr 10, 2023 · 1 revision

This guide will cover the basic workflow for implementing a minigame into the full version of Gamutoware. This includes getting the minigame to run as part of a minigame pack, removing unnecessary or compressing large files, getting rid of bugs, and ensuring the minigame has all the features it needs for full implementation.

This guide supposes that the reader is already familiar with the basic workings of Gamutoware's minigames and core. It is recommended that you read the pages covering these topics before reading this guide.

Cloning

In the vast majority of cases, minigames aren't ready to be implemented as they are and, as such, they shouldn't be merged directly into master. Instead, you should clone the branch of the minigame's implementation and open a new pull request to make the modifications needed before the minigame is ready to be put into Gamutoware. In this guide, we will follow the implementation of This PR, implemented here.

First, we will create a new branch to test the changes.

git checkout -b project-name
git pull repository-link branch-name

In this case, we do:

git checkout -b projeto-tiago-perrupato
git pull https://github.com/tiagoperrupato/GamutoWare.git meu-projeto

Note that if you have uncommitted changes, you may have to use git stash to stash them before pulling.

Now, you should have a local copy of the minigame's implementation to work with.

Removing unneeded files

This PR includes a lot of changes to /.godot. to remove them to the PR and make sure only the minigame is included in the PR, we do:

git reset
git add microjogos/2023S1/projeto-tiagoperrupato/
git commit -m 'Removes unneeded files'
git push

Make sure that all files needed for the minigame to run are in its folder before doing this. Most of the 2023 projects were made referencing the main.gd script in seu_projeto instead of the one in their own folder.

After this, you can go to git and open a new pull request and label it as Minigame Implementation.

Adding features

Some minigames are missing essential features. Particularly, PRs are usually tagged with Missing Sound, Missing Icon or Incomplete Credits if there is something essential missing in a minigame. In this case, we have an icon that doesn't fit the 450x450 model, so we will replace it and push a new commit. Make sure only to merge minigames that have all these issues solved.

Compressing files

All minigames are loaded when the game starts, so we want to make sure they're as light as possible. Remove unused files from the minigame folder and cut songs to 7 seconds long. It is possible to reduce most projects to less than 1 Mb.

Adding to a minigame pack

Adding a minigame to a minigame pack and making it playable means adding the paths to its main scene, cover and credits to res://principal/recursos/data/Minigames.gd. Make the needed changes to that file and commit them.

Testing

Run the minigame pack in the minigame and test if the minigame is working for both the winning and losing cases. If there is something wrong, discover what it is and fix it.

After everything is done, you can merge your PR into main. If you run into any problems, feel free to ask Moraguma for help!

Clone this wiki locally