Hello! This week It's all about the road system!
Update
- Comfort Mechanic Implemented fully! (Buildings/Roads Reduce comfort)
- I've started the development of the roads ( The main focus this week )
Have a look at how the roads look below (bare in mind, the quads are just a place holder)

To give a quick explanation to how they work, very brief and quick -> A player places the road with the middle mouse button (if they have enough money), the road is placed and becomes aware of its surroundings say a radius of 1, if there is a tile within that radius, the placed tile is registered to its neighbour.
I'm not entirely satisfied with this approach, firstly its slow, calling every frame to check for a collision is not really the best approach but it works, I have a solution in mind but It'll probably take a couple head bangs on the table to get right. Secondly, I'm not really sure how to get the car animations working. Though I have the neighbours details, Its not a chain e.g -> neighbour A is connected to B which is connected to C and D; Neighbour A is only aware of B. B is aware of A and C, etc, etc. This will probably need to be re-done, but I can't think of a solution atm.
Update 13/10/21
So I've got the roads kind of working, really unhappy with this approach as its not entirely what I envisioned but I don't have much time to focus on the game during the week so kind of threw a few things together to get it to work. Have a look below.

In case you're wondering what the red and green tiles mean:
- Green = Four Way Intersection
- Red/Pink/Something = Three Way Intersection
Though this got me thinking a little - I could possible implement my own pathfinding (which is essentially what I'm probably going to need to do).. see below

I could make some sort of condition to find the best path to a commercial building.
More thinking and tinkering is needed. Hopefully next update I'll have a proper plan in place to get this to work.
Update 16/10/21
Right, the weekend has hit meaning I've spent the whole day working on this, and with some results!

I've completely re-written the whole system I had in place before which was a massive pain but defo necessary. Here is the new road system and what it can do
- Player can place roads (currently the starting position and ending position -> no need to click to place them individually)
- connectable roads; though this isn't quite finished yet as I was trying to make sure I was able to place the roads correctly and make sure the tiles that the roads were placed on will be set to an occupied state -> stops elements from spawning on top the road.
- when a road is spawned in, it gets its own car allocated car, this means that the roads is completely traversable by the car. I've still yet to implement the residential to commercial road mechanic and I'll hopefully have it soon but the actual road system still needs a little work.
Now as I mentioned, this isn't finished and in no way polished. There are still things I need to work out like; road intersections and write the logic for the cars to figure out the best path, but this should be less of a challenge with the new system in place.
Thats all for this weeks dev blog! I'm excited for the road system, it adds a new element to the game which I think will be pretty cool!
Catch you next week.. or next-next week :D
Rus K
