With all the components ready from the tutorial I did I decided to build from that project and make it into Cancelled?. Using my sketches I created a block out of the level with some changes made through personal testing.
Sketch of sections one & two.
The only difference I made to section one was the inclusion of moving platforms in the cave instead of several jumps from side to side as well as an elevated plane for the extra life to stand on. I marked the spikes with a red texture to indicate them clearly.
This is the first secret area in the game which will be accessible by performing a wall jump with an extra life as a reward. I currently do not know how to code a wall jump in unity but I have an idea, if i remove the script which stops the character from sticking to the wall and use the slip material on all walls I want the character to slide down and left the walls you can wall jump on sticky you may be able to wall jump.
I attempted the theory and took out the friction code and added the material. This part of the step worked perfectly making the walls with the material slippy and the ones without sticky but because of the direction the raycast shoots (down) you cannot jump while attached to the wall so I would need to know how to code a separate raycast or make it fire down, left and right. This is something I will look into later on if I have time. I feel if i add it to the existing code it would stop my jump because the raycast would then require a hit at left, right and down to enable the jump command.
I also tried to add a death tag which would kill the player when they touched an object that used it. This would be placed on spikes and down pit falls, things that should instantly kill a player. However the script would not work Unity did not complain about any errors and I copiedĀ and modified the hurt tag script yet the player would not die on collision or lose any health. I left the failed script in there as well as the tag and just marked it out of use.
Block out of section two.
Section two of the level however stayed mostly the same except with changes to the directions the platforms moved. I highlighted the area of the bridge I wanted to fall with a black texture to make it very clear as well as marked the enemy with a green colour. The enemy use to be able to run through all walls ignoring collision which was a real problem, luckily the solution was simple I just needed to add a ridged body component to the enemy like the player. Though I don’t have a combat script in place you can knock the enemy cube on its side and it’s movement speed is more than halved allowing the player to defend themselves in some way, a happy accident. I also did not add the destructible bolder or the one that chases you in section three because I was unsure of how to make the character damage the bolder, make them explode and in the case of the one that chases you make the platforms it touches fall these are all things that would require coding to perform and would take some looking into.
Sketch of section three.
Block out of section three.
I only changed the spacing and direction of platform movement in this section as well as removed one of the speed up items as it was more of a hindrance then a help in my test runs. The speed up also increases the distance you can jump this will be made clear in the tutorial with floating text and is the reason why the first platform is so far away.
Level block out as a whole.
I decided to add a wall at the beginning so you cant run off the stage straight away. overall I think the block out has gone well and everything is in place to have assets built and placed on top of them. Play testing the stage has pointed out a few flaws with the way the jump is set up as you can only jump if the center of your character is touching an object because of how the raycast works meaning if you fall on the spikes nine out of then times you can’t jump meaning you cant die because you cant collide with them a second time and you cant escape meaning your trapped. The script from the first tutorial seemed to have a jump set up that would fix this but the scripting for that was done in C sharp instead of Java so I’m unsure how compatible they both would be working together withing one model as the wall collision script it would need to get the information from would be withing the Java script. I also modified the reset script from the first tutorial so it moves the player to the correct spot to fix the endless drop when you fall down a hole. This will stay in place untill I can use a proper check point system.