The Most Brilliant Coding Farming Game

Ойындар

Program and optimize a drone to automate a farm and watch it do the work for you. Collect resources to unlock better technology and become the most efficient farmer in the world. Improve your problem solving and coding skills.
Check out The Farmer was Replaced here:
-- store.steampowered.com/app/20...
#games #olexa #strategy #farming #automation #programming
Thanks for watching!
-- Extra Olexa Content - / @olexa2
-- Discord: / discord
-- Twitch: / olexastream
-- Twitter: / olexayt
-- Reddit: / olexa
-- My Nexus Gamestore: www.nexus.gg/olexa
-- KZread: / olexayt
-- Business Email: olexakid@gmail.com
-- Join this channel to get access to perks:
/ @olexayt
Music I Use:
-- www.bensound.com/free-music-f...
-- Spring by Ikson
-- Harris Heller Streambeats Lofi Spring by Ikson | ikson.com/tell-your-story
Music promoted by www.free-stock-music.com

Пікірлер: 332

  • @bbittercoffee
    @bbittercoffee2 ай бұрын

    Tyler going "I'm not gonna do functions yet, it's too complex" and then doing functions is such a Tyler Moment™

  • @TheMoonlight1711

    @TheMoonlight1711

    2 ай бұрын

    trademark more like tyler moment

  • @codesymphony

    @codesymphony

    2 ай бұрын

    this game is kind of brutal without functions. so much repeated work and the little text editor is pretty clunky to work with even just changing a single line isn't always straight forward

  • @EmmaJasper-bk7kh
    @EmmaJasper-bk7kh2 ай бұрын

    I’m so happy this series is back! It’s so interesting seeing how much olexa already knows about coding

  • @OlexaYT

    @OlexaYT

    2 ай бұрын

    It’s crazy what 4 years of school and 5 years in the industry will do!

  • @bumbomumboni4735

    @bumbomumboni4735

    2 ай бұрын

    ​@OlexaYT it's only been 7 hours and you already have over 700 likes I actually started watching this channel for this game so please keep it up I love it

  • @loganshaw4527

    @loganshaw4527

    2 ай бұрын

    ​@@OlexaYT lol 14hours later 1k already and you said coding videos are not going to do well. Seems a 1,000 poeple disagree. Love the muti function set up. Also hard to idle in only a hour.

  • @SolDizZo

    @SolDizZo

    2 ай бұрын

    Next DougDoug in the making

  • @OlexaYT

    @OlexaYT

    2 ай бұрын

    I’ll be recording the next one today, it’ll go up tomorrow. Y’all pulled through, I’ll oblige. Good luck on the 1000 tomorrow

  • @Jengamouse
    @Jengamouse2 ай бұрын

    Would love for this to become a full series!

  • @demarcorr
    @demarcorr2 ай бұрын

    great way to learn how to code, including the horror of proper state management as a beginner.

  • @moonshark4909
    @moonshark49092 ай бұрын

    29:18 quick little refactor that i felt clever about: if ((x+y) % 2): plant(Tree) else: whatever move(South)

  • @eterrnal

    @eterrnal

    2 ай бұрын

    frrrr this is one of the first things i thought of when it mentioned checkerboard pattern

  • @_APV_

    @_APV_

    2 ай бұрын

    I'm no programmer but I also thought about the x+y being even/odd as a checkerboard pattern, but then I have no idea how the move right works. For example: "If x+y are even, plant, then go south, else, just go south." This will do only one vertical line. I don't see why Tyler's code works without somehow counting to 4 (world size), or looking for additional "if x = 0, move east". P.S. I only now semi-realize that tabs are not there just for aesthetics (making it easier to see structure by looking) but they also affect the sequence in which code works. That is confusing...

  • @DocSnipe

    @DocSnipe

    2 ай бұрын

    @@_APV_ If I am understanding what you are saying: His code knows to move east because he has `move(east)` in between the 2 for loops. It is just hard to see because Python uses indentation (which you mention in your P.S. section) as its primary way of structuring. It's one of the reasons I don't like Python, many other languages wrap code in between { and } making it clear. The for loops are using the "range" of `get_world_size()`. Once the for loop that is checking the value of `y` concludes, only then is the `move(east)` ran and the `x` value is increased by 1. Here is a visualization of the loops and how they manipulate the variables (x and y)'s values: Loop Starts x = 0 y = 0 y = 1 y = 2 y = 3 Move East x = 1 y = 0 y = 1 y = 2 y = 3 Move East x = 2 y = 0 ... and so on. Basically just move east every time the x value changes. so using the commenters solution you would do something like: if ((x+y) % 2 == 0): harvest() # make a harvest function to use here water_me(0.75) plant(Entities.Tree) move(South) # This is NOT in the if statement. # get_world_size returns 4 when grid is 4x4, grid is always even (4x4,5x5, never 4x5 or similar) # need to add 1 because y is an index value which start at 0 instead of 1 if ((y + 1) == get_world_size()): move(East) That SHOULD work. I'm a uni student still so hopefully I didn't mess up anywhere and hopefully my explanation was easy enough to consume :)

  • @brunoianigro61

    @brunoianigro61

    2 ай бұрын

    Oh shit, I had it check the modulo of both coordinates and if they return the same value they plant the tree, that's so much less code

  • @robcop2play

    @robcop2play

    2 ай бұрын

    For added efficiency you can plant bushes between the trees for more wood...

  • @cszqravr
    @cszqravr2 ай бұрын

    Comment for the algorithm to do my part to prove olexa wrong about the performance of this video

  • @iconica9516
    @iconica95162 ай бұрын

    i was going to say "i know youre already juggling rouge voltage and animal farm but this would go so hard as a series since you code a lot already" and then then the olexa thinks text popped up ive never seen content so rich

  • @mongmanmarkyt2897

    @mongmanmarkyt2897

    2 ай бұрын

    it's so rich in nutrients, we shall be eating so good

  • @OlexaYT

    @OlexaYT

    2 ай бұрын

    Too many games 😳

  • @davidjohnson2146
    @davidjohnson21462 ай бұрын

    You should make this a full series, i've been loving watching the gameplay and hearing you walk through the code!

  • @TheRealLAC
    @TheRealLAC2 ай бұрын

    I have soent the last 4 hours of my life playing this and optimizing my path clearing. I blame you. Wholeheartedly.

  • @loganshaw4527
    @loganshaw45272 ай бұрын

    Coder vs drone "Will the drone do what the coder wants? FInd out next episode of the farmer has been replaced."

  • @kamilrichert8446
    @kamilrichert84462 ай бұрын

    For checkerboard pattern I think we can check for (x+y)%2 If either x or y changes by 1, the parity of (x+y) changes so the check fails in the four directions from a position where it succeeded

  • @SosiCreatesArt

    @SosiCreatesArt

    2 ай бұрын

    Yee getting patterns in a grid was one of the first things we’d done in high school programming idk why it got so complicated here 😭

  • @Pyzro
    @Pyzro2 ай бұрын

    For more wood, you can 'else: plant bush' to plant between the trees.

  • @pedroff_1
    @pedroff_12 ай бұрын

    Loving these videos but the checkerboard gave me an aneurism. `if (x + y)%2 == 0` would have solved all the scenarios the conditional tree encompassed

  • @OlexaYT

    @OlexaYT

    2 ай бұрын

    Pretty smart there yeah. Good logic!

  • @bekfaststealer2660

    @bekfaststealer2660

    2 ай бұрын

    Alternatively x%2 == y%2

  • @brennangray8712

    @brennangray8712

    2 ай бұрын

    I guess since trees only care about other trees, and wood is the goal with that program, you could always plant bushes in between the trees

  • @pedroff_1

    @pedroff_1

    2 ай бұрын

    @@bekfaststealer2660 Oooh, nixe alternative as well

  • @abrodeur

    @abrodeur

    2 ай бұрын

    My first solution was also using (x+y)%2, but I understand the argument that doing it explicitly makes code much more readable. I think ​@bekfaststealer2660 idea x%2== y%2 is nice middle between readability and a single conditional statement.

  • @isaacashton5772
    @isaacashton57722 ай бұрын

    Hey olexa! I found your channel from the Tiny Rogues video and i’ve loved all the new indie games filling up my library! This series is one of my favorites so far, i’d love to see more episodes as someone teaching myself to code! Im working on my own solo project, and your videos have been a huge inspiration to me!

  • @JonahSeaOfficial
    @JonahSeaOfficial2 ай бұрын

    just got the game on a whim last night and decided to see if anyone had made any videos about it which of course led me to your channel and MAN i’m glad it did! i watched the first video and loved it! keep up the great work! you’re really good at giving tips as well as keeping stuff simple for my brain to understand!

  • @TheSpaghettiMan32
    @TheSpaghettiMan322 ай бұрын

    If watering the trees becomes a problem you could try only watering the tiles that you're about to plant a tree on!! Also really like this game so far, found myself cracking up when you lost the thread a bit with the tree function 😅 something that i can relate to very much

  • @thebellin1462
    @thebellin14622 ай бұрын

    Small optimization: for planting in a checkerboard pattern, instead of checking with two double if statements you can simply use if ( x + y ) % 2 == 0. Great video! Really think helps new programmers in learning :)

  • @Iamconnorlee
    @Iamconnorlee2 ай бұрын

    starting a data analytics program this fall, I'm glad you showed me this game (picked it up on Steam) so I can learn a little coding before I absolutely need it. Never thought I would do anything but watch tutorials, but a game with a dopamine loop that uses coding? Sign me up

  • @SnakeEyeJJ
    @SnakeEyeJJ2 ай бұрын

    yay more farming! I like this more than your other current series I'm sorry to say Olexa :D still loving your content and keeping up with your Olexa Looks style content x

  • @coreymeyer2008
    @coreymeyer2008Ай бұрын

    This is probably my favorite video I’ve seen of yours! I hope to see more :)

  • @CloudEpik
    @CloudEpikАй бұрын

    Currently learning code, i love those videos, equal part relaxing, entertaining and educational!

  • @doodwithayoutoob
    @doodwithayoutoob2 ай бұрын

    Loved it! More chill coding or farming games are always welcome.

  • @BadgerBishop
    @BadgerBishop2 ай бұрын

    This was much better than I expected, please do more.

  • @Yourbeast1
    @Yourbeast12 ай бұрын

    Really loved this video!!! Keep it up! For the algorithm!!!!❤️

  • @hhighmell2916
    @hhighmell29162 ай бұрын

    I really like this being back please make it a series

  • @binfinn6085
    @binfinn60852 ай бұрын

    Would be really cool to see another episode of this

  • @KCopperr
    @KCopperr2 ай бұрын

    I loved this video 😊 It was stimulating, educational, constantly developing, and something you enjoy! Hopefully you keep with it because this has been such a fun video but understandably you gotta give the people what they want

  • @bondies777
    @bondies777Ай бұрын

    Enjoy seeing your thought pattern as you work through these, very interesting to watch Also enjoying to see you constantly refactoring the code. Refreshing that you keep your errors in the video too, reminds me that I am allowed to make errors too

  • @OlexaYT

    @OlexaYT

    Ай бұрын

    Nobody’s perfect! Even experienced programmers make mistakes

  • @dillonvandergriff4124
    @dillonvandergriff41242 ай бұрын

    Please continue the series! I'm really enjoying this one :)

  • @codesymphony

    @codesymphony

    2 ай бұрын

    yes please.

  • @xXpezcoolXx
    @xXpezcoolXx2 ай бұрын

    Always nice to see a different perspective / approach on coding, I'm kind of hoping for more since you're pretty decent !

  • @sdog300
    @sdog3002 ай бұрын

    I thought I was subscribed already for months. you've been in my recommendations regularly.

  • @REXITT
    @REXITT2 ай бұрын

    I Love this! So educational but it also allows you to see the fruits of what you're learning

  • @Phrostbitex
    @Phrostbitex2 ай бұрын

    Why am I so entranced with these videos? I understand almost nothing, but it's just so mesmerizing.

  • @DianaBell_MG
    @DianaBell_MG2 ай бұрын

    Never watched any of your vids before, got a recommendation, and bought the game thanks to you, thank you so much.

  • @marcbennett9232
    @marcbennett92322 ай бұрын

    nice nice! I actually enjoy this quite a bit. im not a programmer really but I dabbled years ago. would love to see you make the leaderboard

  • @emuellio
    @emuellioАй бұрын

    this is such a nice video, to learn more about coding. pls keep going

  • @Will.Power55
    @Will.Power552 ай бұрын

    We definitely need more of this!

  • @jackeea_
    @jackeea_2 ай бұрын

    I feel like half the time I'm going "tch, Tyler, you absolute buffoon, you should use a WHILE loop for watering, to ensure maximum hydration" and the other half is "how the hell did you make getting a checkerboard pattern so easy that took me like half an hour" This is so good, probably the only time I prefer watching someone play a programmy game over playing it

  • @loganshaw4527

    @loganshaw4527

    2 ай бұрын

    Different people Excel at different things even in the same game.

  • @JD2jr.

    @JD2jr.

    2 ай бұрын

    The funny thing is, I was thinking "how did you manage to make a checkerboard so complicated?" lol. You just have to check if x%2==y%2.

  • @Cadllmn123
    @Cadllmn1232 ай бұрын

    I love this not series.- FWIW I think you approached this video in the right way - more like a tutorial with a practical output.

  • @hugofontes5708
    @hugofontes57082 ай бұрын

    Quite chill Reminded me my friend suggested me Turing Complete, gotta put that on the backlog before I forget again

  • @nickowen6882
    @nickowen68822 ай бұрын

    So many great games. I hope you come back to this one someday.

  • @Blubb3rbub
    @Blubb3rbub2 ай бұрын

    I think there is a `clear()` function or something like that, that resets drone to bottom left and clears the field. Saw it in some doc last episode.

  • @PROdotes

    @PROdotes

    2 ай бұрын

    there is indeed

  • @jimmyhutchison1638

    @jimmyhutchison1638

    2 ай бұрын

    yes but OlexaYT likes the drone to start at the top square and clear puts it on the bottom square also it sets the field to grass it also get's rid of the tilled ground so there is a lot of problems with clear

  • @PROdotes

    @PROdotes

    2 ай бұрын

    @@jimmyhutchison1638 the top thing is easy to solve, you just move(South) and you're on top after clear... the tilling... ye, you do have to re-till... i hate a tilling(bool) function i use that tills or un-tills stuff for me

  • @fishman649
    @fishman6492 ай бұрын

    Its relaly good to see how other people play the game and solve problems.

  • @capability-snob
    @capability-snobАй бұрын

    What a lovely UI for defining and running functions!

  • @emmaporter8160
    @emmaporter81602 ай бұрын

    Got recommended the first episode, was not planning on subscribing but then he made this a series.

  • @PalmieriLoria
    @PalmieriLoria2 ай бұрын

    There is something satisfying seeing you program this little robot ^^ I vote for calling him bob, even if this is the last video you make of him xD But I do hope you continue at some point. :)

  • @aizenmd5705
    @aizenmd57052 ай бұрын

    I loved it! It's really hard to code under pressure like that. I'm a python tutor and I have to improvise a lot during the lesson (mainly because I'm lazy) but i know that of I had been recording with the explicit purpose of making it entertaining I would have the code much worse lol

  • @cthhtccth1
    @cthhtccth1Ай бұрын

    I like the game and I like the way you play it. Good work

  • @houmamkitet9555
    @houmamkitet95552 ай бұрын

    I am certainly going to try this game as soon as i have time Meanwhile i would really appreciate if you put up more episodes cause there is defenitely alot of interest

  • @shadowofdeath8000
    @shadowofdeath80002 ай бұрын

    So happy to see more of this. Edit after watching: Yay, now he HAS to do more. It was a deal. Teach us more

  • @helicoidcyme
    @helicoidcyme2 ай бұрын

    fun! i appreciate the edutational approach.

  • @helioke
    @helioke2 ай бұрын

    Seeing this game return is just a banger! Replace more farmers!

  • @thedouchebagofholding980
    @thedouchebagofholding9802 ай бұрын

    This was the best video I've seen from you.

  • @_wappy_
    @_wappy_2 ай бұрын

    FULL SERIES PLS

  • @elobenccc
    @elobenccc2 ай бұрын

    Really cool series, it’s cool to see another brain that likes to program!! The game is awesome too

  • @ElectricalInsanity
    @ElectricalInsanity2 ай бұрын

    I'm not even a minute in, but thank you for cleaning up the code from last episode. I know you know how to iterate over a 2D array; coding for an audience just makes you forget everything.

  • @OlexaYT

    @OlexaYT

    2 ай бұрын

    It’s a lot harder coding in front of people and explaining it ahah

  • @thedormantinformant3216
    @thedormantinformant32162 ай бұрын

    what!?! you don't wanna literally watch grass grow, aka automate everything with code, jokes aside love the content, ya keep makin bangers of vids.

  • @loganshaw4527

    @loganshaw4527

    2 ай бұрын

    Adding more yield and speed is so a incremental aspect of the game.

  • @TheWorstWurst
    @TheWorstWurst2 ай бұрын

    As a non-coder i was so stupidly proud of myself after setting up a code for big pumpkins that scales with world_size.😂

  • @Dylan52meow
    @Dylan52meow2 ай бұрын

    It's interesting watching your thought train derail as your code needs modifications. 😂 I might end up picking up this game to practice programming! We demand replacing more farmers with more Olexa code!

  • @Shivenis
    @Shivenis2 ай бұрын

    I was going to say the "if (x + y)%2 == 0" thing but I see it in comments already xD Negatives themselves in range() don't work but if I don't remember wrong you can choose range limits and step: first number is starting point, second one is the goal (but not included) and third the step. So range(5,2,-1) is {5,4,3} The thing you tried in 26:22 should be "for y in range(get_world_size()-1,-1,-1)"

  • @BizarePlayer
    @BizarePlayer18 күн бұрын

    Bought this game today and so far I'm having really good time playing it :D It really makes you think how to make something work. And figure out why it's not working. Or even why it's working...

  • @matilozano96
    @matilozano962 ай бұрын

    Here’s some cool utility functions I made (I just put them all in the same window since they’re short): Wait_Harvest: while cant harvest and plot is not empty, pass. Afterwards, harvest. Sure_Tilled: wait harvest, if not tilled, till Sure_Untilled (for grass): wait harvest, if tilled, till It’s cool to see the drone go and wait if it’s going too fast

  • @Xeros08
    @Xeros082 ай бұрын

    For checkerboard pattern I personally would go for a flattened grid iteration, and just increment i +=2. For non programmers, to iterate through a flattened array/grid/etc means to do a single loop instead of nesting N loops, where N is the dimensions of the array. For a square (2D), instead of two loops, you iterate from 0 to height*width. And then with some clever math you can calculate X and Y from the flatened index. To get X = i % width To get Y = i / width And by just incrementing by 2 you skip every other tile and save on iterations. Doesnt matter much for an idle game, but it's always good to try to simplify stuff, as the more you do stuff differently, the more tools you get

  • @jonymanolo
    @jonymanolo2 ай бұрын

    you can optimize the water, into the cheker pattern or plant carrots next to the trees.

  • @_APV_
    @_APV_2 ай бұрын

    I'm already confused by how and why the checkerboard code works, but you still have my like:D Hope it reaches 1k and a third episode:)

  • @OlexaYT

    @OlexaYT

    2 ай бұрын

    We can create a check board pattern by looking for even and odd positions on a board since numbers alternate. Even odd even odd even odd.

  • @SmeshnoiChel
    @SmeshnoiChelАй бұрын

    You can plant bushes in between trees to boost wood production

  • @OlexaYT

    @OlexaYT

    Ай бұрын

    Yup we do that in the next episode

  • @KiraIsGod
    @KiraIsGod2 ай бұрын

    You can plant bushes along with trees, also planting right after harvesting is more efficient

  • @Solanaar
    @Solanaar2 ай бұрын

    I'm not a programmer, but I recently started teaching myself python, and this game is amazing. I made a cool main-function: I created harvester-functions for all 3 goods (hay, wood & carrots) In my main I can set individual thresholds for each good and it then checks each and if it finds one that's lower it executes that good's function for the entire field, until the threshold is reached and then goes to the next. The neat thing is, that I can infinite loop it (it defaults to hay) and technically, if at one point buying unlocks could be automated I could then completely automate the game, lol. Though, I suspect, sooner or later I'll have to write something that can mix different goods depening on growth time to prevent unnecessary idle time. Overall, this game finally made me understand why optimizing code is so important. I wrote a function that checks for the state of a single square. If it was empty, it would plant, if it was planted, but not harvestable, the robot would just move on and if it was harvestable, it would harvest. However, due to how I wrote it, it would check each square thrice, in the worst case. So I had the idea to store the states in some variables and then simply check those variables instead of running the get_entity_type() and the other one every single time. I also finally understood why object-oriented programming is so useful, because before I could declare functions (and create multiple files) I had to write everything hundreds of times. That limitation of having to work in a more inefficient way first is exactly what I needed to understand. How it's taught, usually, the teacher simply says "use classes, because it is the most efficient way". But since you'd never experience how much more tedious it is without classes, you would never truly understand why they are useful. Good stuff.

  • @lilpwnage36

    @lilpwnage36

    2 ай бұрын

    I believe buying unlocks is already a feature

  • @BeardsandBullets13
    @BeardsandBullets132 ай бұрын

    I bought the game to teach myself a thing or two, it is so worth it, seriously pick up this game if you don't know how to code, it's plain fun.

  • @pkt7634
    @pkt76342 ай бұрын

    Pls more of this!

  • @RicanSamurai
    @RicanSamurai2 ай бұрын

    I chuckled at the if __name__ == '__main__' part. Been there many times haha

  • @1990nightfire1
    @1990nightfire12 ай бұрын

    Please keep on going!!!!

  • @xwarockx3959
    @xwarockx39592 ай бұрын

    You can have a huge improvement in speed and efficiency if you make the drone harvest up, move right and harvest down, not just harvest down, move up, move right, harvest down. Saves the movement needed to go upwards.

  • @OlexaYT

    @OlexaYT

    2 ай бұрын

    I mean let’s slow down with HUGE improvement lmao.

  • @xwarockx3959

    @xwarockx3959

    2 ай бұрын

    @@OlexaYT is it not? It felt like that to me. Maybe I saw more than it actually did, but it at least looked really efficient

  • @OlexaYT

    @OlexaYT

    2 ай бұрын

    It’s like, two extra steps lol

  • @KartikayBagla
    @KartikayBaglaАй бұрын

    I am sorry to say I only watched one minute of the video. I immediately bought the game, played for 2 hours straight, and have no plans of watching these videos until I have finished my own playthrough (or until I give up and look for more optimization ideas). Thanks for introducing me to this game, and I'm commenting for the algorithm.

  • @DreamingBlindly
    @DreamingBlindlyАй бұрын

    I'm also a programmer and, personally if I know a piece of code is gonna be used multiple times in different areas, I'll try to separate them into functions and just call them whenever I need them. That way I avoid making spaghetti and significantly reduce the size of my codes because I know for a fact that I'm probably gonna leave artifacts all over the place if I don't XD

  • @FlexNiko
    @FlexNiko2 ай бұрын

    this game is how i play minecraft sometimes :D i go on public servers, some like grindy gamemode where there are many repetetive tasks (like cactus clicker on playlegend) and try to automate everything i can with scripting :D its fun to find solutions for weird problems.

  • @khaledahmed9136
    @khaledahmed91362 ай бұрын

    I played this game for 3 1/2 hours so far, I love it.

  • @lennyl12
    @lennyl12Ай бұрын

    Do more! I like this video!

  • @OlexaYT

    @OlexaYT

    Ай бұрын

    There’s like 4 more episodes after this haha

  • @minuteman1043
    @minuteman10432 ай бұрын

    I believe you could plant bushes in the spaces between trees and they won't slow the tree's growth.

  • @jimmyhutchison1638

    @jimmyhutchison1638

    2 ай бұрын

    yes very easily too I am not a programmer and was able to work it out on my own

  • @zulaaislynn
    @zulaaislynn2 ай бұрын

    More please!

  • @josephmellen7052
    @josephmellen70522 ай бұрын

    Definitely a fun puzzle game for non coders, and a fun maximizing puzzle for coders. I got it after your first video to play around

  • @PeaceMakerRuSGames
    @PeaceMakerRuSGames2 ай бұрын

    The video is great! In the last part, though, your water level decreases too fast because you are watering every tile, maybe put `water_me` before planting a tree, so that only tiles that have trees are watered

  • @orioncannon2687
    @orioncannon26872 ай бұрын

    Im ready for episode 3, like goal surpassed

  • @NickMaovich
    @NickMaovich3 күн бұрын

    I think this video does just fine!

  • @robinmaurer2645
    @robinmaurer26452 ай бұрын

    Yeeeeees a second episode

  • @atlas9467
    @atlas94672 ай бұрын

    This visual explanation of functions would’ve saved my ass last semester damn 😭😭😭😭😭😭

  • @Sheriff_K
    @Sheriff_K5 күн бұрын

    Honestly Functions make it EASIER to understand in my opinion, as it turns things into keywords instead of a bunch of code.

  • @ishopeatsea
    @ishopeatsea2 ай бұрын

    olexa turns into a programming channel

  • @jayglenn837
    @jayglenn8372 ай бұрын

    Yessss more!!

  • @danielrhouck
    @danielrhouckАй бұрын

    Between watching episode 1 and episode 2 I got the game and started playing (I came back when I had trouble with sunflowers, purely from me not reading how they work correctly, and wanted to see how you handled them). And I *know* I had trouble figuring out how to say a checkerboard pattern for trees. But since I just figured it out, the answer feels obvious and it seems weird watching him figure it out and not getting it. 32:32 Same bug as last episode: you put the move inside the if statement.

  • @commandcracker42
    @commandcracker42Ай бұрын

    Imagin speedruns for this XD

  • @matthewfisher4373
    @matthewfisher43732 ай бұрын

    Please oh please keep playing this game. It scratches the engineering brain. I love this.

  • @LeeAnnC
    @LeeAnnCАй бұрын

    This is giving turtles in Minecraft back in the days of computer craft

  • @Kraus-
    @Kraus-2 ай бұрын

    When he called the reset to top function that was so cool. How would you make it only water the tiles that you're planting trees on?

  • @cassandrakimmel9600
    @cassandrakimmel96002 ай бұрын

    You should do a programming course lmao, your voice is very soothing and i fall asleep to your vids😭

  • @OlexaYT

    @OlexaYT

    2 ай бұрын

    👀 kzread.info/dash/bejne/nWZ2p8aRfse0h6w.html

  • @xaver-player8418
    @xaver-player84182 ай бұрын

    Hey Tyler i love your videos. I also played the game for an hour and found a few useful functions that I will write as a comment below. I hope you honor the effort.

  • @xaver-player8418

    @xaver-player8418

    2 ай бұрын

    def main(): max_tanks = 5000 item_focus = None width = measure_width() height = measure_height() while True: planting = needed(item_focus) for threshold in range(10): for y in range(width): for x in range(height): if can_harvest(): harvest() plant_needed(planting) elif get_entity_type() == None: plant_needed(planting) move(North) check_water(max_tanks) move(East)

  • @xaver-player8418

    @xaver-player8418

    2 ай бұрын

    def move_to_origin(): while get_pos_x() > 0: move(West) while get_pos_x() move(East) while get_pos_y() > 0: move(South) while get_pos_y() move(North)

  • @xaver-player8418

    @xaver-player8418

    2 ай бұрын

    def is_even(n): return n % 2 == 0

  • @xaver-player8418

    @xaver-player8418

    2 ай бұрын

    def needed(item_focus): if item_focus == None: hay_count = num_items(Items.Hay) wood_count = num_items(Items.Wood) carrot_count = num_items(Items.Carrot) pumpkin_count = num_items(Items.Pumpkin) if hay_count

  • @xaver-player8418

    @xaver-player8418

    2 ай бұрын

    def check_water(max_tanks): if num_items(Items.Empty_Tank) + num_items(Items.Water_Tank) 0: for water in range(-(-(0.75 - get_water()) / 0.25)): use_item(Items.Water_Tank)

  • @MindCaged
    @MindCaged2 ай бұрын

    I got this game I think yesterday and I already unlocked most of the tech tree, the cactus are going to be a little tedious to run since I have to sort in two dimensions, I wonder if there's an algorithm optimized for least number of swaps, and while a sorting algorithm isn't particularly hard I don't have much practice with it. Maybe I'm overthinking it, I was scared of the maze part, but managed to get it on my first try with a very simple algorithm. I wonder what the gimmick with the dinosaurs is.

  • @Repsack2
    @Repsack22 ай бұрын

    aaah i like the tree solution. I managed to do something waay more convoluted, but modulo seems so obvious in hindsight! How about only watering where there are trees to be planted anyway? Saves on the buckets and also working time

  • @OlexaYT

    @OlexaYT

    2 ай бұрын

    Yup, new episode does that

  • @RigRacers
    @RigRacersАй бұрын

    I'm having massive trouble with the carrot seeds trade during the function you've created. If I have 200 seeds, and I have it set to trade if less than 200, it trades after each plant to keep it at 200. That's what yours does, and it's so so much slower than if it traded up to 200 all at once, then planted the 200, then traded back up to 200. So essentially, I really want it to wait until it gets to a certain amount, then trade up to 200. But I cannot for the life of me figure out how to get this to happen, and also not put it into a loop stop never ends lol.

  • @Armanoth
    @Armanoth7 күн бұрын

    For the trees ((x%2) + ((y-1)%2)) == 1: instead of the elifs, the repeated condition checks seem to slow stuff down on larger world_sizes

Келесі