🤑 Indie game store🙌 Free games😂 Fun games😨 Horror games
👷 Game development🎨 Assets📚 Comics
🎉 Sales🎁 Bundles

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.