![the temple run game free download the temple run game free download](https://images-na.ssl-images-amazon.com/images/I/B1u65nv1HUS.png)
Onto our game code and Unity scene construction! We’ll start by explaining the code for the common classes used in the two levels and we’ll finish by examining each level in detail. During the following sections we’ll describe the classes used in the creation of the game. Finally, as you can easily see, score is increasing as Max continues to be alive and keep running. Game is over when Max falls onto a red wall (rotated paths level) or collides with an obstacle (both levels). When this happens, player can tap the screen to restart the game.
![the temple run game free download the temple run game free download](https://image.yaksgames.com/v2/game/9/7/b/u3iVBHHD06bcDGodYciRpx7xd8rbzlNUvVpTYNmY.jpeg)
In both cases/levels, the game can theoretically continue indefinitely. If Max falls into an obstacle, he dies and the game is over. He also must avoid randomly popping obstacles either by moving on a different lane or by jumping over them. Player can swipe left or right to move sideways along imaginary lanes (like in normal traffic), while he can pick candy to increase his score. In the “straight paths” level, Max follows a wide platform and continuously moves at a straight direction. So, when we say ‘swipe’, this implies either arrow keys usage or regular swipe usage on a touch screen.
![the temple run game free download the temple run game free download](http://money-mod.com/uploads/images/1206/original/temple-run-2-5.jpg)
As you’ll see below, this game has two input methods (either arrow keys or swipe in a touch screen). Important: You’ll see me refer to player’s input as ‘swipe’. When walking on the path, Max can pick the candy that appears in front of him to get some points to increase his score, he can (must!) jump to avoid obstacles and, of course, he can swipe left or right when the platform is about to rotate in order to follow the new path. If player does not swipe in time, then Max may collide with the wall and die (the red walls, depicted in the picture below). When Max reaches the current path’s end, player has to swipe in order to go left or right, or just continue on the main path. The point where this next path will be placed is at the end of the current path. At some point before this happens, the game engine randomly chooses where to place the next platform, either left, right, or straight ahead. In the “rotated paths” level, Max follows a narrow platform (“path”) till he reaches its end. He can choose one of the two game levels, either the “rotated paths” level or the “straight paths” level. Upon game launch, player can see a screen with two simple buttons. Campfire Pack !/content/11256 We borrowed two models from this pack to create some obstacles for our player.You’ll see us referring to the main game character as “Max”, because of this asset’s name. Max Adventure Model !/content/3012 The main character of our game.All Sorts Candy !/content/12512 Player will collect the candy to increase his score.This tutorial would not be made possible if not for these great assets we used: What other place to look for that than Unity’s Asset Store? The Asset Store is a wonderful place, where you can easily find low cost (even free) assets for your game.
![the temple run game free download the temple run game free download](https://i.ytimg.com/vi/tWQsVyJ_ET4/maxresdefault.jpg)
Since I have no experience in 3D assets creation, I needed to find some premade ones. Since this tutorial is a 3D game, I wouldn’t have something great to show without any 3D assets. As usual, you can find the code here on GitHub and play the game here on a WebGL enabled browser. As you’ll see, these levels share some similarities but also have some notable differences. This tutorial we’ve made contains two levels that feature both game mechanics. This environment can be either a big path in which the character can change lanes like in normal traffic (such as in the game Subway Surfers) or can swipe left or right in various points to correctly follow the designated path (like in Temple Run). These games have a 3rd person camera pointing at the main character who is running towards one direction in a 3D environment, while he tries to avoid various hazardous objects popping around that can kill him upon collision. Since this post became somewhat big, it is split in two parts (check the second part here).Ĭhances are high that you have played an infinite 3D runner game at least once in the past years, when this genre became known and successful.
#The temple run game free download how to#
Here, we’ll explore how to make a very special kind of game, an infinite 3D runner game. This is another blog post/tutorial in my Unity game development tutorials series, the first one being about a 3D game. Tl dr: check the code here on GitHub and play the game here on a WebGL enabled browser