In the past several days my GAM 111 assessment has received a title and had some core functionality implemented. The scripting moved slowly and painfully tinkering with the physics functions and settings, but the rough idea of the player mechanics were eventually there.
Movement for the player was the most challenging section to complete. While the process of getting the ball to roll was easy and completed with a few lines of code.
playerRB.AddTorque(VDir * ForwardTorqueFactor * V);
playerRB.AddTorque(HDir * -SideTorqueFactor * H);
The trouble came with getting the ball to roll faster than it was, though resolved it still isn’t perfect. I will probably return to this in a the trimester break to see how I can fix this properly.
The production of the player controls gave me a chance to use a coroutine for the first time and also introduced me to switch statements. These glorious bits of code would have made previous projects a lot easier than they were. The expansion of my scripting knowledge is pushing me to complete more of my own projects which in return helps to ingrain coding practices. Although, as mentioned in previous weeks, I am still struggling with Unity Physics and I am having trouble locating any sort of tutorials or information other than the Unity Documentation. Some of the documentation has taught me that the length of the units is in metres but can be changed and the mass is in kilograms. So in future projects I will look to proper physics calculations for better control of game objects.
A requirement of the assignment was that the player must change states throughout the levels so that it will have slippery, sticky or bouncy properties. This was achieved simply by having a trigger mass add a PhysicsMaterial to the player. These effects were hard to see during gameplay and were practically invisible to the player. To help distinguish when these effects were happening I added a UI Display that shows when a effect is active and how long it is active for. While this may not be the best solution it, there are bigger priorities that need to be addressed if it is going to be finished on time.
Over half the time to complete this assessment is gone and the project is only about 30% of the first 90% complete. The next two weeks will need to be well planned as not to fall any further behind in production. I aim at completing the crushable and avoidable objects, collectables, and UI for the game screen complete by the end of this week. This would leave me a playable prototype only leaving aesthetics and effects left to do in the final week. Because I am notoriously bad with time management I have incorporated heavy use of Hack ‘N’ Plan in the last stages of this project. It should have been done earlier but it’s too late to dwell on that now, all I can do is keep pushing ahead and get the work done.