Now that my project has reached the end, I am quite pleased with several features that I managed to implement (mainly the wapoints and lap system, as well as the interactable environment.
The main problem that I see with the game, is the fact that it has two big bugs. Although I managed to implement fixes for a majority of bugs found in testing, I was unable to find a fix for the car mechanics. I believe the problem may have been caused when the .blend file misplaces some of my meshes as it was imported. I also have the suspicion that it does not recognise the front of the dune buggy as the front of the actual game object, and so it steers of at an angle it believes to be 'straight forward'. I searched for a long time what could be causing this, as well as making several posts on the unity support forums and the maker of the tutorial, but to no reply. The camera flickering bug may also be related to this problem.
There is also a problem caused when the car is not steering on flat terrain, in which case the controls reverse and accelerate becomes brake. Both these problems hamper the gaming experience, and are my top priority to fix if I had time to continue with the project.
After searching for fixes, the problem may lie with the unity engine itself. The problem could be a result of the way the Unity engine handles physics and wheel colliders. I have found several examples of other people having the same problems as me (with no fix) that are posted below.
http://answers.unity3d.com/questions/5509/why-is-my-vehicle-steering-on-its-own-when-i-accelerate
http://forum.unity3d.com/viewtopic.php?t=27912&highlight=physically+smooth
http://forum.unity3d.com/viewtopic.php?t=32284
Friday, 7 May 2010
Wednesday, 5 May 2010
Timer fixed
Very close to the deadline, but have finally fixed the timer. *sigh of relief*. Apparently, the problem was caused by by the result of the division being rounded up to the next integer if the decimal point is above .5.
To fix this, I needed to use Mathf.FloorToInt function to make sure the lowest integer is always returned. Thanks to andeeee on the Unity forums for this fix.
To fix this, I needed to use Mathf.FloorToInt function to make sure the lowest integer is always returned. Thanks to andeeee on the Unity forums for this fix.
Monday, 26 April 2010
Health Bar (partially) Fixed
The problem with the healthbar before is that when the health would be reduced, the health bar would disappear from the screen. To look into this bug, I created a GUIText that would print the health to the screen. Sure enough, the health went down to the current value but the health bar still disappeared. I then printed the value of the healthbar width to the screen, and when health decreased, the width value went from 225 to 0.
I printed the formula (health / maxHealth) to the GUIText next, which went from a value of 1 to 0. From this, I could tell that the problem was caused by this conversion. By changing the type of health and maxHealth from integers to floats, this solved the problem.
I have also changed the health system so that instead of health decreasing passing through a waypoint, that colliding with a tree deduces it instead. However, I was unable to implement it so that every tree in the track reduces damage (since they are not gameobjects) but I have placed one tree in the track (tree sticking out on inside of first corner) since this tree is a gameobject.
I printed the formula (health / maxHealth) to the GUIText next, which went from a value of 1 to 0. From this, I could tell that the problem was caused by this conversion. By changing the type of health and maxHealth from integers to floats, this solved the problem.
I have also changed the health system so that instead of health decreasing passing through a waypoint, that colliding with a tree deduces it instead. However, I was unable to implement it so that every tree in the track reduces damage (since they are not gameobjects) but I have placed one tree in the track (tree sticking out on inside of first corner) since this tree is a gameobject.
Wednesday, 21 April 2010
Waypoints Fixed
Found out the problem with the waypoints, quite a silly mistake on my behalf actually. The lines:
That's what happens when you copy and paste code though. I also took this time to update the waypoints so that it doesn't work if you drive the wrong way round the track. New code is written below:
if(other.gameObject.name == "Waypoint_1"){Should have been:
Waypoint1Col = true;}
if(other.gameObject.name == "Waypoint_1"){
Waypoint2Col = true;}
if(other.gameObject.name == "Waypoint_1"){
Waypoint1Col = true;}
if(other.gameObject.name == "Waypoint_2"){
Waypoint2Col = true;}
That's what happens when you copy and paste code though. I also took this time to update the waypoints so that it doesn't work if you drive the wrong way round the track. New code is written below:
if(other.gameObject.name == "Waypoint_1"){
Waypoint1Col = true;
}
if(other.gameObject.name == "Waypoint_2" && Waypoint1Col == true){
Waypoint2Col = true;}
if(other.gameObject.name == "Waypoint_0" && Waypoint1Col == true && Waypoint2Col == true){
Waypoint0Col = true;}
if(Waypoint0Col == true && Waypoint1Col == true && Waypoint2Col == true){
NoLaps += 1;
Waypoint0Col = false;
Waypoint1Col = false;
Waypoint2Col = false;
}
Tree Colliders Fixed
Took me a while but I have finally fixed the tree colliders so that the dune buggy can crash into them. At first, I thought the problem lied with importing the terain from another project into my OverDrive project. Even though 'Enable Tree Colliders' was checked, the collision would not be detected.
Turns out the reason it didn't work is the prefab that was used to place the trees didn't contain a collider to begin with. Instead of using the 'Thin Tree' prefab, I needed to use the 'Thin Tree Collider' prefab located in another folder.
Turns out the reason it didn't work is the prefab that was used to place the trees didn't contain a collider to begin with. Instead of using the 'Thin Tree' prefab, I needed to use the 'Thin Tree Collider' prefab located in another folder.
Thursday, 15 April 2010
Results from Testing
After giving the game to 5 test users to do some black box testing, the results were mostly as expected. The main issues that users had were with the steering and camera issues, as well as the timer increasing at the 30 second mark, and being able to drive straight through the trees.
There were also problems which were brought up which I did not know about, such as the steering on the car messed up if the player was to drive off the road into the trees. Another problem was that the lap would increase even if all of the waypoints were not driven through.
I have the next couple of weeks to try and address these problems, which will be documented in the blog. The full results from testing can be seen in the final report.
There were also problems which were brought up which I did not know about, such as the steering on the car messed up if the player was to drive off the road into the trees. Another problem was that the lap would increase even if all of the waypoints were not driven through.
I have the next couple of weeks to try and address these problems, which will be documented in the blog. The full results from testing can be seen in the final report.
Wednesday, 7 April 2010
Testing
Now that the menu is done, I can begin the testing stage of production. Unfortunately, there are some parts that had to be cut from the game due to lack of time but if testing goes well then there may be time to go back and implement them.
For black box testing, I will be getting several test users to play the game, and bring up any problems they may encounter.
For black box testing, I will be getting several test users to play the game, and bring up any problems they may encounter.
Subscribe to:
Posts (Atom)