I would like to create a traffic system in my tile-based isometric game and I would like to ask for some good approaches because I don't have a clue how to begin.
Right now I have a tilemap and keep its data in an 2d array. I have... 1. tile objects (with properties like index, tile type etc.) 2. building objects (with properties like origin, size etc.).
I´ve already implemented a A* algorithm which allows me to find the best/shortest path from one tile to another but now I have to realize the movement from start to end tile with features like stackable cars.
I though about setting up a property for my tile object which tells me if a tile contains a car but right now two cars fits on one tile in my game on each lane so this approach might be not the best solution.
Edit: i´ve added an image with lanes drawn on my tilemap. Having lane objects might be a good idea but I need to connect them to the tile objects somehow.
Have anyone implemented a traffic system in a tile-based game or have any ideas how to realize that and would share his/her knowledge with me? Would be great!
Thanks a lot!