Comments

Log in with your itch.io account to leave a comment.

I've played much and found some issiues:

1. Whole path is set when car starts. If we change roads during it's journey it will stop and mostly will stuck. Sometimes it regenerates path but mostly stay at position. If we add some roads near - it may try change path. I need to create 2 separate paths (new and old) and wait if all will drive by new path, than can delete old one.

It should regenerate path if cannot move because there is no road (from calculated path).

(Edited 1 time)

Thanks for the comments.  Unfortunately, it kills performance if stuck cars constantly check for new paths.  I tried to strike a good balance between quickly-adapting AI and performance.

Also, one might argue that quickly adapting to new routes is somewhat unrealistic.  Drivers that have set out to work already have their routes in mind (or programmed into GPS).  Yes, people certainly take other routes when stuck in traffic - but they usually don't do it instantly

This reminds me of mini metro. I really like the game

Thank you! I've played Mini Metro as well; I like it.

Three-way traffic lights would be nice too.

(Edited 1 time)

That might work well; it's a possibility in the future as well.

Could you add one-way roads? (Love the game, btw - I've spent way too many hours playing it!)

I'm glad you like it, thanks! One-way roads is a little hard with the current car pathfinding, unfortunately. If I ever revamp that aspect, it's a possibility, though.

Could you make a speedup feature?

I think I could give it a go.

fix the fullscreen please

The fullscreen button is more of an itch.io thing, but I'll see if I can do anything about it.

versionthat works on ipad plz

Placing roads would work nicely with touchscreen, but I'd have to rethink all the the other controls (e.g. SPACE to pause, ctrl-clicking, etc.) to make everything else work on such a device. Maybe in the future, though.

Your pathfinding implementation doesn't properly check whether a stoplight is never going to be green when approaching from a certain side, as demonstrated in this screenshot: https://i.imgur.com/xvqKPSY.png

Right, the pathfinding actually ignores stoplights. This is because it's built on squares either being "on" or "off," while a stoplight adds a directional aspect to it. If I generalize the pathfinding to allow for directed graphs (it would be a serious generalization), then it could allow for permanently blocked stoplights and even one-way streets.

Turning undirected Dijkstra/A* to directed should only be a few lines. Especially in this case it's feasible to just hack in a specific check for permanently blocked stoplights and skip if true.

This is certainly something I would consider generalizing in the future.

I've implemented a change (v1.1.2) that should address this somewhat.