Unity Tutorial 3

Well now, we need to get that truck game polished off for the sake of tutorials don't we? Alright so be it.

Part 3 of Make a truck driver simulator whatchacallzit went relatively easily. This time I needed to add in variables to the code to allow the player the ability to control their truck and steer it around the map, all the while avoiding those crates who are plotting something... not nice I imagine. 
Starting off we write up floats into the code so that we had some values to work with when we control the truck. It starts off where we can only control the left and right by sliding the public float value outside of the game but eventually we are able to work it so that merely pressing the directional keys steers us in the intended directions we want. Like I said earlier, this was very straightforward, The Gem Ball used similar vectors to control the ball so I am familiar with what this tutorial had to say for itself. I did have a small problem but its so small and insignificant I am doubtful it can be really called as such, basically my truck was 3fast5me (That means "too fast for me" for those who don't speak memes) For whatever reason during testing I decided to have it set to 35 (heavens knows why) sure enough, it flies off into the horizon if it makes contact with an obstacle. The reason I denouce it as a real problem is that I was merely doing it at such speeds before properly inserting directions and I thought 35 was a reasonable speed, clearly I should never be behind the wheel under any circumstances. Oh well after some code clean up (mostly just converting public floats to private)  I was polished off and ready to take flight....

 I know the truck is crashing into boxes but bare with me the game works fine. 

...And then proceed to crash and burn once we reach the part where we are quizzed on how to make a flying game. My goodness it was bad. I think my plane has been grounded and will never leave the runway. I tried to understand all of the hints but if anything the hints lead me further astray and worst of all it requests us to write code for things the other tutorial doesn't even address (given the plane game is expected to be completed by the developer based mostly on the car games coding logic). Maybe I'm missing something here or is everyone as clueless as I am?

 - Ugh no.





Comments

Popular Posts