
There are many ready made solutions for traffic AI on the Unity Asset Store. iTS Traffic System, TI Traffic AI, A.I Car Traffic PACK, just to name a few.
But if you are asking me the best way to do this is to write your own code from scratch.
When you have to deal with traffic in an open world game where you want to mess around and cause some chaos, control over your code is very important.
To save time I tried two of the above ready made solutions, but apparently I lost more time than the time I needed to write my own code that actually works the way I want.
I don't say that those assets are not good, they are actually great and very professional but apparently they are not what I needed.
To get started with my script I used waypoints to make the cars follow a path. I created a script that spawns the cars on each waypoint and only when the player is at a certain distance.
The cars dynamically follow the closest waypoint weather they are on the right or on the left side of the road. They will also stop if they find any obstacle in front of them. It sounds very simple but it does the job right.
To be continued...
Yes Sakisa!!!
ReplyDeleteLooks pretty neat!
ReplyDeleteforum.greenheart.com
ReplyDeleteGo there and sign up. You can advertise your game there. They are so much and they love indie games. Go take a look and make a subject. Also try their game Game Dev Tycoon.
Regards from Turkey.
And please comment im feeling like you dont read this.
Hello my name Ugur, Crime life that GTA the like. Games eklermisin different things. For example, Minecraft properties. make new instruments and tools. Im from Turkey.
ReplyDeleteNote, google translate :D
Regards from Turkey.
ReplyDeleteOha türk çıktı face ten ekle https://www.facebook.com/profile.php?id=100004398902075
DeleteWhen will this game be available to download? I feel this is going to be an excellent GTA-like game, and definitely the best in the Crimelife series.
ReplyDeleteyou have a date of launch?
ReplyDeleteYou publish in gamejolt?
ReplyDeleteYou publish in gamejolt?
ReplyDeleteThis comment has been removed by the author.
ReplyDelete