Aug 10, 2021Creating an Elevator in C# and UnityRight now I am working on a platform game. And an elevator is another basic feature. It will also be useful in many other situations. So how do we create an elevator? Essentially an elevator consists of a game object with a start and end position. It moves between those…Unity3d4 min readUnity3d4 min read
Jul 18, 2021Creating Moving Platforms in UnityWe have implemented basic features such as a character controller to move and jump as well as some collectables. While still working in the prototype setup let’s add some movement to the platforms. A Camera that follows the player To make the game playable we need the camera to follow the player. …Unity Game Development3 min readUnity Game Development3 min read
Jul 18, 2021Creating Collectables in UnityTime for another standard feature in a 2.5D platform game: the collectables. Preparing the coin object We have earlier created spheres as placeholders for our coin. Make sure they have no gravity, but the isTrigger is selected. Override to apply it to all the coin instances. Collecting things is only fun, when you see…Gamedevhq3 min readGamedevhq3 min read
Jul 12, 2021A Physics Based Character Controller for Unity — Part 2 JumpingWhat would a platform player be without… yes right jumps. Let’s add those to our 2.5D platform game, a single and a double jump will be nice features. Creating the variables in the player script So far we simple used a var velocity defined by the direction and speed, but as its y value gets reset each…Unity3d3 min readUnity3d3 min read
Jul 10, 2021A Physics Based Character Controller for Unity — Part 1 Basic MovementFor fun we are going to write our character controller for a 2.5D Platform Game from scratch. Character controller and script for the player To get started we need to add a character controller component to our player object and remove the capsule collider. With the character controller we get a basic collider without physics and therefore…Unity3d2 min readUnity3d2 min read
Jul 10, 2021Building a 2.5D Platform GamePlatform games are another classical game type. They first appeared around 1980 as console games — like the famous Donkey Kong (1981) and Nintendo’ Super Mario Bros (1985). It is hard to believe that early games were single-screen movement only. Later side-scrolling became possible and even four-directional movements and scrolling. …Unity3d1 min readUnity3d1 min read
Jul 4, 2021A Nasty Mine Dropper Enemy Joins The GameIn the last post we made the game easier for our lazy players. Now let’s make it harder for those who like more challenges. We will add an enemy who drops a mine. Creating the prefabs To start we need to create the prefabs. To keep it simple we just reuse our existing…Unity3 min readUnity3 min read
May 29, 2021Cheat it and beat it…Today we will create a little cheat for the space shooter game. Objective: Whenever a powerup has spawned and the player hits “C”, the powerup will move right to the player. It’s for lazy players to discover. My objective is to keep it simple. In the Player Script we add…Unity3d2 min readUnity3d2 min read
May 19, 2021Create Immersion with Sounds in UnityA good way to approach sounds in Unity is by creating an audio manager. Creating a background sound Our first objective is to add a background sound. Let’s create an empty object and call it audio manager. Then add another empty object to it called “Background Sound”. We can now add a component called…Unity3d3 min readUnity3d3 min read
May 18, 2021The Magic of Version Control — Part III Branching and MergingAs we continue to work on a project we might want to create a development branch. This allows us to leave the main branch as it is and work in the development branch. Once we are happy with it we can merge it back to the main branch. Create and switch to the branch Make sure…Git3 min readGit3 min read