OpenTTD Logic: 01 Introduction to Logic Circuits, AND Gate, NOT Gate

Поділитися
Вставка
  • Опубліковано 24 січ 2025

КОМЕНТАРІ • 72

  • @himagainstill
    @himagainstill 5 років тому +28

    An interesting concept. Incidentally, the concept at 6:54 is De Morgan's Laws, which provide a means to transform NAND into NOR (&vv), which only requires the odd NOT to flip things. It's frequently used in logic design because the workings of a transistor mean that a digital signal typically gets inverted.
    Also, fun fact: On the British railway network, a signal is said to be "on" when at danger and "off" when clear.

    • @LugnutsK
      @LugnutsK  5 років тому +3

      I didn’t know about the British “on” and “off,” maybe the OpenTTD convention comes from something like that

    • @himagainstill
      @himagainstill 5 років тому +3

      @@LugnutsK Given its a 50/50 choice, it could just as easily be coincidence, but who knows. The system works just as well either way, the only difference being that the AND gate in red-positive is an OR gate in green-positive (&vv).

    • @mmneander1316
      @mmneander1316 2 роки тому +2

      Another entirely different parallel I see is with digital electronic circuits. There it is a design principle that if a part of a circuit is not powered, that you want the outputs of this unpowered part of the circuit to read out as a boolean value that has the meaning "off" or "inactive" (which is in most cases mapped to boolean zero). In openttd circuits, trains are the thing that "power" the circuit. But in openttd, if there is no train in a block (so that the block is "unpowered"), then the signal is green. So looking at things through the electronic circuit parallel, the green openttd signal would correspond to the "off" state (boolean zero).

    • @RayvenGuard
      @RayvenGuard Місяць тому

      ​@@mmneander1316 Exactly, it's a simple safety measure to always turn a machine off when the input signal is 0. That way, a machine cannot run uncontrolled when the input signal is interrupted. An old railway signal that would simply clear a path when you turn it on and block the path when turned off would therefore have to use this exact logic for safety reasons.

  • @frederickgrenier2367
    @frederickgrenier2367 5 років тому +76

    i dont understand anything and i feel like my brain is overheating

    • @DC4444
      @DC4444 5 років тому +6

      My advice would be don't try to understand everything in one go. I would probably start with the AND gate, then once you understand the AND gate, move to the NOT gate, once you understand the AND and NOT gates, then move on to the OR gate. My other piece of advice would be to practice building and using them. Do something like generate a very flat landscape with the tree algorithm set to none, pay off your starting loan and use the cheats (wiki.openttd.org/Cheats) to get money. I wouldn't recommend using cheats in a proper game but for learning new things in a less harsh playing environment I think its fine.

    • @LugnutsK
      @LugnutsK  5 років тому +10

      Don't sweat it too much, it's definitely the craziest of the crazy stuff you can do in OpenTTD. If you've never played with minecraft redstone or irl circuits then trying to learn logic gates at the same time as learning OpenTTD is gonna be really hard. Also the vast majority of OpenTTD players never even touch logic and still have a good time so its really about what you find fun :)

    • @himagainstill
      @himagainstill 5 років тому +2

      @Frédérick Grenier - the complication is in the building. For the logic, all you need to know is how the gates work, and that given any one of AND, OR, NAND and NOR, you can construct the other three using NOT. After that, the hard part is understanding why the gates are built this way (the NOT confused the heck out of me at the first viewing).
      A NAND B NOT [A AND B]
      A NOR B [NOT A] AND [NOT B]
      A OR B NOT [ [NOT A] AND [NOT B] ]

    • @ondrasirotek4178
      @ondrasirotek4178 4 роки тому +1

      @@LugnutsK I am playing Minecraft and I am pretty good at redstone, so I saw some more confusing circuits

    • @LugnutsK
      @LugnutsK  4 роки тому +2

      ​@@ondrasirotek4178 Redstone is definitely a huge help for understanding OpenTTD logic or even circuits in general :D

  • @Yvax99
    @Yvax99 11 місяців тому +1

    Got recommended this, even I saw this when it came out 4years ago. That reminds me if u are still around

    • @daniel69
      @daniel69 10 місяців тому

      I also wonder the same thing

  • @richarddavis2530
    @richarddavis2530 3 роки тому +41

    Lugnuts: Hey, R&D, I need you to develop an engine that can run at over 2000 km/h
    R&D: For rapidly transporting goods, right?
    Lugnuts: ....
    R&D For rapidly transporting goods , right?

  • @kenank9315
    @kenank9315 5 років тому +19

    i guess the computer system lecture i take finally payed off

  • @zombiefootsoldier2983
    @zombiefootsoldier2983 5 років тому +43

    I feel bad for the people driving the train on those loops

    • @IlayarajaS1997
      @IlayarajaS1997 4 роки тому +3

      Boring and logical work

    • @Vidar33
      @Vidar33 4 роки тому +3

      Those kinds of jobs are for robots. Let them suffer instead.

  • @PiotrDzialak
    @PiotrDzialak 4 роки тому +23

    This is fucking awesome, Theoretically, you could build an in-game computer using those circuits. That's even more clear when you watch the next video, where you build a calculator.

    • @jonkess2768
      @jonkess2768 10 місяців тому

      Which also means you can build a computer playing open ttd in open ttd and then build a computer inside of that and so on It will probably run at 0,0000001 FPs but in theory it should work.

    • @PiotrDzialak
      @PiotrDzialak 10 місяців тому +1

      @@jonkess2768 What if we live in a simulation inside a computer created in an OpenTTD?

    • @bart413
      @bart413 5 місяців тому

      @@PiotrDzialakxddddd hahaha na bank

  • @Gamer-Clark-Zwift
    @Gamer-Clark-Zwift 3 роки тому +4

    Thanks for your OpenTTD videos. I've learnt so much from them and I did my first logic circuit today. Thank you

  • @shirookun
    @shirookun 4 роки тому +17

    Never knew openTTD can be so complicated

  • @RayvenGuard
    @RayvenGuard Місяць тому

    Very interesting video. I'm never going to use any of this, but it's still quite fascinating to see you build it. I'm looking forward to watching you build a CPU that can run Minecraft in OpenTTD, so you can then build a CPU in there to run OpenTTD 👍

  • @bigboi8780
    @bigboi8780 3 роки тому +3

    Requires:
    Alcohol, Goods
    Provides:
    Engineering supplies
    Seems like a typical engineer to me

  • @anrade86
    @anrade86 4 роки тому +7

    this blew my mind!

  • @mjn84
    @mjn84 3 роки тому +2

    I tried to rebuild the layout at around 7:34 but I fail. Trains seem to ignore the exit signal at the entry and get stuck. 1 lane is always ignored, the other occupied and a second train waiting behind. I can only force my trains to go to the desired path, if I set explicit destinations. But I‘d like to self-regulate them (only have 1 vague order to pick up load). Do you have any console commands input before? What are your orders of these long trains?

  • @kent_hdd
    @kent_hdd 3 роки тому +7

    Cool stuff. Now build a Control Unit + ALU to make the ever first OTTD computer chip.

  • @GenericInternetter
    @GenericInternetter 2 роки тому +2

    Me: Nice, chilled out game to build trains and stuff.
    This guy: I WILL BUILD A SUPERCOMPUTER USING LOGIC CIRCUITS, ACHIEVING 200% EFFICIENCY

  • @Titeljan
    @Titeljan 5 років тому +2

    mind blowing stuff lol so this is how you can control boost for your industries :) i wish i saw this video at friday night so i can test it and play with it whole weekend, since busy week because of work, i will forgot about this until next weekend lol suggestion, give us new stuff on friday ^_^

  • @ruthpayot6683
    @ruthpayot6683 5 років тому +4

    I played this industry and liking it. The circuits are new to me, I would like to know how it is different from usual train tracks in operation. Also why it is design that way. This better have an important impact on the industry and gaming performance. I can just copy what is done here and not understand at all. I am not good at signal either so my chances of using this is minimal. It is good and informative to see this new ideas.

    • @LugnutsK
      @LugnutsK  5 років тому +2

      Generally trains are controlled by their orders. But with logic you can make trains behave in ways that orders don't allow. In this case the logic determines the train's destination. Overall, using logic won't give you a huge $ advantage or anything, but personally I think it is a lot of fun.

  • @vernandocalvin4373
    @vernandocalvin4373 3 роки тому +2

    Hey, what is your newgrf that you use??

  • @linuxgaming69
    @linuxgaming69 5 років тому +4

    Where did the logic engine come from? Does it complain about not making any money each year or is it “special”?

    • @LugnutsK
      @LugnutsK  5 років тому +8

      IPv6 Freely Ah good question. You can use any one tile long train, the logic train (from NUTS in this case) is just a custom one specifically for logic, goes fast and can’t carry cargo.
      It will complain about money and orders but I have those notifications permanently turned off.

  • @beauxguss6321
    @beauxguss6321 3 роки тому +1

    The two train release can be done with just a NOT gate on the less preferred track, with the outputs to both tracks as shown. Couldn't it?

    • @LugnutsK
      @LugnutsK  3 роки тому +1

      Yup it could

    • @beauxguss6321
      @beauxguss6321 3 роки тому

      @@LugnutsK I do understand that part of the purpose of the tutorial is to show off both AND and NOT.
      Oh, and the NOT Only version is infinitely expandable, just add a bridge over for each additional option, the single trigger releases them all. I'm just starting to experiment with the simpler elements of logic systems. Your tutorials are essential.

    • @LugnutsK
      @LugnutsK  3 роки тому +1

      @@beauxguss6321 Yeah the benefit of using the full design is that its resilient to any changes in train path-finding preferences, though there are also other ways to ensure that.

  • @finster101
    @finster101 5 років тому +3

    On both input tracks you have extra angled tracks that make "arrows". (Like what you would use on a "reverser" track.) Are they required for some reason here? Thanks

    • @LugnutsK
      @LugnutsK  5 років тому +1

      Ah, yes they are. The pathfinder prefers paths that have multiple options.
      If it didn't have them, the pathfinder would see 1 dead end due to the two-way EOL, and the other path might also be a dead end due to a terminus station. So the train might not behave as expected.
      But with them it makes sure that an open path will always be preferred over the other path.

  • @nirasa
    @nirasa 5 років тому +3

    very usefull video - thx :-) ; continue please

  • @ondrasirotek4178
    @ondrasirotek4178 4 роки тому +2

    Can I ask, which trains and tracks packs?

    • @LugnutsK
      @LugnutsK  4 роки тому +2

      NUTS Unrealistic Train Set, provides the normal ("normal") trains, logic trains, and PURR Universal Rainbow Rails. PURR can be installed separately if you don't want to use NUTS.

    • @ondrasirotek4178
      @ondrasirotek4178 4 роки тому +2

      @@LugnutsK thanks

  • @ShatteredQvartz
    @ShatteredQvartz Рік тому +1

    As if I thought the logistics side of the game wasn't complicated enough...

  • @random4random444
    @random4random444 3 роки тому

    how do you get train tracks with colors

  • @mosesracal6758
    @mosesracal6758 2 роки тому

    Will this work with only path signals?

  • @ruthpayot6683
    @ruthpayot6683 5 років тому

    Per your example, how does the Iron Ore and Coal Industry related to? Each can produce simultaneously without affecting each production. I understand that the Port produces Eng Supplies which is needed by both Iron Ore and Coal to a certain production level, on the other hand once the Iron ore and coal receive Eng Supplies it produces different products. So why is there a need to simultaneously deliver Eng Supplies to both Iron Ore and Coal while both produces different products? Is this just a mere example to illustrate the circuits? Are both Iron Ore and Coal have another destination that needs both to have equal amounts of produce? Please just help me understand. Thank you.

    • @LugnutsK
      @LugnutsK  5 років тому +2

      As you put it, it is just a example to illustrate the circuits, one that I made for the video. But in a proper FIRS game you would transport the iore and coal to the next industry in the chain. And it's important since FIRS gives better production for a particular secondary industry if it receives multiple types of cargo (instead of just one).

  • @livanbard
    @livanbard Рік тому

    So for logic I been using the excellent wired pack. The way it works its the you get a track in the shape of some electrical wires and a vehicle for that logic stuff thats why I came to this video

  • @ekayoga7294
    @ekayoga7294 3 роки тому

    hayy i wacht this and i tried logic train but why that train did not run as fast as in ur vids

    • @LugnutsK
      @LugnutsK  3 роки тому +1

      In the newest versions of OpenTTD there were some changes that make the NUTS logic trains run slower than before

    • @ekayoga7294
      @ekayoga7294 3 роки тому

      so we can't do logic any more??

    • @LugnutsK
      @LugnutsK  3 роки тому +1

      @@ekayoga7294 You still can, there will just be a tiny bit more latency

  • @dwipras1965
    @dwipras1965 5 років тому

    why my logic train slowing not fast as yours thanks

    • @LugnutsK
      @LugnutsK  5 років тому +1

      Could be several things. If you're using NUTS the rail/monorail logic engines have some acceleration time (due to the way tractive effort works), but the maglev accelerate instantly.

    • @dradic9452
      @dradic9452 4 роки тому

      I had this problem as well. I noticed the trains wouldn't accelerate to full speed because of the signal which would slow them down. I had to change the "Train acceleration model" from original to Realistic. Now may trains move as fast as on this video.

  • @Asdayasman
    @Asdayasman 2 роки тому

    One thing I never understood is - why are the logic trains racist caricatures?

  • @Sengyizhe
    @Sengyizhe 9 місяців тому

    It's just super confusing to get your head around because it seems backwards.

  • @henrikmadsen6446
    @henrikmadsen6446 2 роки тому

    How about timetables - wouldnt that be more simple...

  • @wilpikle7754
    @wilpikle7754 Рік тому

    Coding class seems to follow me everywhere

  • @Michiganmayor420
    @Michiganmayor420 4 роки тому +2

    I can imagion some guy making a computer in the 1850s, with trains

  • @heidetenchavez9911
    @heidetenchavez9911 4 роки тому +1

    Is this a mod?

    • @LugnutsK
      @LugnutsK  4 роки тому +2

      Works in vanilla. The trains and colored tracks are from the NUTS trainset NewGRF.

    • @heidetenchavez9911
      @heidetenchavez9911 4 роки тому

      Cool! I always find the coloured tracks really organize. Thanks man!

    • @LugnutsK
      @LugnutsK  4 роки тому

      @@heidetenchavez9911 Oh yeah, you can also get PURR which is just the rails without the trainset if you want to use a different trainset

  • @Claytonrullman
    @Claytonrullman 2 роки тому

    You can just build truck stops and avoid the logic thing .

  • @cooley987
    @cooley987 Рік тому

    My brain stopped

  • @PovoTenso
    @PovoTenso Рік тому

    in Factorio, I am a combinator wizard, now I just watched how the logic is in OpenTTD and it is ugly... ugly, so ugly... I won't play this game for it's combinators at all

  • @brownehawk7744
    @brownehawk7744 Рік тому

    "we need to talk about binary logic" Ok bye.