Weekly Roundup

Weekly Roundup – http://goo.gl/W023CU


The Project

Ahh, it has come to the time for making the final game of Studio 1 this trimester, in the previous two weeks I have worked on getting the documentation up to a standard where I hopefully do not need to think up anything new, all ideas should be in the documentation and they should also show me how exactly I am going to do it, if I have made them thorough enough.

I started off the week with creating the repo and the Unity project. I added some default Unity asset packs to the project which I went through with Jake and we combed through the assets we could use from them. Before we discussed that, i first sorted out what our ratios were going to equate to in the game. so I started by making a car that was 1 unit wide and 2 units long, so that it is 2 times longer than it is wide, which will help keep things nice and easy in making other assets. I then built the city area from the layout on the map Jake and I worked on, with placeholder buildings. These buildings conformed to the 7 of the 1:3:7 ratio limitation that we were given on the brief.

I pushed the progress to Jake and then continued working on the game, this time making a basic Garage Scene. I placed a robot placeholder in the scene and scripted some movement and rotation for the little guy. I went through quite a few iterations of the RobotController script in the end using only one line for movement forward and backward and one line for rotation based on mouse movement so the robot can then move in any direction that the player faces in. Next was the method for how to select cars. I had quite a bit of trouble with raycasting as the reference I was using from last trimester wasn’t working correctly in this project, maybe something changed since Unity 5.1.3…

Jake had informed me recently after finishing the RobotController script, that he was having troubles with scripting the changing of the controls for in the GameManager script. I helped him out a bit, guiding him in the right direction, but allowing him to do the bulk of the work as his scripting LOs needed to go up.

It was time to get all scripts worked on so far working together and talking to each other.

In the GameManager script:
  1. I updated it to be less of a cluster-mess, spacing out variables into sections.
  2. Changed the way the timer works (so that we don’t get multiple changes straight up, keeping WASD until the 30 second mark).
  3. Added in vehicle variables to handle RobotController stuff.
  4. Changed the way the controls are changed, so that the controls are continuously reset until none of the controls are assigned to the same key.
In the RobotController script:
  1. Cleaned out commented out code that I used to help Jake with the GameManager script.
  2. Uncommented the stuff that needed to be commented out until the GameManager was ready for it (car choosing stuff).
  3. Added an on-screen timer that counts down the seconds till the car the Raycast has hit, reaches 0, indicating that the player has chosen it.

Of course there has to be at least one bug after two people work on two separate scripts, the bug in question would crash Unity after 5 minutes of it being open, so that needed to be fixed quickly, luckily it wasn’t anything majorly hard to fix.

Now that all scripts worked well together, it was onto the next task: spawning in the car that was chosen in the Garage Scene. I created the PlayerController script which was written to spawn in a car into the Game Scene with a mesh that was chosen based on what car was chosen in the Garage Scene (but we had no models yet so I just hoped it worked, which you will find out later it didn’t). I then clicked and realised I could save a lot of lines of code by referencing the car chosen by the sting name of the car, instead of checking for tag names and setting a boolean to true based on what car was chosen. Next was moving the chosen car, I did this by adding to the transform.position based on the current transform.forward times by the movespeed times by Time.deltaTime, quite simple but it works. There is a problem though, as I am manipulating the transform.position directly, it overrides the physics of the game, so as long as I am holding down a button to move, I shall fly if I get airborn.

Jake and I decided that the cars needed to be the smallest value of the ratio, everything should be the same size or bigger than you. I made the robot and the garage smaller as well. The garage still conforms to the 7 of the ratio, but the room is made of less bricks, making it smaller. The robot is now ratio 1 as well. I fixed the length of the Raycast from the miniaturising of the robot and cars in the Garage. I also decided to do a bit of fancying up of the Garage, it was kinda bland…

The car movement needed to be more car-like, so I added increasing / decreasing speed. It increases when you press the forward button, decreases if you press back, it increases faster if you are still going backwards and decreases faster if you are still going forwards, if no keys are pressed, it accelerates to 0 if you were going backwards and decelerates to 0 if you were going forwards. The turning speed is also variable based on the current speed of the car, so if you are going slow, you can only turn slow.

More Blogs

I decided I didn’t want to be as far behind on blogs as I was up until week 8, so I got in and did the previous two week’s Weekly Blogs. I feel much better after doing them, being up to date once again, it was very slack of me to let it get so much out of hand for the first half to two-thirds of the trimester.

Programming

My LOs are looking sad for Programming, even though I have done 6 scripts, where both other programmers have done 0. I do not know what is expected of me, but this is bad! So I asked Steve what I can do, and he gave me one more script to do, a camera movement script. It was really fun trying to make one with all the features I wanted, but I noticed that there was a script already existing on the Unity website that did three out of the five features that I wanted and did those three features really well, as well as having a new extra options which I wasn’t going to include in mine. So I ended up using that script and just slightly modifying it so that you can have custom FOV (which I need to code in the future, but it will move the camera up as the FOV value goes up, so it shows more of the screen and doesn’t clip through the scene).

Touching up on Some Documentation

To bring up some LOs in the LDD section, I took the responsibility of redesigning the Outskirts section of the map. The last iteration was very plain and Jake was also worried about the overpass that was drawn, for some design reason I can not think of right now. Out of the two iterations I did do, the second one was chosen. The second design, the one that was chosen, was designed to be similar to a quarry or a rubbish dump, anyway there is a big hole in the world, so you can traverse around the sides to reach the bottom where there will be a car. I had doubt in myself as I can not draw very great, but I used that to my advantage to make a rugged terrain.

That’s all this week, it was a big week with a lot of different things done. Our Internal playtest is on Tuesday next week, so there will be a bit more done to the game this time next week.


This is Daniel Jochem, signing out.

Advertisements