Development Log Major Project Proposal

Development Log 1 (Prototyping)

After Finalising my design and mechanics for the game, I started to prototype the initial concept and coding behind the mechanics.

Issues

First of all, I set out with a basic ‘red’ level and a separate ‘blue’ level in two different scenes. I started by switching between the two scenes using q and e. However, one limitation of this method is that I needed a duplicate for every level I would create which would get confusing if I started to add more than 2 worlds. Another reason I chose not to go down this route is due to the fact that it would be difficult to keep the position of the player between the two worlds.

First Prototype

Once I had backtracked and changed my thought process behind this mechanic. I decided to use layers within one scene, which I would then toggle the visibility on and off. To do this. I used an integer which I first defined as ‘1’ which is the main world. Then, I ran a switch once the player pressed left shift that would check which world is toggled on in the inspector and if one was toggled on, the other one will be toggled off.

This ended up working perfectly and I could get a demonstration shown below, of the main mechanic working where the player needed to switch between the two ‘worlds’ to cross a simple gap that only appeared in one of the worlds.

Tutorial Level

I began making a simple tutorial level so that when I began player testing, the player would know the simple controls of the game before I introduced any of the complex mechanics of the world switching

Ladder

One basic mechanic I knew I had to include is ladder climbing. Even though I’ve never experimented with these before, I had to attempt to add them in as it would make climbing easier than jumping up on top of platforms to go up and down layers.

To do this, I made a simple collision check to see if the player came into contact with the ladder’s hitbox. Once this turned true, it would change the gravity scale to 0 which allowed the player to press w and s to ascend and descend the ladder. Despite this working at first, I forgot to add an else statement to the if statement so the gravity would forever be set at 0. Not only this but also, the player had no air control when they reached the top of the ladder to move off. With a couple of tweaks to the code, I was able to fix these issues and the ladder ended up working well. To implement this in the future, all I would have to do is copy the green box and retexture the rigid body once I have a design for it.

The First World Swap

Despite the main mechanic being the swapping between worlds, I wanted to introduce the swap slowely. First, I decided a simple jump would be sufficient enough for this, where the player would discover the ‘blue’ world is taller and can jump higher, in order to jump up the ledge.

I next decided to get the player to switch back into the ‘red’ world to fit in small gaps which would demonstrate how the character in this world can easily fit in small gaps. I tried to switch worlds whilst in the tunnel to check if the player would get stuck. The block would go through the walls, but the player is still able to move through the tunnel. In the future, I may decide to change this so you are unable to switch worlds when traveling through these areas.