Hey everyone! Here's a short update on the traffic system that I have been working on. Last week we had setup the graph system with nodes and edges. I have added cars (blue circles for now) to the system. The cars spawn at one of the nodes, decide on a random destination node, find the shortest path to the destination, and proceed to move towards each node in the path. You can try out the demo here https://lnkd.in/gRD8SvTu GitHub : https://lnkd.in/gCPXY6ZJ A quick thought on the next steps would be to implement a type of queueing system for the cars, so that they don't race against one another and wait for their turn. One way of doing this would be to implement node occupancy. So a node can be occupied by only one car at a time and when the car leaves the node, it becomes free to be occupied by another car. Each car would wait for the next node in the path to become free, before moving towards it. This brings up an interesting perspective. In the last update we thought of nodes as intersections and edges as roads, but now I have a different view to this, which I'll explain more in my next update. Do let me know your guesses on what this new perspective would be. Cheers! #buildinpublic #gamedev #trafficsimulation
This looks so awesome! It reminds me of the core gameplay in Mini-Metro or Mini-Motorways. The nodes could quickly become destinations for the cars with a queue system in place
Can't wait to see your next update on the traffic system! 🚗
Good work Rohith Kannan 😊👍🏻
My guy is cooking. Great stuff !!
that is looking cool
this looks great Rohith Kannan - keep up the good work!
Developer
6moOn your planned update. How are you going to handle the deadlocks ? e.g. if node-a car wants to go to node-b and there is another car at node-b which wants to go to node-b. Both cars choose that simultaneously.