No time to play myself at the moment, but curious what other people experiences are!

  • VoterFrog@lemmy.world
    link
    fedilink
    English
    arrow-up
    3
    ·
    10 days ago

    I’m using the radar network for dispatch and priority for tie breaking/to make sure the resources are distributed evenly.

    All my loading stations are simply called “Cargo Pickup” and all of my cargo trains go to any of them with an opening. Once there, the station reports on the red wire the ID of the train in the channel corresponding to the item being loaded (unless another train is already being reported by another station with the same items).

    On the demand side, stations look for the ID on the item they need. They copy the ID into the green network on the channel corresponding to their station name. In the simple case, a station serving copper ore to copper smelters copies the train ID from copper on the red network to copper on the green network. But stations can also request multiple ingredients in which case they have some other symbol in their name besides copper ore. (Of course, here too the copying only happens if no other station is requesting a train on that same channel).

    Back on the supply side, the station looks through all the IDs on the green network and sends the ones that match the waiting train to the train. The train uses the symbols to activate an interrupt to go to the corresponding station to deliver the goods.

    I just set this up today. I haven’t perfected it yet. One minor hiccup is handling the fact that you have no way to atomically access a channel. So two stations could request on the same channel at the same time, corrupting the ID. But that only happens if the stations are activated to make a demand on the exact same tick. It’s not so much that it’s a constant problem, it just bothers me that it could be.