Lets Buiding a Timberman Game in GameMaker Studio 2

In this tutorial, we will quickly build a Timberman clone for PC/Mac using GameMaker Studio 2. This is my first ever video tutorial and I hope to make future video tutorials more polished. Feedback in the comments section of this article or on YouTube is appreciated. The tutorial is supported by comprehensive screenshots, notes, and free asset download bundle. Timberman is a highly addictive game with lots of features like unlockable skins and online multiplayer challenges. If you have never played it then I definitely recommend you do. Timberman is free (ad supported) on mobile and last time I checked it was just a dollar on Steam for the desktop version.

Here is another image of the game that we will build.


Here is the actual video (or view it directly on YouTube)

The download bundle

Here is what you get:


You also get three sound effects used in the game.

Download by clicking the button below and unzip the contents. Add the two folders which contain all the images and sound effects into the same folder where you created the Timberman project in GameMaker Studio 2.


The code

What follows is just a brief explanation and a screenshot of the GameMaker Studio 2 code. For a full discussion please watch the video. Here are the images of the code:


This object has code in two events,



: The

event prepares the

instances to zoom off at a speed of

moving up and to the right.


: The Step event detects when the log leaves the screen by constantly checking whether x > 1920. When it is the instance is destroyed.




This object has three events. They are




: The only thing that happens during this event is the built-in

variable is set to zero.


: When the player releases the left arrow key, this code will spawn a log and play the chopping sound effect. Next, it will add ten points to the player’s score and add .15 of a second on to the time the player has left. Note that once the log is spawned, the code in the log instance takes over what will happen to it.


: The code and explanation for this event is exactly the same as the



This object has the most events with code in them. None of them are complicated, however.

: The code checks if the branch that has been collided with is visible and if it is it plays a death sound and goes back to the start screen.


: This code which side of the tree the player is standing on and then it spawns an instance of

in the appropriate place.


: The code and explanation for this event will be the same as the previous event.

: The code in this event positions the

on the left-hand side and scales its sprite so it is facing in the correct direction.


: The code and explanation for this event is the same as the previous event with the exception that horizontal scaling is set to

and the

variable/coordinate is set to



: This simply destroys (despawns) the instance.


: This event contains the same code as the previous event.


: This code sets

up ready to fly with a random speed and heading to the left of the screen.


: This code checks each and every frame(step) whether the bee has left the left of the screen and if it has it spawns it back on the right with a random height and speed.




: This code is discussed in great detail in the video so if it is causing you trouble be sure to take a look. The code checks if a branch has arrived at the lowest point of the tree and if it has it respawns it at the top of the tree. The

block and the three

statements (in conjunction with the random number generator) determine whether the branch is respawned on the left, the right or not at all (invisible). After all this, the code moves the branch 150 pixels down.


: This event does exactly the same as the previous event.


: This event sets the speed of a cloud instance to somewhere between 1 and 6. Then sets it heading off to the right-hand side of the screen.


: The

event checks whether a cloud has left the screen and then gives it a new random height and speed. Just like the bee but with different values and in the opposite direction.



: This draws the text and the score to the top left-hand corner of the screen.


: This transitions to the starting screen when the player presses the Backspace key.



: This draws a message to the screen at coordinates




: This causes the game to transition to the screen where the game can be played.


: This causes the Escape key to quit the game.



: This causes a list of variables to be created when the instance is first created.


: This code subtracts 1/30th from the

variable on each step of the game. If time runs out a sound effect is played and the game transitions to the start screen.


: Finally, this event draws a time bar (rectangle) to the screen with an appropriate width to represent how much time the player has left.


3D моделирование товаров визуализация товара arigami.tech.