9th November

This week we worked on the new level we were creating. The major things we added were the ability to shoot bullets and doors that could be unlocked with a key.

As I wanted my environment to be very industrial and city-like, I added some towers, some within the player's reach and others further in the background. Right now, every element is represented in simple colours, but hopefully in the future we will learn more about texture-making. I also added some visible tracks to the moving platform so that it made more sense in the world I was creating.   

Unlike last week, a lot more coding was required and several new scripts had to be created. One was for the doors, to give the ability to be unlocked, though right now we haven’t enabled them to go anywhere. These were attached to a “Manager” game object.

The other was for a key that would be used to unlock the doors.  We also had to code in a floating animation, which was quite long and complicated.  There were two scripts required for the shooting mechanic, one to spawn the bullets, and the other to determine the physics of the bullets once they're fired. This included elements such as bullet speed and how long the bullet could travel before disappearing. Compared to the code needed for the door and the key, these scripts were not as long, which made them easier to understand.  We had to modify and add some lines of code to the Player movement system. This was because we were having a problem with areas of the level such as walls that allowed the player to phase through them despite having colliders enabled, and only pushed them out after they stopped moving. Unfortunately, these changes did not solve the problem. The tutor said they would try and fix this in their own time and report back once they’d found a solution.


Comments