Creating a Zelda style game in Python [with some Dark Souls elements]

Поделиться
HTML-код
  • Опубликовано: 21 май 2024
  • A Zelda-style RPG in Python that includes a lot of elements you need for a sophisticated game like graphics and animations, fake depth; upgrade mechanics, a level map and quite a bit more.
    Thanks for AI camp for sponsoring this video. You can find the link to their summer camp here: www.ai-camp.org/
    If you want to support me: / clearcode
    (You also get lots of perks)
    Social stuff:
    Twitter - / clear_coder
    Discord - / discord
    Timestamps:
    0:00:00 - intro
    0:02:30 - Project setup
    0:06:52 - Level setup
    0:28:38 - Creating the player
    0:49:47 - Creating the camera
    1:11:30 - Graphics
    1:56:00 - Player animations
    2:30:26 - Weapons
    3:04:20 - UI
    3:44:03 - Magic setup
    4:00:19 - Enemy creation
    4:57:00 - Player-enemy interaction
    5:32:50 - Particles
    5:56:25 - Spells
    6:26:35 - Upgrade system and menu
    7:24:26 - final fixes & sound
    Related tutorials:
    Introduction to pygame - • The ultimate introduct...
    Using Tiled with pygame - • Creating a Mario style...
    Debugging in pygame - • Debugging in Pygame
    Project files:
    github.com/clear-code-project...
    Pastebin files:
    pastebin.com/u/ClearCode/1/MB...
    Artwork by Pixel-Boy and AAA
    pixel-boy.itch.io/ninja-adven...

Комментарии • 1,4 тыс.

  • @yunghart
    @yunghart 2 года назад +12380

    Just made my first “hello world” in my python class. Guess it’s time to make Zelda now

    • @crops1646
      @crops1646 2 года назад +332

      I think it should be better if you learned the language first. I talk for experience, doing something without understanding/remembering how to do it by yourself is kind of useless and is going to make you lose lots of hours

    • @aperture0
      @aperture0 2 года назад +1040

      @@crops1646 he's being sarcastic bro

    • @crops1646
      @crops1646 2 года назад +592

      @@aperture0 you're probably right but maybe someone else could see this comment and believe it's a great idea

    • @aperture0
      @aperture0 2 года назад +166

      @@crops1646 ah I see your point

    • @seanc.9343
      @seanc.9343 2 года назад +14

      @@crops1646 hey i want to be a programmer what language should i study first?

  • @MegaMandero
    @MegaMandero 2 года назад +3636

    It's honestly mind-boggling that we get this kind of content for free and that well put up together. I can't thank you enough for your work and passion to spread your knowledge! Keep it up, you're great

  • @ai-camp
    @ai-camp 2 года назад +1250

    AI Camp here - we are so proud that we sponsored this great video. Cannot wait for the summer to happen to see what people will create!

    • @unbreakable5510
      @unbreakable5510 2 года назад +5

      Thank you

    • @harmitchhabra989
      @harmitchhabra989 2 года назад +19

      There are 256 subs right now, why must I be the one who has to ruin such a perfect binary number??

    • @filipbumbu851
      @filipbumbu851 2 года назад +1

      @@harmitchhabra989 leo?

    • @WolfsInk
      @WolfsInk Год назад +3

      I'm actually in awe to see such a video so well put together. Thank you for sponsoring this!

    • @ai-camp
      @ai-camp Год назад +2

      @@WolfsInk You are mostly welcome!

  • @K5RTO
    @K5RTO 2 года назад +401

    I can't believe what I am seeing. Just a few weeks ago I nearly gave up in frustration for lack of quality pygame tutorials, specifically for a Zelda style RPG. Then I found your channel and I started on your course at Udemy. I said to myself, I only wish he'd do Zelda. AND OMG here we are. Thank you very much, You have a real knack for knowing your audience... And your devotion to teaching has changed my life.

    • @konstantinrebrov675
      @konstantinrebrov675 Год назад

      It seems like you manifested this lesson.

    • @Drake00000010
      @Drake00000010 Год назад +9

      How did it go? Did you make one

    • @K5RTO
      @K5RTO 9 месяцев назад +3

      @@Drake00000010 A bit of a delay. I had some life stuff happen so I am just now finishing it up. A fantastic tutorial on par with all of his really great content.

    • @IkaroRafaelNunesdoVale
      @IkaroRafaelNunesdoVale 5 месяцев назад +1

      @@K5RTO Which is his course on Udemy that you are referring to? Even practically in the year 2024, after some changes, is it worth it? I'm still new to the area, I have some questions

  • @suomynona4420
    @suomynona4420 7 месяцев назад +3

    Who has the audacity to Dislike videos like these? It's truly insane that you can offer a free informative, educational video and somehow that's a bad thing.

  • @krukdallan1587
    @krukdallan1587 2 года назад +4

    I found your channel by chance with this video and in two days I managed to follow you step by step and actually create the game. You can't even imagine how I happy I am right now!
    Thank you very much man, this project must have been really heavy so really thank you so much for doing it and sharing it here!

  • @reapercreeper6097
    @reapercreeper6097 2 года назад +37

    This channel is actually underrated, he is also the one who made tutorial to make minecraft in Python.
    Great tutorials, keep it up

  • @speedio42
    @speedio42 2 года назад +353

    I thought this was a 7 min video at first :D I was not expecting a programming video when I clicked it, but thank you very much for creating this. It must have taken a lot of work and I appreciate it very much.

    • @The_True_Mx_Pink
      @The_True_Mx_Pink 2 года назад +11

      I didn't even look at the time, I didn't even see it's 7 fucking hours long.

    • @MaxwellJWhite
      @MaxwellJWhite 2 года назад +6

      @@The_True_Mx_Pink im assuming you arent a programmer lol thats pretty normal for a tutorial

    • @The_True_Mx_Pink
      @The_True_Mx_Pink 2 года назад +3

      @@MaxwellJWhite You are correct

    • @chady51
      @chady51 2 года назад +1

      Same I thought it's just vidoe of somone making pygame zelda than a entire tutorial

    • @loganwow
      @loganwow Год назад

      What version of python is this

  • @JosephLatina
    @JosephLatina Год назад +87

    This was a terrific introduction to pygame, the only thing that we forgot to add was a player death mechanic but I'm taking on the challenge on my own and feel well prepared to do so. Thank you so much!

    • @EvenTheDogAgrees
      @EvenTheDogAgrees 11 месяцев назад +12

      Well, to be fair, he did point it out. Reason he didn't implement it is because it's easier to test your game mechanics if you don't also have to worry about not dying.

    • @minhquan5603
      @minhquan5603 5 месяцев назад

      can you ask with, passwork of file

    • @Corn0nTheCobb
      @Corn0nTheCobb 5 месяцев назад

      I can ask with, passwork of file if I really wanted to. But, can YOU? That's the real question.

  • @erikfredericks
    @erikfredericks 2 года назад +24

    This looks incredible, can't wait to dig into it. Agree with the other comments I'm seeing, this is the *exact* tutorial for PyGame that I've been desiring for a few years now.

  • @TamakoYT
    @TamakoYT 2 года назад +130

    This channel is by far the greatest coding channel judging by the deliverance of information, keep up the good stuff!
    Looking forward for more of your great pygame tutorials!

    • @loganwow
      @loganwow Год назад

      What version of python is this

  • @_dotZero_
    @_dotZero_ 2 года назад +1

    Thank you so much for the pygame walkthrough! I blew people away in my intro to python class and I only turned in milestone 1 for my project. Which was having collisions working without any of the camera. I am so grateful for your explanations. Keep it up!!

  • @selo2410
    @selo2410 2 года назад +4

    Oh Wow, the amount of work you put into your videos is overwhelming. Your channel is extremely underrated. Keep it going!

  • @danielwestlund9208
    @danielwestlund9208 2 года назад +11

    I am going through the side scrolling videos now, and I can’t wait to get to this one. Looks amazing!!!

  • @vegaswould
    @vegaswould 8 месяцев назад +6

    i had alot of "importing" errors until i realized i need to (ctrl+s) save each of the modules before running the main module for the updated code to work. great video. i learned quite a bit about pygame. thank you :)

  • @Daco812
    @Daco812 2 года назад +19

    As a python enthusiast and huge fan of LoZ/DS games, I'm greatly looking forward to watching this. My first major project a few years ago was creating an old-school text adventure that runs in the CLI, and I created a simple animated dungeon map that can be called from within (using pygame). I've been planning to whip up some sort of 2d adventure game like this next - can't wait to dig in.

  • @8BitDifferent
    @8BitDifferent Год назад +44

    After a couple weeks, I FINALLY finished this tutorial. I had gone through a pygame textbook that was pretty outdated and this introduced me to so many concepts that the book didn't have. Thanks so much for this amazing tutorial!

  • @rogeredrogered
    @rogeredrogered 2 года назад +8

    This is insanity, i've never seen a tutorial like this.... incredibly impressive. I wish I had this a few years ago, it's not so helpful to me now (especially at this length) but if anyone is a beginner this is great!

  • @jvsvogler
    @jvsvogler Год назад +1

    When I started learning Python on my own, I knew the basics but had no idea how to apply what I learned. This project is helping me because many abstract concepts are now solidifying inside my mind. Thank you so, so much for the great content you put out and for your patience, you are an EXCELLENT teacher, really! The effort you put into being thorough in your explanations is greatly appreciated!

  • @juliolopeztorres3117
    @juliolopeztorres3117 2 года назад +1

    Hey there! Just finished this tutorial among other you have uploaded. Just off to say you make really good resources for people to learn new things. Keep it up and THANK YOU.

  • @tonyburn
    @tonyburn 2 года назад +9

    Wow! This is fantastic! This channel and the Coding with Russ channel are right up there with this type of content and tutorials. Thank you so much for this, it is very much appreciated. The time and effort you have put into this, its astounding! :)

  • @Ozown
    @Ozown 2 года назад +6

    These are the best tutorials one can find, thanks for the great content!

  • @shannon5231
    @shannon5231 2 года назад +1

    I've been watching this a little bit every day and I finally reached the end of the video. This was really cool, and I loved the end result!

  • @photodoor913
    @photodoor913 2 года назад +2

    This is absolutely amazing. Instantly subscribed. I’ve always wanted to create a game like this style using Python, this is great! Thanks for posting, awesome job

  • @toblobs
    @toblobs Год назад +8

    This is amazing, and I can't believe I haven't subbed yet. I'm going to be modifying this code for an online-rpg style project I'm working on. Thanks so much for the great tutorial!

  • @idophysics0113
    @idophysics0113 2 года назад +4

    I saw you mentioned making this video a while back, I didn't think it would be like this! You've really outdone yourself!

  • @uniroo8795
    @uniroo8795 4 месяца назад

    This was such an amazing project! I really wanted to start making adventurous games such as Pokémon and I have to say this tutorial covers already so much amazing what you did! You are amazing!

  • @Chazara2point0
    @Chazara2point0 2 года назад +1

    Really impressive training session!! Great work, my friend!

  • @valis007
    @valis007 2 года назад +3

    Genius and philanthropist, you just make my day and the world better, congrats and cheers from France

  • @Gamer-py4mq
    @Gamer-py4mq 2 года назад +5

    More projects like these will be amazing!

  • @HarrisonAtherton
    @HarrisonAtherton Год назад +1

    Fantastic work. Very appreciative of this free content that you provide, and it's done so professionally. Thank you!

  • @cristinaswenson3664
    @cristinaswenson3664 2 года назад

    Just came out of a Uni CS class where our final project used PYGAME. I can actually understand a lot of what you're doing and it's impeccable. Absolutely love this! Warms my LOZ nerd heart!!

  • @MasterAarott
    @MasterAarott Год назад +8

    I really appreciate you leaving your mistakes in. It makes a beginner coder like me feel better about myself when I make errors.

  • @GasimovTV
    @GasimovTV 2 года назад +7

    Thank you for the amazing pygame tutorials, you are really underrated.

  • @jmgalaxytab2325
    @jmgalaxytab2325 3 месяца назад

    Incredible the quality of your work and sharing this with the whole world for free!!! We can't thank you enough!

  • @spaidory874
    @spaidory874 2 года назад +7

    You are on of the most underrated RUclipsrs on the platform. Thank you for your content.

  • @natyacodes
    @natyacodes 2 года назад +124

    For a moment i thought this is just a project made by a team of professionals, the second moment i realized this is a WHOLE tutorial
    Holy crap this is next level dude!! Keep up the good work!!

    • @foxtro484
      @foxtro484 2 года назад +1

      @Florian D. True, python and pygame are great to make games as a side project, but professionaly i would never use pygame. Don't get me wrong I love pygame.

    • @purpleplantain374
      @purpleplantain374 2 года назад +1

      @@foxtro484 what would you recommend then? particularly for C++

    • @chady51
      @chady51 2 года назад +2

      @@purpleplantain374 yeah java or c++ is mostly used for making games

    • @loganwow
      @loganwow Год назад +1

      What version of python is this

    • @chady51
      @chady51 Год назад

      @@loganwow Maybe It Python 3 python 2 is abit too old

  • @pranavxd4606
    @pranavxd4606 2 года назад +7

    You are so my favourite coder on RUclips. I cant believe that this is so much better and CHEAPER (free) compared to school coding classes.
    Keep up the good work!!
    Suggestion: pls do another tutorial is python ursina??

  • @Kanjas19
    @Kanjas19 Год назад +1

    Omg this was some next level effort. Dont know if I'll ever come to get to this tutorial, but thanks for doing it!

  • @terrycody8743
    @terrycody8743 2 года назад +1

    I am glad to see there are always talents people like you who willing to produce such quality and FREE courses for all, this is meaningful, splendid, and much appreciated! Please produce more quality courses, for the whole industry and humanity.

  • @codingcrashkurse6429
    @codingcrashkurse6429 2 года назад +16

    Dude, you are just awesome! Very impressive what you build here. Isn´t it awesome that programmers are able to make the inner child live forever this way? :-)

  • @loganwow
    @loganwow Год назад +79

    I think new coders would also benefit from seeing how you divided each pack into your local files because your file locations are integral to your code, but we download them differently from PixelBoy. So as we code, we sort through a lot of things that you have preorganized. Seeing how you have them organized in each file would be helpful in the setup intro part of your vid.

    • @isaacclark5784
      @isaacclark5784 Год назад

      I am a new coder and sorted through those exact problems

    • @switch_axe
      @switch_axe Год назад

      I experienced this as well! I love the tutorial,

    • @WhatsNextFam
      @WhatsNextFam 8 месяцев назад +2

      yeah im stuck i cant even find the rock.png in the pixel boys file

    • @WhatsNextFam
      @WhatsNextFam 7 месяцев назад +1

      Trust me guys with just a little messing around their is no problem in coding you guys can’t figure out!! I’ve followed so many tutorials since then made 20+ games and became a pygame master and the main thing I’ve taken away from all this was how to problem solve!! You guys got this!!

    • @jasg223
      @jasg223 6 месяцев назад

      @@WhatsNextFamso how’d you get your own tile for the rock.png

  • @realworldcodingapplications
    @realworldcodingapplications Год назад

    I’ve enjoyed your tutorials the most , been learning a lot and made 2 games so far, thanks a lot !!!!!!

  • @jesseandrews3248
    @jesseandrews3248 2 года назад +1

    Finally, I've made the first production with python thanks to you Clear Code! It took me like a month to finish this and I kinda understood how to make a game with python. It helped me a lot to improve for myself. Thank you Again!!

  • @Specter_Tech
    @Specter_Tech 2 года назад +20

    Sir, I just wanna tell you that you. have changed my life with software, and I admire your teaching style more that anyone's. Thank you for putting out amazing content and never failing to help us.

  • @fierce1340
    @fierce1340 2 года назад +6

    Just finished the entire tutorial! Wonderful! Thank you so much for putting this together and teaching pygame.

    • @dankeroner
      @dankeroner Год назад

      I’m almost done, I’m thinking of adding new levels. Hell, I might post them on my GitHub

  • @ShaynFreeborn
    @ShaynFreeborn 2 года назад +1

    Another amazing tutorial, thank you so much for all the work you put out here!

  • @dommika833
    @dommika833 Год назад +1

    This is so great! I can't wait until I can get on this level of programming and can follow along with this and genuinely understand it!

  • @monstereat90
    @monstereat90 2 года назад +12

    what a legend, creating zelda in python. can't even imagine doing that with or without motivation

  • @danflurry
    @danflurry 2 года назад +109

    I’m an hour in and I can say this: yes, a lot of this is going over my head right now because I don’t have a good enough grasp of Python classes, but WOW. Your presentation is impeccable… perfect pace, great examples, and the logical flow is really helpful. Incredible resource.

    • @loganwow
      @loganwow Год назад

      What version of python is this

    • @sm_stormzy1075
      @sm_stormzy1075 Год назад

      @@loganwow Python 3, I would assume 3.9+

    • @sophomore3752
      @sophomore3752 Год назад +4

      To anyone feeling the same struggle: try watching his other videos in conjunction with this one. Such as the Super Mario video from a year ago and "Creating a platformer in Pygame". If your problem isn't simply understanding Pygame, but programming in general, I suggest practicing with simpler concepts first such as importing libraries, making functions and executables or even simple lists.

  • @HarbingerSh
    @HarbingerSh 2 года назад +2

    I´ve already watched that on Patreon it was amazing!

  • @teprox7690
    @teprox7690 Год назад

    Very cool project. It was very interesting to see your working-process!

  • @bxstiii
    @bxstiii 2 года назад +4

    I love the game and the art!

  • @goodmanwiseman303
    @goodmanwiseman303 2 года назад +3

    I made it through the whole thing. Thanks a million!

  • @akramelomrani8728
    @akramelomrani8728 2 года назад

    I'll be honest many times I skipped the announce for the sponsor but I video at this quality can't be rewarded enough, and it's free ! massive thanks to you I've been here for a long time and I am always amazed by the games and logic that you come up with.

  • @MrAlmolo
    @MrAlmolo 2 месяца назад

    Took quite a bit longer than 7.5 hours but successfully completed over a weekend. Thank you so much for this! Looking forward to following along with your other guides

  • @aycoded7840
    @aycoded7840 2 года назад +5

    I was wondering how it was possible for such quality content to only have 500 views, but then I realised that I had caught this video just shortly after it had released.

  • @radiofreeacab8159
    @radiofreeacab8159 2 года назад +12

    The value of what you're giving the world simply can't be overstated, sir. You're an example of the kind of person that spends their time uplifting others and it's a pleasure to learn from you

  • @epicicevoid
    @epicicevoid Год назад

    Thank you so much for your kindness ! Sharing this tutorial made me love this ! I hope you publish as time goes on... Tysm!

  • @jamestaylor7969
    @jamestaylor7969 2 года назад +2

    What you do is incredible!

  • @jawadpatwari
    @jawadpatwari 2 года назад +20

    Excellent tutorial! Would you be interested in making up a tiny follow-up video to show how to code:
    1) a game over "state" upon player death
    2) a level "reset/retry" option after the player dies
    3) how to load a new level upon clearing an "objective"

    • @mattowen1812
      @mattowen1812 2 года назад +2

      Integrate his overworld code from the mario platformer tutorial. Beware though, it resets the exp and menu settings every level... not been able to get the ui and upgrades into the game class yet so they stay with the player each level...

    • @thatguy-cf5gs
      @thatguy-cf5gs Год назад

      @@mattowen1812 i know I’m late to the party here, but i may have figured out a solution to this. Let me know if you’re still stuck

    • @mattowen1812
      @mattowen1812 Год назад

      @@thatguy-cf5gs Hi. What was your solution eventually? I think I put all player variables I want to persist in a dictionary in the settings file.
      Alternatively, a method that passes current_exp to a new_exp variable then create level function with the new_exp passed in.
      I did this with my metroidvania here with the weapons the player has when swapping levels (or rooms in this case) m.ruclips.net/video/KhVwVFdolJs/видео.html

  • @EpicGamerX
    @EpicGamerX 2 года назад +4

    Here at the second it came and already know its gonna be awesome

  • @nikolastamenkovic7069
    @nikolastamenkovic7069 Год назад +1

    Really appreciate this tutorial! Even though it is pygame related, it contains such great insights into how a project should be structured with as little hardcoding as possible.
    This one should be watched, no matter if you are into creating games or not.

  • @lirageneve
    @lirageneve 5 месяцев назад

    What a great tutorial. I have never programmed in python and this most likely will be my first one because it’s awesome! This was also my first SuperThanks$ here on RUclips. I’ve never seen such amazing work being freely presented. 👏🏻

  • @ch0piiiprogrammieren677
    @ch0piiiprogrammieren677 2 года назад +3

    this tutorial is fantastic!

  • @ThePersonWhoKnocks
    @ThePersonWhoKnocks Год назад +4

    As a fan of both Zelda and Dark Souls, I was ecstatic to find this tutorial. Clear Code, your ability to teach complex concepts in an easy-to-understand manner is truly impressive. Your dedication to providing high-quality, free educational content for aspiring developers is greatly appreciated. I can't wait to start working on my own Python-based RPG using the skills I've learned from your tutorial. Thank you for your hard work and for sharing your knowledge with the world!

  • @nw3052
    @nw3052 Год назад

    An absolutely amazing tutorial. It's very thought provoking in a sense. Kudos to everyone who made it to the end :)

  • @lgbonfim
    @lgbonfim 2 года назад

    Thank you so much for your generosity in sharing this with us!

  • @shwm19
    @shwm19 2 года назад +4

    Can't wait to give this a shot and learn. I've been interested in a Zelda clone but Most are super old /outdated.

  • @cricketdhamal5402
    @cricketdhamal5402 2 года назад +3

    You deserve much more subs 😃😃

  • @yourmomma01
    @yourmomma01 Год назад +1

    This is a really cool video, thank you very much for making it! It helped me very much understanding pygame, so a big thank you!

  • @kartavianmacrath7219
    @kartavianmacrath7219 2 года назад

    Finished your tutorial, thank you so much for the detail, I know this had to take forever to make, but it was worth it, IMO

  • @gofry3023
    @gofry3023 2 года назад +3

    It's Awesome

  • @Orionalpha48
    @Orionalpha48 Год назад +17

    Just as a heads up to help those of you starting, theres way more than 7.5 hours of tutorial here. With bug fixing, exercises and working on theory discussed its probably closer to 18. To help you time box, you should double the minutes in each section to estimate how long each section will take.

  • @jonaswerner3292
    @jonaswerner3292 2 года назад

    Awesome content and well explained. Perfection!

  • @danielaramos8779
    @danielaramos8779 Год назад

    this is amazing! thanks for helping me learn to code, I love your content!

  • @rdm_jv4499
    @rdm_jv4499 Год назад +4

    I'm at 2:56:43 right now, so I don't know if it'll be fixed later in the video, but because of the Y-sorting draw of the sprites, the weapon is overlaping the underneath sprite while the player is overlaped by the sprite, I think that to fix this, we should create another group of visible sprites, that will be drawn above all

  • @ClearCode
    @ClearCode  Год назад +28

    If you enjoy this tutorial check out my pygame course: www.udemy.com/course/learn-python-by-making-games/?referralCode=A80FECE8C76096E01111

  • @SpyderGamer
    @SpyderGamer 2 года назад +1

    I have finally reached the end! Thank you very much for all of that hard work :)

  • @hamzamuhammadkhan
    @hamzamuhammadkhan 2 года назад

    Mind boggling man i hope this stays for ever ❤️❤️

  • @Teacher_inf
    @Teacher_inf 2 года назад +11

    Это очень крутая работа!!!! Спасибо тебе большое за проделанную сложную работу. Уже потерял надежду и думал, что это невозможно на Python.

    • @executed_code
      @executed_code 2 года назад

      Согласен. Многие почему-то думают, что Python годится только для каких-нибудь простеньких приложений.

    • @shadowu745
      @shadowu745 2 года назад

      yes i love python so much

  • @antoinethery60
    @antoinethery60 2 года назад +23

    Hey !
    So im a mac user and i got stuck during the graphic part of the video (around 1:50:00), the probleme was that i was getting the worng sprites for the objects (getting statues instead of trees, etc.).
    After a bit of testing i undestood that the Mac os walk function doesnt "walk" throught the directory in the correct order so the list we're creating(image_surf) is unsorted.
    If u're struggling with the same issue, define a new list to get every images from the walk function, then sort it and iterate angain throught the sorted list.
    def import_folder(path):
    surface_list = []
    sorted_list = []
    for _, __, img_files in walk(path):
    for image in img_files:
    sorted_list.append(image)
    sorted_list.sort()
    for img in sorted_list:
    full_path = path + "/" + img
    image_surf = pygame.image.load(full_path).convert_alpha()
    surface_list.append(image_surf)
    It works now, i can keep enjoying your tutorial :)

    • @user-qk5mn8ew3l
      @user-qk5mn8ew3l Год назад

      Hey, I run into the same problem as you did, but I wouldn't ever solve it on my own. Thanks a lot for your help!

    • @jianghanchang7654
      @jianghanchang7654 Год назад +1

      Thank you so much! I was stuck on this too on Mac

    • @genexperimen3163
      @genexperimen3163 Год назад

      why can't i run?
      "pygame.error: Unsupported image format"

    • @briangardner2001
      @briangardner2001 Год назад +2

      OMG thank you! I was trying to figure this out by looking at the object csv files and seeing why they didn't match the ones in the video. I have to imagine it would've taken me a long time to consider that the walk() function was a possible culprit.
      I think there's a shorter way to solve the issue. Just add the line img_files.sort() inside the first for loop, like so:
      for _, __, img_files in walk(path):
      img_files.sort()
      for image in img_files:

    • @toutenunmot
      @toutenunmot Год назад

      I had the same issue, also on mac. The basic sort() was not sufficient for me as I standardized the naming of the files to be n instead of 0n. 0.png, 1.png, 2.png instead of 0.png, 01.png, 02.png etc. I did this because if you had hundreds of files you would have odd names such as 001.png, 002.png and even worse if you were to have thousands or more files.
      Any how I put this in a try, except block:
      files = sorted(files, key=lambda file_name: int(file_name.split('.')[0]))

  • @Katzenha
    @Katzenha Год назад

    Absolutly awesome! Thanks for sharing!

  • @MrYoungblood
    @MrYoungblood 2 года назад

    This is the coolest project I have seen!!!

  • @cosmicbrambleclawv2
    @cosmicbrambleclawv2 4 месяца назад +6

    Its funny to me, as a child it was always magical and beyond my scope
    As a adult in college, it was still magical and beyond my scope
    Now, nearly 28, it's STILL magical and out of my scope 😂 but there's a lot of cool resources like this video to teach me it's not /as/ crazy as I always believed ❤

  • @jimmyslaughter6262
    @jimmyslaughter6262 2 года назад +3

    This is such an amazing tutorial! Will you be able to do a dialog box and npc interaction video?

  • @qaz56q
    @qaz56q 2 года назад

    Amazing, 7 hours of footage! Thanks a lot!

  • @derlolcloner
    @derlolcloner Год назад

    Much love 2 you. I spent an entire day going through everything and trying to understand it.

  • @aboodispam
    @aboodispam 2 года назад +14

    How is this free?
    Please keep up this amazing work

  • @zottel393
    @zottel393 2 года назад +5

    Thanks man, what a great tutorial! I had one big issue at the beginning: I got some error messages after setting the sprites in the row and col index and it took me some time to find out that, In my case, the graphic import at 16:31 did not work at all. I had to move the grapics folder to the code folder and get rid of the "../" part in path in both, tile.py and player.py.

    • @erikstrawn3885
      @erikstrawn3885 2 года назад

      I did the same thing, and it took me a little bit to figure it out. The "../" drops back one directory before going to the graphics directory. If you put your code in its own "code" folder instead of in the main folder, it loads the graphics files just fine. Next you need to sort out this error:
      File "../Zelda Tutorial/code/main.py", line 23, in run
      self.screen.fill('black')
      TypeError: invalid color argument
      I put standardized color tuples into settings.py and tossed in a line importing those settings into debug.py.

    • @randomblaster2887
      @randomblaster2887 2 года назад

      or u can just remove one of the dots

    • @seresmora
      @seresmora 2 года назад

      i solved it by adding another "/.." to the path
      Because the reference folder is one level deeper, so it looks like this
      "../../graphics/test/rock.png",
      Im returning two folders instead of one

  • @Jrj4250
    @Jrj4250 Год назад +2

    Been watching this video for weeks (I am taking my sweet time) and will be watching it for longer, and I have to say I have never been more excited for a coding tutorial

  • @dionysisnikolopoulos7989
    @dionysisnikolopoulos7989 Год назад

    Amazing content, and very clear presentation.

  • @whatsaname3937
    @whatsaname3937 2 года назад +7

    For the player animations this line of code "self.image = animation[int(self.frame_index)]" always causes an error called "IndexError: list index out of range". Does anyone know a reason or a mistake I might have made?
    Edit: I have now fixed it, it was cause when i was giving a file path for the animations I didn't put a slash at the end

    • @StefanoCherchi
      @StefanoCherchi 2 года назад +2

      Thank you so much, I had the exact same issue

    • @alonsogonzalez1279
      @alonsogonzalez1279 4 месяца назад

      I have this specific mistake too; what file path for the animations are you referring to? the player’s?

  • @user-ej3ij1eh3l
    @user-ej3ij1eh3l 2 года назад +7

    First of all, thank you for your tutorial! You have done a great deal of work:)
    But when I see some of the decisions you made, my eye twitching a little...
    The game is absolutely unscalable (may be you will rewrite it later in the video I have seen only an hour of your tutorial yet) . You call update method for all visible objects when in fact only player has update method. You check collisions with all obstacles when you can check only with objects in small area around player. And it absolutely blew my mind when you decided to sort all objects before drawing at each frame!!! When the only thing which changes the relative position is player!
    I think that you at least have to tell people that there is a better way to write your code:)
    To be more constructive. The usual way to deal with collisions is geohash. You have to store your collidable objects in a hashmap with rounded coordinates as keys. Then you have constant complexity of computing collisions.
    And you can store static objects in sorted group apart from dynamic then at each step you will have to sort only dynamic object which are present on the screen. Keeping in mind that you usually have way more static objects than dynamic, it will be a significant reduce in computational complexity.

    • @jasonsworld333
      @jasonsworld333 2 года назад

      This concerns me as Im following this for a project due Tuesday, hoping to pick up bits to add to my game, but Im not sure it will be worth it for scalability issues. I've noticed a problem with a lot of things in Pygame tutorials being limited to just what they are doing with not much explanation on the ability for scalability. If you know of anything please let me know

  • @cyb3rrazorcut
    @cyb3rrazorcut 2 года назад +2

    What a great tutorial, thank you so much for putting this together and offering it for free. A real gift to coders getting started with python game creation.

  •  2 года назад

    You are blowing my mind for a completely guide. Thanks very much for your sharing knowledge

  • @gtPacheko
    @gtPacheko 2 года назад +4

    Screw it, I'm learning Python.

  • @subarunatsuki1902
    @subarunatsuki1902 2 года назад +3

    Does someone know how Clear Code gets these perfect sized graphics? I can only get those small ones that looks awful when I maximize the width and height.

    • @ClearCode
      @ClearCode  2 года назад +4

      1. Make sure you find good looking assets. Opengamearts and itch.io both have some really good (and free ones) but you do need to look for a bit
      2. You can use a pixel scaler (lospec.com/pixel-art-scaler/) that can increase the size of an art asset without losing quality (for pixel art).
      3. What also helped is that I set my screen scaling to 250% so that my 4K screen works more like 720p screen, which does make things look better. Obviously that doesn't work for actual games so make sure to focus on step 1 and 2
      Hope that helps :)

    • @subarunatsuki1902
      @subarunatsuki1902 2 года назад

      @@ClearCode Yes it does, thanks! :D

  • @calvinchong5179
    @calvinchong5179 2 года назад +1

    omg, here are some really nice content! thanks for the nice video!!

  • @EvenTheDogAgrees
    @EvenTheDogAgrees 11 месяцев назад

    Wow, this is next level! There are some points where I'd solve things differently. E.g. the repetitive if statements in order to assign a value to a variable could've been solved more elegantly using dictionary indexing. And adherence to PEP-8. Small stuff like that. But the presentation is on a level worthy of admiration. The way you explain everything as you go, providing sufficient context or explanation so the audience knows at every moment what you're doing and why. How you break the project into pieces and how you tackle them in succession without losing track of the goal. It's obvious a ton of preparation went into this, way in excess of the almost 8 hours of resulting video. And this is just one of many such videos you've put out so far. Thanks for such great tutorials!

    • @ellagro5000
      @ellagro5000 8 месяцев назад

      What kind of software/IDE did you use?