Gunshot City (originally known as Crimelife 4) is an open world/action game developed entirely by one person. Programming and almost all of it's graphics and character animations are all handmade.
The game is developed with Unity3D engine, it's made with the performance on mobile devices first but it's also planned for pc.
It's a big project and it takes time but with your help it can turn out to something really great.
This blog is made to see it's development progress through time. Feel free to comment in the posts bellow with your suggestions and ideas.

October 21, 2015

Traffic AI - The basics



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...