How to use version control for GameMaker with GitHub

Learn how to back up your files and to collaborate in a team using Git as a version control solution on your GameMaker project.

George Neguceanu
August 14, 2024
7
min read
Content

In this tutorial, we will set up GitHub for a GameMaker project, using Anchorpoint as a Git client to push and pull our files to and from GitHub. This all works with the free version of Anchorpoint.

Gamemaker’s SCM

While we won't cover GameMaker's official version control plugin in this article, the engine does have its own Git plugin. This can be accessed through the engine, but you will still need Git and a cloud repository such as GitHub, Azure DevOps, or GitLab.

GameMaker's version control plugin menu
GameMaker’s version control plugin.

Git and GitHub

Used by over 90% of all software development projects, Git is a widely used version control system that has a huge ecosystem with services like GitHub, GitLab or Azure DevOps.

GitHub is one of the most popular cloud repositories used with the Git version control system, and comes with several additional features that can help you manage and automate tasks.

To upload your files to the GitHub cloud service, you can use Git's version control commands or, much easier, a desktop application like Anchorpoint that pushes and pulls files to GitHub.

Git and GitHub image
Git is the version control system, and GitHub is a cloud service provider based on Git.

Benefits of using Git and GitHub

  • Cloud storage of your projects files on GitHub, Azure DevOps or GitLab
  • Synchronization between your team and other computers
  • Ability to add documentation to your changes
  • Work on and merge different branches 

Is it free?

While Git is a free and open source version control system, GitHub has several tiers, starting with a free tier for unlimited users that provides 1GB of storage and 1GB of monthly bandwidth. Alternatively, if your project is large, you can use Azure DevOps, which is free for 5 users and has unlimited storage.

Git for game developers

Anchorpoint is a free and simplified version control solution that was made for non-technical users.
Learn about Anchorpoint

Setting up GitHub

The first thing we need to do is set up GitHub, which will be used as the repository for our GameMaker project.

GitHub account creation page
Go to GitHub.com and create an account. Once done, we will create the repository by following the next steps below.

Setting up your Git desktop application

For this example, we will use Anchorpoint, but any other Git client will work as well. If you choose to use a different Git client, you'll need to create the repository on GitHub and then copy the remote URL into your Git client. With Anchorpoint, we will take advantage of the GitHub integration.

Anchorpoint app login window
Download and install Anchorpoint and create an account.
Anchorpoint app projects overview window
Scroll down to the Integration section and click "Connect Application". If you don't see this page, simply create a new tab.
Anchorpoint app workspace settings integrations page
Look for GitHub and click on "Connect".
Anchorpoint authorize window
Your web browser should open to this page. Click "Authorize Anchorpoint Software".
Sign in to Github browser popup
This popup will show up after. This is the Git credential manager that checks if you have access to the Git repository on GitHub. Just "Sign in with your browser"
Authorize Git Credential Manager in Anchorpoint
Finally, you need to authorize the Git credentials manager on GitHub. Just click on "Authorize git-ecosystem".
Connect to Github on Anchorpoint app
Now "Test and Activate" the GitHub integration in Anchorpoint.
Anchorpoint integrations page connected to Github
If everything is fine, it should be marked as "Connected". You can close this popup now.
Creating a new project in Anchorpoint
Create a new project.
Git Repository options when creating a project in Anchorpoint
Select "Git Repository". Browse to the location of your GameMaker project. In the Remote Settings, select "New GitHub Repository" and "No .gitignore" for the template. Then press "Continue".
Assinging members in Anchorpoint
In this section, you add members to Anchorpoint. You will need to add them later on GitHub as well. Just enter their email and click Send Invite.
Add member on Github in Anchorpoint
Once the project is created, Anchorpoint will tell you that you need to add your members on GitHub.
Adding collaborators on Github
Clicking on the "Add Member" button in Anchorpoint will take you here. Click "Add People" and add your team members to GitHub. They may need to create a GitHub account before they can work with you on the project.
Initial Commit of a GameMaker project in Anchorpoint
Time to push your files. Click on "Timeline", then "Changed Files", add a name such as “Initial Commit” and then click on "Sync". This will upload all your files to GitHub.
GameMaker project overview on GitHub
After you push your files, this is what your repository looks like on GitHub.

The Workflow

It's important to make daily commits a routine part of your workflow. Whenever you make a significant change, such as creating a new version of your character or implementing a major change to a game mechanic, you should commit those changes. Git commits are fast because they happen locally. Once the commit is complete, you can continue working while all your files are pushed to GitHub in the background.

When using Anchorpoint to work in Git is basically a two-button solution. For example: You browse your Timeline, add a comment and then press Push. 

Here are the usual steps to follow:

  1. You do your work in GameMaker.
  2. You open the Timeline in Anchorpoint, add a comment, and press Push.
  3. To get your changes, your team member has to Pull them.
  4. Your team members do their work in GameMaker.
  5. Your team member comments on their work and presses Push as well.

Branching, Merging and File Locking

To avoid file conflicts, some teams work in two or more branches. One might be for programming, and another for design/art. Then, once a week, the programmers might merge the branches. Others work on copies of the same level, one for coding and one for design/art, and again merge them at the end of the week.

Desktop version control applications like Anchorpoint have a file locking system that allows you to lock a file while you are working on it, which can prevent conflicts as you work on the project.

What your team members must do

GitHub: They need to create a GitHub account and accept your invite.

Anchorpoint:  After receiving your invitation email from Anchorpoint, they will need to download, install and create an account. Once this is done, the first time they open Anchorpoint, they will have to accept the invitation and the project will be detected and opened automatically.

Joining a GitHub project as a team member in Anchorpoint
Your team member has to click Join Git Repository.

On clicking Join Git Repository, Anchorpoint will ask for a location where the files will be downloaded, and in some cases, a popup will appear requiring your team to install Git before Anchorpoint can proceed.

During the download process, another pop-up window from GitHub will appear that will require your member to authenticate with GitHub in order for Anchorpoint to download the files.

GitHub Limitations

GitHub's free plan has some limitations when it comes to storage and bandwidth, and when you hit those limits, the push will be rejected in Anchorpoint and you'll get an error message. If your project is large, you may want to explore other options such as Azure DevOps or self hosting your Git server with Gitea.

Individual file size limitations

GitHub's free tier plan limits file sizes to 2GB using Git LFS. This limit increases to 4GB if you are on a paid plan.

Repository limitations

The free plan gives you 1GB of free repository space and 1GB of monthly bandwidth. If you need more, you will need to purchase LFS storage packages.

Frequently asked questions

What is Git LFS?

Git was originally designed to handle code, which consists primarily of text files. However, games contain a large number of binary files, such as 3D models, textures, and sound files. To maintain efficiency and avoid downloading the entire history of your 3D models and textures, Git introduced an add-on in 2014 called Git LFS (Large File Storage). This add-on has since become a standard feature in nearly every Git product and service.

When you choose a Git hosting provider like GitHub, GitLab or Azure DevOps, you have to look at their Git LFS costs.

How does branching work?

When a project becomes more complex or the team gets bigger, friction arises. Work in progress commits from e.g. developers can disturb the work of the artist. To prevent this, you can split the project into certain zones. Each zone can then be used by a developer or artist without getting in each other’s way. When the work is finished, these zones are dissolved and merged into the project. Git calls this feature, branches. A short video in our documentation explains them pretty well.

If you need branches, Anchorpoint allows you to create and toggle them using the drop-down list in the Timeline next to the Pull button.

Are there good alternatives to GitHub?

GitHub works well for smaller projects, but once your project size reaches double-digit gigabytes, it's wiser to choose a different Git hosting provider like Azure DevOps or consider self-hosting your Git server. To save you the time and effort of researching your options, we've done a comparison in 2022.