CODE, FARM, AUTOMATE: The Farmer Was Replaced - Programming a Drone (Video Game)

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

КОМЕНТАРІ • 112

  • @OliverHoerold
    @OliverHoerold 4 місяці тому +28

    It's such a joy to watch somebody who knows how to code!

  • @crybllrd
    @crybllrd 5 місяців тому +97

    The most Nathan's Sandbox game of all of Nathan's Sandbox. You didn't find this game, it found you.

    • @chemicalvamp
      @chemicalvamp 4 місяці тому +2

      This game would be a Chuck Norris if only it wasn't so short.

  • @Snnupy1
    @Snnupy1 5 місяців тому +41

    This kind of games are so good for entry level into programming. It could be very helpful in high schools in the IT class

    • @dovos8572
      @dovos8572 4 місяці тому +5

      there are a few of them that are already used for ages in school. some are java and some are their own simple language and some are python based. but yeah it is nice to see more complex games that also go into algorithmic problem solving and not just move into the 4 directions and pick up and drop.

    • @Snnupy1
      @Snnupy1 4 місяці тому

      @@dovos8572 I learn C++/ C in high school and they used to make us go lane by lane on the blackboard. We didnt really had any game like this to help us learn

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

      too bad now we have an AI so its going to be doing for us all the coding that we are going to ever need

    • @lassebrustad
      @lassebrustad 9 днів тому

      @@alexb3617 tbh, using AI to solve code is like asking for problems. a friend of mine is studying programming, and the worst I've seen him do, is to use ChatGPT to solve stuff he doesn't understand. the result? he doesn't learn it himself, so whenever he's looking back to 1 week old code, he might not understand it at all, and when I try to help him, as I've learned programming step-by-step by myself, I easily understand it, because it's often really basic code

  • @ChristopherBrown-bj4zl
    @ChristopherBrown-bj4zl 5 місяців тому +64

    I can't wait for the Stack Overflow questions on this game lol. or the Git REPO's

    • @RobsonLanaNarvy
      @RobsonLanaNarvy 5 місяців тому +21

      Imagine the outrageous codes the speedrunners are writing

    • @Klausi-uq4xq
      @Klausi-uq4xq 4 місяці тому

      Sir please can you send me the code :)

  • @Koroistro
    @Koroistro 5 місяців тому +13

    Two things of note for the Maze minigame:
    1. Using fertilizer on the treasure resets the *current* maze (but sometimes randomly removes a wall)
    2. Using measure() on the treasure before resetting it tells you where the next treasure will be. This allow for very high optimization potential.

  • @Queue3612
    @Queue3612 5 місяців тому +50

    "There are some things i could optomize" he says whilst his drone keeps tilling soil back into turf before trying to plant something that can only be planted on soil resulting in hay being grown throughout his farm that wont be harvested as the next pass turns it back into soil.

    • @alamrasyidi4097
      @alamrasyidi4097 5 місяців тому +8

      when i played this game myself, the first time i was challenged with the treasure hunt, my solution to keeping track with the drone's direction was putting all the four directions in a list so i can cycle through easily. granted, i am not new to programming, but seeing someone using an if chain for that really bugs me...

    • @HolmbergarnSH
      @HolmbergarnSH 12 годин тому

      What would you do instead? Run something like get_ground_type or what do you suggest?

  • @MindCaged
    @MindCaged 5 місяців тому +14

    As others have said you can just add x + y and then mod 2. Also, you can just leave the ground type as soil since you're planting even grass, the only advantage Turf has is automatically growing grass, however you can grow all plants on tilled soil, and in fact if you want to water them, you can only water soil. Your other solutions are quick and dirty fixes that kind of work, but there's definitely more optimal ways. The endgame of this game is you unlock a timed reset, where it resets almost all of the non-coded-based upgrades(so you can still use all coding features like loops, ifs, senses, etc.) and gain the ability to automatically unlock things, with the goal of running the game from starting speed & size, all the way up the tree to I assume dinosaurs, maybe the goal is to re-unlock the reset upgrade, I haven't completed it yet. And try to do it as fast as possible to end up on the leaderboard. Doing this you also gain fast forward buttons so you don't have to wait the entire run. It's very tricky as there's no obvious code based solution you have to basically hardcode what order to unlock all the upgrades in and automatically upgrade your farming methods as new stuff unlocks. And it has to be automated from start to finish because if execution stops the run is aborted, so you can't manually intervene.

  • @chimmy_jim
    @chimmy_jim 5 місяців тому +31

    I just can't imagine playing a game by doing my day job. Really fun to watch though!

    • @jetcoughlogo5752
      @jetcoughlogo5752 5 місяців тому +2

      yeah, same 😅 it's not like I code for 8 hours a day 😅 but cool concept nonetheless

    • @Nichtdu-rt4ih
      @Nichtdu-rt4ih 3 місяці тому +1

      Why not?
      The challenges are pretty easy and fun. If you do backend it might be a change of pace considering you can actually see your code doing sth.
      I wrote a task scheduler for this where I can configure goals like 3k pumpkins and it automatically does everything. First farm 50/50 for carrot seeds then do the carrots etc.

    • @jetcoughlogo5752
      @jetcoughlogo5752 3 місяці тому

      @@Nichtdu-rt4ih sometimes I'm too worn-out after work. other times, when I'm feeling okay, I'm working on my game. It's not a bash on this title because I think it's great that we have more simple programming games, it's just how I feel

    • @justamanofculture12
      @justamanofculture12 3 місяці тому +1

      And I'm a Game developer and my family handles Farming too. So imagine being me playing this game 😂...........

  • @denizhanyasun2797
    @denizhanyasun2797 5 місяців тому +2

    you taught me more coding than my teacher who taught python in my first year of uni. This game looks great btw

  • @glych002
    @glych002 5 місяців тому +48

    (x + y) % 2 == 0
    That will give a checker board pattern.

    • @Dyanosis
      @Dyanosis 5 місяців тому +1

      I came down to the comments to see if anyone else mentioned the more efficient condition to write there. Nice!

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

      and because 0 is False and everything else is True, there is no need to compare with one or zero, in the worst case handling the other half of the checkerboard (exchanging white and black on a real checkerboard), resulting in >> *_if (x+y)%2:_*

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

      nah that's a chess board pattern ☺

    • @keejay98195
      @keejay98195 2 місяці тому

      it’s cleaner and also more efficient. in his method he used == 1 which is one less tree tile for odd grid sizes

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

    Cool game! Coding and playing at the same time :)

  • @TheRingmaster500
    @TheRingmaster500 5 місяців тому +1

    Glad to run back into your channel, i've been subscribes for so long, but i miss the old modded minecraft videos, that was the classic days for me, maybe one day.

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

    Really cool to see somebody take this game as far as you did. Definitely gonna have to try it myself now lol.
    Also, great vid!

  • @masterface2875
    @masterface2875 5 місяців тому +2

    I would love to see you continue the Manor Lords series

  • @Anson_AKB
    @Anson_AKB 5 місяців тому +7

    you are NOT finished after 1 or 2 more tasks, but *_THEN the real endgame will start_* :
    doing the entire game with a completely automatic program
    from start on 1x1 to finish in one go, including automatic upgrades ...
    and there is also an ingame leaderboard for speedrunning that automatic program
    (currently in around 22 minutes) with an option to speed up that simulation.
    ps: and there are also inofficial leaderboards on their discord for speedrunning the maze
    (the same maze can be used up to 300 times with new locations of the treasure and random walls being removed)

  • @imblackmagic1209
    @imblackmagic1209 5 місяців тому +2

    this game is interesting, it's great to introduce programming to children!

  • @nmflash8
    @nmflash8 3 місяці тому

    How am I not subscribed, I’ve watched everyone of your factorio videos 😂

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

    It's just Python code, but the actual objective to aim for drives me crazy for some reason. I would play this game instantly, and only be angry about not having my programming tools available instantly.

    • @alamrasyidi4097
      @alamrasyidi4097 5 місяців тому +4

      ikr? what do you mean i can use lists but not dicts???

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

    for punpkings check specific values of x and y. if x

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

      For pumpkins, introduce a delay to see if it grows. If you unlock fertilizer, the delay can be .1. I havent tried lower than that.

  • @juulmorten
    @juulmorten 5 місяців тому +1

    this game kind of reminds me of the Colobot game but in a much smaller scope :) i wish they would make a new version of that game at some point.

  • @CSMHD
    @CSMHD 5 місяців тому +1

    with the checkerboeard i guess you can do
    (posX + posY) % 2 == 0
    great video !

  • @katherinecopenhagen4458
    @katherinecopenhagen4458 5 місяців тому +3

    Have you played autonauts vs piratebots? Highly recommended if not :)

  • @friskytemper9727
    @friskytemper9727 5 місяців тому +1

    Amazing playthrough

  • @shandy_6733
    @shandy_6733 3 місяці тому

    i playing this game while learning coding so good

  • @GuillaumeLT
    @GuillaumeLT 5 місяців тому +1

    autonauts is similar but no manual coding only block. You need to manage RAM of you bot and perform base building automation.

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

    I randomly came across this on a different channel I watch and wanted to see it done by someone who knew what they were doing. I loved the fact you explained everything so much, I could keep up. A really fun watch 👏🏾🩵. Gonna subscribe 😊

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

    Please make a follow-up video for cacti and dinosaurs. :)

  • @Ledore464
    @Ledore464 5 місяців тому +6

    When are we going to finish the ONI luxury hotel run?

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

      The Poseidon flooded...

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

      @@skilz8098 ?

    • @skilz8098
      @skilz8098 5 місяців тому +1

      @@Ledore464 When that series first started, he wasn't sure where he wanted to build the Luxury Hotel. He asked his viewers, and many had suggested the water - ocean planet. I was one of them, and I also suggested building it underwater kind of like an aquarium and to name it the Poseidon. I had also suggested that once the hotel was complete, dups were living in it, and it was stable, self-managing to then go ahead and break one of the glass walls causing the living quarters and the rest of the hotel to flood kind of like how the ship The Poseidon did within the movie films that were made about it. I don't think he got quite that far with it yet. He's nearly finished with it. I don't know if he gave up on that project or not. so, in truth, it is T.B.D. if it's going to be continued...

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

    Nice play through

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

    If only this was out when i was younger would have tried it.

  • @karma-px3sm
    @karma-px3sm 5 місяців тому

    Love your videos keep up the good work

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

    For a checkerboard, you can also just do "if (x % 2) + (y % 2) == 1:"

    • @admiller1997
      @admiller1997 3 місяці тому

      I'm not sure what I have done wrong. I am using this code and it doesn't work

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

    i love this game already

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

    I love how most comments saying use (x+y)%2 for the checkerboard 😂

  • @MrNizam1
    @MrNizam1 4 місяці тому

    I can’t wait for this game to really pick up and those insane bored programmers start hopping on. Imagine the possibilities and insanity

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

    Intrued the game after watching 15 minutes but i wont finish this now cuz i might copy your codes 😆 which should be fine but i need to learn to code other languages😎

  • @thingaboutit441
    @thingaboutit441 5 місяців тому +3

    18:40 I think it would be easier to test if xposition × yposition is divisible by 2. It would also be a check pattern

    • @timecubed
      @timecubed 5 місяців тому +1

      probably just
      (xposition + yposition) % 2 == 0

    • @theit8514
      @theit8514 5 місяців тому +4

      (x + y) % 2 == 0 produces the correct pattern.

    • @josephle5373
      @josephle5373 5 місяців тому +1

      so close

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

      Even*Even is also even, so your version would plant 3 out of every 4 tiles (if you split the board into 2x2 squares, the bottom left would be the only one not planted)

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

      You need to do addition rather then multiplication
      0+0 | 1+0 | 2+0 ...
      0+1 | 1+1 | 2+1...
      0+2 | 1+2 | 2+2 ...
      0 | 1 | 2
      1 | 2 | 3
      2 | 3 | 4
      There is two things to note
      1. For the most part it's more important to have your code easy to read then be Efficient. Write out the test Implicitly. makes it clear what your doing. With that being said it's pretty stander practice using ((x+y)%2 )
      2. If you are going for efficiency. It may depend on your processer and Compiler for which is faster to do an +, % and logic test rather then for 4 % and 3 logic test. The reason for this the addition may need more cycles to be done(it may have fix time to process no matter how small the number is, While modular is simple check one bit and can be done in Is parallel.

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

    Well done.

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

    Love it!

  • @nicknevco215
    @nicknevco215 3 місяці тому

    Best clicker yet

  • @animacecz79
    @animacecz79 5 місяців тому +1

    Hi Nathan il ask u something do u remember fs19 obhertal map series u said there will be annother series on difrent map and i dont see it anywhere on ypur chanel and if u want il love to do some vids on fs19 multiplayer with ya.

  • @nicknevco215
    @nicknevco215 3 місяці тому

    Cool you can make pulls

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

    i think the idea of a game using code in the game is slightly specific. most people who know how to code game logic are making their own games.. and people who don't know how to code ( most living people in the world ) can't play it. very strange idea for a game.

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

    Maybe this can help me in programming but i only know java and c++ (im still in Senior High ICT strand)

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

    here as soon as i see the notification 😊

  • @artificial_float2677
    @artificial_float2677 3 місяці тому

    I was surprised that you did not not need to pass x and y in the plant

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

    I like this game but do I have to know how to code first or do I learn as I go?

  • @TestNewphone-f6n
    @TestNewphone-f6n 3 місяці тому

    Finally a real automationg ame
    fuck factorio and its "Its already solved just connect the pipelines you CANNOT fail"
    Simple
    but atleast there is a right and wrong.

  • @KINGABDULLAHKhan-d3v
    @KINGABDULLAHKhan-d3v 5 місяців тому +1

    Please play cities skylines 1 series please please I love that game not 2 only one(1).cities skylines(1)

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

    6:42 can't you just move the move(North) to the end of the for loop so you harvest before moving?

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

    oh my fucking god I used to watch your starmade videos

  • @benjaminjames7815
    @benjaminjames7815 3 місяці тому

    wheres the code for the list.
    Im trying to follow along but i cant get past the sunflowers as theres no code for the list

  • @khaled6969mm
    @khaled6969mm 5 місяців тому +1

    Bro we need a new series of oxygen not included 🥺

  • @Valdemarcheck
    @Valdemarcheck 4 місяці тому

    Why use do_a_flip at all? At least in the very beginning, you can just leave with always waiting for can_harvest to return true. It doesn't make sense to use do a flip, it's less efficient

    • @Nathans-Sandbox
      @Nathans-Sandbox  4 місяці тому

      I think because when can harvest is not true, the while loop would be closed, but you might be right that it would just execute in the next frame;)👍

  • @surgeon23
    @surgeon23 4 місяці тому

    Holy SpaghettiOs.

  • @chemicalvamp
    @chemicalvamp 4 місяці тому

    I really want to play this game, if only it was a C type language 😥Well at least python is a very relevant language to learn. If you can get people to try to play this, do you have any idea how much watch time that could mean? 🙃

  • @Ryöken17
    @Ryöken17 4 місяці тому

    You made an " if == false", why not make a "while == false" ?

  • @jamesrogers4715
    @jamesrogers4715 5 місяців тому +1

    I'm watching this and thinking, "Wow I could do this so much better."

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

    Don’t be mad about the end of the game if you don’t know it, because there is none

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

    you nerd!...but i knew that back when you used to make minecraft songs...HAHAHAH.

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

    Sweet, I liked watching this! Subbed!
    "you can do that on your own"
    Oh, it's not a series... Unsubbed!

    • @Nathans-Sandbox
      @Nathans-Sandbox  5 місяців тому

      Thanks for the update! It's a good video to the game. There's no leverage over me with the sub, I'm doing it for fun;)

  • @neettuguppta8590
    @neettuguppta8590 4 місяці тому

    22:27

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

    Wht Python

  • @rex2314
    @rex2314 24 дні тому

    shenzhen io python edition

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

    I was interested until python lol python.

  • @denoncode9073
    @denoncode9073 25 днів тому

    I FUCKING HATE THIS GAME!

  • @real_lith
    @real_lith 5 місяців тому +1

    As soon as i heared the mention of Python prog lang - i almost didint puke, clicked off and went back to watching ur oxygen not included videos.
    python... :puke:

    • @Dyanosis
      @Dyanosis 5 місяців тому +3

      Not very professional of you to publicly post your exaggerated disdain for a language. All you gotta say is "not interested in watching Python scripting" and move on. But adding the ":puke:"... super unnecessary.
      It's called respect.

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

      ​@Dyanosis 1. Respect has to be earned, not given.
      2. I did not disrespect the youtuber. I even clearly said that I'm going back to watching his other vids.
      3. Python is not a living entity. Meaning u can't respect or disrespect it.
      And idc if its "professional" or not. This ain't a job interview or talking to a client. It's a YT comment section. I may express my dislike of a programing language as I want. And I did that in a visual manner, being as close to the truth as possible.

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

    (get_position_x + get_position_y) % 2 == 0