Hello
This is my first post. I hope my question is not too vague. I want to code a racing game in the same style as one of my all time favorite racing games from my childhood: Buggy Boy.
I'm facing 2 challenges that I haven't been able to solve, but first, here's a video of the original game:
And here are the challenges I have:
1- In the game, the car always turns with the road, meaning if the player doesn't turn, the car will always be on the road, no matter what direction the road is turning.
As you see in the video, sometimes the road turns to left or right, but the car remains on the road. At first I thought this is just an optical illusion, meaning since the road doesn't affect the car, the road is just a graphic element added and the car is always going straight, but if that's the case, how come the flags and all the obstacles on the road are turning with the road correctly? You can see when they approach the car, they come from the correct direction, dependent on the way the road is facing.
If that's not the case and the road is actually turning, then that means the car is being turned to face the road constantly, but how would the car know the correct angle to turn at every step?
2- How is the road made in a game like this? If the road is made of small blocks, then how are the turns programmed? I'm guessing this is related to the first issue.
Just for context, I'm not new to coding. I've done some game demos in Unity3d and C#, as you can see on my channel above, but I'm new to coding racing games.
Thanks in advance.