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

11 comments :

  1. forum.greenheart.com
    Go 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.

    ReplyDelete
  2. 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.
    Note, google translate :D

    ReplyDelete
  3. Replies
    1. Oha türk çıktı face ten ekle https://www.facebook.com/profile.php?id=100004398902075

      Delete
  4. When 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.

    ReplyDelete
  5. This comment has been removed by the author.

    ReplyDelete