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

แชร์
ฝัง
  • เผยแพร่เมื่อ 24 พ.ย. 2024

ความคิดเห็น • 70

  • @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?

  • @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 ปีที่แล้ว +1

      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).

  • @frederickgrenier2367
    @frederickgrenier2367 5 ปีที่แล้ว +75

    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 9 หลายเดือนก่อน +1

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

    • @daniel69
      @daniel69 8 หลายเดือนก่อน

      I also wonder the same thing

  • @kenank9315
    @kenank9315 5 ปีที่แล้ว +19

    i guess the computer system lecture i take finally payed off

  • @shirookun
    @shirookun 4 ปีที่แล้ว +17

    Never knew openTTD can be so complicated

  • @zombiefootsoldier2983
    @zombiefootsoldier2983 5 ปีที่แล้ว +42

    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 8 หลายเดือนก่อน

      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 8 หลายเดือนก่อน +1

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

    • @bart413
      @bart413 3 หลายเดือนก่อน

      @@PiotrDzialakxddddd hahaha na bank

  • @Gamer-Clark-Zwift
    @Gamer-Clark-Zwift 2 ปีที่แล้ว +4

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

  • @bigboi8780
    @bigboi8780 3 ปีที่แล้ว +3

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

  • @kent_hdd
    @kent_hdd 3 ปีที่แล้ว +7

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

  • @anrade86
    @anrade86 4 ปีที่แล้ว +7

    this blew my mind!

  • @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

  • @ShatteredQvartz
    @ShatteredQvartz 10 หลายเดือนก่อน +1

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

  • @ruthpayot6683
    @ruthpayot6683 4 ปีที่แล้ว +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  4 ปีที่แล้ว +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.

  • @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 ^_^

  • @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?

  • @nirasa
    @nirasa 5 ปีที่แล้ว +3

    very usefull video - thx :-) ; continue please

  • @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

  • @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.

  • @Sengyizhe
    @Sengyizhe 7 หลายเดือนก่อน

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

  • @finster101
    @finster101 4 ปีที่แล้ว +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  4 ปีที่แล้ว +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.

  • @ruthpayot6683
    @ruthpayot6683 4 ปีที่แล้ว

    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  4 ปีที่แล้ว +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).

  • @wilpikle7754
    @wilpikle7754 ปีที่แล้ว

    Coding class seems to follow me everywhere

  • @random4random444
    @random4random444 2 ปีที่แล้ว

    how do you get train tracks with colors

  • @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

  • @Michiganmayor420
    @Michiganmayor420 4 ปีที่แล้ว +2

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

  • @mosesracal6758
    @mosesracal6758 ปีที่แล้ว

    Will this work with only path signals?

  • @henrikmadsen6446
    @henrikmadsen6446 ปีที่แล้ว

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

  • @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  4 ปีที่แล้ว +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?

  • @Claytonrullman
    @Claytonrullman ปีที่แล้ว

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

  • @cooley987
    @cooley987 ปีที่แล้ว

    My brain stopped

  • @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

  • @brownehawk7744
    @brownehawk7744 ปีที่แล้ว

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

  • @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