Open originalfoo opened 5 years ago
I love that, and I think that good starting point would be to check how CO made a level crossings (auto-close on approaching train)
If events were chained it could perhaps facilitate #11
Step 1. Design a thread-safe super cheap message/event passing mechanism Step 2. Ensure that if event/message was not processed, it would not fill up the mailbox in the receiver, maybe allow one event of a kind, and maybe some time-to-live when it becomes obsolete. Step 3. Process in the AI step or something like that, when possible but not instantly. Step 4. Send messages and enjoy crossings knowing the car situation.
Just saw this posted on Reddit, which would be perfect example of where event/signal system could be useful:
Steam user suggested this:
So event can, in this case, switch between traffic light programmes.
There could be various triggers (if we can find really fast no-performance-impact way to do this sort of stuff) for example:
Events could affect any of the features - junction restrictions / priority signs / traffic lights / etc.
Just the time-based event alone could facilitate most if not all the stuff in https://github.com/krzychu124/Cities-Skylines-Traffic-Manager-President-Edition/milestone/11