How do you make a free roam bus game?
I am new to Unity and if anyone could help please could you tell me/advice me on how to make a 3D free roam bus game in Unity 5? If you could that would be great, thanks.
Answer by JoshBaz · Jan 22, 2016 at 12:31 AM
OK what you should do is: 1. Get some bus models, 2. Get some experience with Unity's physics, 3. Get some codeing experience with Unity's physics in order to "drive" the bus. OK so let me break down what I just said. What you need to do is get a 3 D vehicle model (most likely a bus) to experiment on. What you do next is watch some tutorials online (such as car tutorials/vehicle tutorials), those will guide you step by step in how to go about coding vehicle movement. In most Unity tutorials the tutors cover most of the basic parts of Unity so you will easily be able to apply anything you learned to any other kind of game you want to make. I suggest watching Flat Tutorial's tutorial to get you started. It's a little outdated (made with Unity 4) but the basic teachings still apply. There are also many other tutorials out there that cover vehicles that are begginer friendly.
Answer by Tanoshimi2000 · Jan 26, 2016 at 01:44 PM
In addition to what JoshBaz said, which is the mechanics of driving games, to address the "free roam" aspect, you need to get either get a bunch of models for buildings, traffic lights, road segments, trees, bushes, stop signs, mailboxes, other cars, etc (you can get a pack of these from the Unity Asset Store). Once you have those, you need to write a code snippet that will pick those objects, not exactly at random, but how they would appear, and the position them based upon an X, Y, Z position. Then as the bus is driving, you can call that routine to make new city blocks at X, Y, Z + (Forward * BlockSize). That will make a new block ahead of where you are.
Be careful though, the more you drive, the more objects will be in the scene. If you use a class structure to store the values of them, you can destroy all the objects that are behind you in order to free up memory. You can always reload them later if you drive back to that location.
As you can see, this not a basic thing. It requires skills that build upon themselves. Maybe start with the driving aspect in a finite space, then work on the programming skills needed to expand the playground.