Finally, the fall semester has started! So our thesis game team, Crash City, are considering whether we should change the our project’s name from Crash City to Warm Tirez.
Because our gameplay has changed a lot during the summer semester.
During the semester, some of our us in our team (including me) decide to try something new for our team. At the end of last semester, we showed our Crash City on EAE day. In this version, our gameplay is:
Players can put down some signs (speed limit, stop, turn left/right) to guide the cars running on the road to rush out and collide with pedestrians and buildings in the city.
Unfortunately, many players feel boring or confusing when they are playing the game.
However, players love the feeling that when the car actually rush out the track/road and crash with pedestrians and buildings. We also love this kind of feeling very much.
In this case, although we were not quite sure whether the current direction is 100% what we want, we still decided to do something new in the summer to see if we can find some better gameplay.
Now our current gameplay should be:
A puzzle game of building track piece and running car on it, to collide with some buildings/arrive at some destination…, to satisfy the targets in the Levels.
Why we want to go this way? Because we think we need some mechanism to solve the problem that players should be able to control the car, and not to feel boring at the same time.
The Hot-Wheels, reminded us this idea:
This is simpler both for players to learn and our team to develop, because in most cases, the Hot Wheels track is one-way only, and players will directly know where the cars on the track will go. But our old solution, when the cars are running on the road and letting players use traffic signs, it’s hard for them, especially for younger players, to predict what will happen in the next.
So I think this change is a correct one. And now we already have a Simple Track Building System, like:
You can drag the piece to attach it to the former piece. There are many different choices, straight, rump up/down, left/right turn. After the track building, the car will drive on it! Woo! The AI will guide it automatically. Like:
One important thing I want to mention is that, those track pieces are based on the same united grids. Each grid’s size is 10 * 10 unity units. In this case, we can make sure the different two tracks will be able to attach with other pieces. We can also make different sized left/right turn tracks, so that we can make many different left/right turn track pieces for players. As you know, some left turn will allow the car to pass with a longer turn radius, which means the car can pass the turn faster and easier.
What’s more, we also decide to use the Craig Raynolds’s Path Following algorithm to guide the car. So we also saved some information on the track pieces. Like:
OK, now let’s talk about my current tasks: Car physics in our game. So far, I take over most of the Car Physics in our games. It seemed that I am the only one who want to do car physics in our team :-).
A little problem for me is that: I am not a physics major student, anyway, after a few days reading of Car Physics, more and more stuffs are coming clear to me. Because we are going to build our car based on a plugin Edy’s Car, I also need to understand how this plugin implemented Car Physics, so that we can make what we want based on it.
In Edy’s Car, I must understand how its VehicleController works. For the VehicleController, we can adjust many different vehicle’s attributes: WheelCollider, Center Of Mass, Max_Drive_Force, Max_Speed, Friction, Anti-Roll, Breaking force… In the default Edy’s car sample, the vehicles can run very stable. It seemed that I don’t need to do anything XD.
However, we met a problem very soon (of course). Because Edy’s car is simulating real car physics, but we are simulating the cars both Hot Wheel and real. What’s their difference?
Their difference is: in hot wheels, the cars will run very, very fast, or just following the track. If it’s fast enough, it will pass through the Wheels and the cars are also running very strictly following the tracks. In our game, we want to have the hot wheel’s crazy speed, but we also want to make our car looks real. So based on our target, I think this is what I should try to satisfy:
The car should be able to run very fast, at the same time, if the speed isn’t too “crazy”, it should be able to get through most of the track pieces we have, like 90-degree-turn tracks.
So I think that’s a problem I must solve. Based on the car physics I learned, the car’s wheel traction, coefficient friction between tire and road, will decide whether the car will side or not. If the friction is large enough, the car will not slide. The larger the coefficient friction between tire and road, the more torque on the vehicle’s wheels can be. Suppose there is no slide on the tire, when the vehicle is doing High-speed turns, the lateral force will be the reason to steer the car. The function of lateral force should be:
lateral_force = mass * velocity * velocity / radius_of_turning – MuK * mass * g * cos(Theta)
MuK is the coefficient friction between tire and road, Theta is the angle of the slope where the vehicle is staying. radius_of_turning is decided by the distance of front and rear wheels and the turn angle Phi. Based on different data I read, actually the Phi will be different when the car is running at low speed or high speed.
After reading those materials, I tried to get rid of the slide force from Edy’s car physics. Because Edy’s system is different with what I read, I offered the car more downforce, to offer it the ability to go a high-speed left/right turn. It’s not perfect, and I have more things to improve. But this is my first step on the car physics.
Like this, you can see that the vehicle can even do a 90-degree-turn with a driving speed more than 170 km/h.
This is really crazy and very hard to control! It can never happen on a real car. Although we may not use such a high speed in our game, but I think I can talk with our designers to see what’s the feeling they want, what’s the range of speed they want. That’s totally I think what we need.
That’s all. Looks like a good start, isn’t it?
Thanks very much for your reading! See you next time :-).