Creating an amazing 2D platformer in Python [ SNES inspired ]

Поделиться
HTML-код
  • Опубликовано: 28 янв 2025

Комментарии • 341

  • @ClearCode
    @ClearCode  11 месяцев назад +48

    At the end of the level graphics around 20 minutes got accidentally cut off (just before 03:09:47 ), you can find that part here: ruclips.net/video/dh3f70t_1Lo/видео.html
    Sorry for the inconvenience :(

    • @berento
      @berento 11 месяцев назад +1

      I have no idea about python ..... will it be ok for me to follow this tutorial ? or should i learn python first ?

    • @CodeAikawa
      @CodeAikawa 11 месяцев назад +4

      ​​@@berentoi've been following the tutorial while using Unity and C# instead . I'm trying to recreate the logic and it's a good challenge.

    • @berento
      @berento 11 месяцев назад +1

      @@CodeAikawa will it be possible to learn python and this tutorial side by side ?

    • @CodeAikawa
      @CodeAikawa 11 месяцев назад +1

      @@berento I am certainly sure that only a part of it. I'm a python programmer, I made several telegram bots with it but they don't use the same syntax even if they're the same programming language. So, you'll only learn part of python programming from this tutorial.

    • @triggeredman1222
      @triggeredman1222 11 месяцев назад +1

      @@berento No!! to follow up the above tutorial , you must have a good understanding of python list, dictionaries , tuples etc , also function definition and declaration, classes and objects , inheritance etc are must prerequisite.

  • @johnb6714
    @johnb6714 11 месяцев назад +72

    I'm glad you are back! Definitely appreciation your work! Very high quality

    • @ClearCode
      @ClearCode  11 месяцев назад +8

      thank you so much! :)

  • @novialriptide
    @novialriptide 11 месяцев назад +18

    I appreciate the tutorial using pygame-ce :)

  • @utubesubscriber1100
    @utubesubscriber1100 11 месяцев назад +5

    I’m not sure why this video isn’t doing as well as the rest but just thought I’d show my support. You taught me a lot and I hope you continue to make videos. Would love to see how you make Pokémon in pygames!

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

      Now that I look closely it is probably that the thumbnail is too similar to your previous video!

  • @lin.hikiro
    @lin.hikiro 11 месяцев назад +64

    we've waited for over a half a year for this, glad you're back

  • @suhasjaladi5098
    @suhasjaladi5098 11 месяцев назад +24

    Love your content... Good to see you back

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

    This is just amazing quality. Thank you so much!

  • @jvsonyt
    @jvsonyt 11 месяцев назад +9

    I JUST finished space invader's one yesterday. I'm so pumped to wake up today and see what I get to learn next!

  • @beemarron3642
    @beemarron3642 11 месяцев назад +7

    So glad you're back! This looks brilliant!

  • @NoelTugy
    @NoelTugy 11 месяцев назад +1

    I can't believe you make this great and educational content for free

  • @AGI-MachineLearning
    @AGI-MachineLearning 11 месяцев назад +2

    Thank you so much for creating this comprehensive pygame Python tutorial. I haven’t gone through it all yet but I think it’s the most detailed pygame tutorial I have seen.

  • @olden4954
    @olden4954 11 месяцев назад +3

    Thank you!

    • @Caveman835
      @Caveman835 10 месяцев назад

      I like how Clear Code didn't notice this.

  • @gibran800
    @gibran800 11 месяцев назад +6

    You're amazing! Appreciate all the effort you put in your content

  • @grindlord064
    @grindlord064 11 месяцев назад +10

    The lord has returned with another banger!

  • @raoul2683
    @raoul2683 11 месяцев назад +2

    This is amazing man. Thank you for putting out quality like this, the premise of the game is exactly what I was looking for

  • @np8038
    @np8038 11 месяцев назад +3

    Very happy that you continue to make content for Pygame!

  • @ThắngPhu-z1t
    @ThắngPhu-z1t 11 месяцев назад +4

    So glad you're back! I love all your inspirative contents :3

  • @MrMorgan2008
    @MrMorgan2008 11 месяцев назад +3

    Thank you for the course!!
    Appreciate people like you giving out such good quality courses for free
    God bless you

  • @soupnoodles
    @soupnoodles 11 месяцев назад +4

    Genuinely good content, keep it up!

  • @Jhonatha.S
    @Jhonatha.S 11 месяцев назад +2

    please continue with the videos, they are incredible, I'm from Brazil and I study through your channel

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

      Mas como entende???

    • @Jhonatha.S
      @Jhonatha.S 5 месяцев назад

      @@cleidecampiolrezende4503 usa a legenda mana e procura uma introdução boa ao pygame e ao dev de games, depois de um tempo vc consegue acompanhar as instruções dele e compreende mais facilmente cada etapa

  • @saisavit2926
    @saisavit2926 11 месяцев назад +3

    More than glad you're back

  • @alisher.m
    @alisher.m 11 месяцев назад +2

    Your content is top notch, please release more material!

  • @shahzaibhassan2777
    @shahzaibhassan2777 11 месяцев назад +3

    Here since you had like 4k subs man, Keep up the work. Thank god i learnt godot before the unity disaster.

  • @Tstar-vf5tc
    @Tstar-vf5tc 11 месяцев назад +3

    I've been following along with your Zelda pygame tutorial for inspiration with a game I'm making. I love your videos, they're easy to follow and extremely helpful. I'd love to see you make a turn based RPG in pygame, where you traverse the map just like in your Zelda video, but upon making contact with the enemy, instead if taking damage, it starts a turn based battle. Anyway, keep up the good work, you're the best.👍

    • @ClearCode
      @ClearCode  11 месяцев назад +5

      Working on that, will be out in early March!

    • @Tstar-vf5tc
      @Tstar-vf5tc 11 месяцев назад +1

      @@ClearCode sounds great😁 can't wait

  • @anomalouschaz
    @anomalouschaz 11 месяцев назад +2

    thank you so much for the high quality content! I have learned so much thanks to you! I really can't wait to make me some time to go over through this :D I love your work!

  • @Its_Blaze_MC
    @Its_Blaze_MC 11 месяцев назад +5

    LET'S GOOOOOOO! THE MASTER RETURNED!! WE'VE ALL BEEN WAITING FOR YOU MASTER FOR OVER HALF AN YEAR!! THIS IS CELEBRATE WORTHY! 🥳🎉

  • @mohammadmotaz6419
    @mohammadmotaz6419 11 месяцев назад +3

    استمر في الابداع انت شخص جيد
    Keep creating, you are a good person

  • @RossiGiova
    @RossiGiova 11 месяцев назад +2

    Thanks to you I learned to develop video games in pygame, you are very good as a teacher. maybe one day I will publish some tutorials on pygame in Italian the way you do it

  • @dash2154
    @dash2154 11 месяцев назад +3

    I have been anxiously waiting for what felt like forever. Thank you sir for your hard work.
    Just a suggestion; if you get the chance, please make something about web-dev with python

  • @TasteDaRDX
    @TasteDaRDX 11 месяцев назад +1

    Hello Chris, thanks for sharing such a great tutorial. I have learned a lot of great techniques, and the material continues to improve. I have watched your videos from the first one. Also your teaching style is excellent and it does make a big difference.
    While I was following the tutorial, I tried two different techniques and they worked very well with no game impact, just perhaps a simpler approach with less code, so I would like to share with you and everyone here:
    1. When working on the collision detection of the Shell with the player, I used the same rectangle idea from Tooth, like this:
    def state_management(self):
    # player_pos, shell_pos = vector(self.player.hitbox_rect.center), vector(self.rect.center)
    # player_near = shell_pos.distance_to(player_pos) < 500
    # player_front = shell_pos.x < player_pos.x if self.bullet_direction > 0 else shell_pos.x > player_pos.x
    # player_level = abs(shell_pos.y - player_pos.y) < 30
    front_rect = pygame.FRect(self.rect.center, (500*self.bullet_direction, 2))
    if front_rect.colliderect(self.player.rect) and not self.shoot_timer.active:
    # if player_near and player_front and player_level and not self.shoot_timer.active:
    self.state = 'fire'
    self.frame_index = 0
    self.shoot_timer.activate()
    2. For the Spike rotation I used a vector2 instead of trigonometry.
    In the __init__ here is the change:
    # rotation using a vector
    self.loc = vector(0, 0)
    super().__init__((self.loc), surf, groups, z)
    # trigonometry
    # y = self.center[1] + sin(radians(self.angle)) * self.radius
    # x = self.center[0] + cos(radians(self.angle)) * self.radius
    # super().__init__((x,y), surf, groups, z)
    In the update, here is the change:
    # y = self.center[1] + sin(radians(self.angle)) * self.radius
    # x = self.center[0] + cos(radians(self.angle)) * self.radius
    # self.rect.center = (x,y)
    # rotation using a vector
    self.loc = self.center + vector(self.radius, 0).rotate(self.angle)
    self.rect.center = (self.loc)

  • @ThắngPhu-z1t
    @ThắngPhu-z1t 11 месяцев назад +1

    Finally! I've done. Thank you very much , I hope that you'll success on your own ♥

  • @daineminton9687
    @daineminton9687 11 месяцев назад +2

    fantastic!! thank you for all the hard work

  • @surajmandal_567
    @surajmandal_567 Месяц назад

    I am going to start learning from this awesome resource. Thanks buddy ❤

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

    I love the art style! Pirates are awesome!

  • @subarunatsuki1902
    @subarunatsuki1902 11 месяцев назад +3

    You are a inspiration to all of us ❤

  • @DylanTheSpud
    @DylanTheSpud 11 месяцев назад +2

    Return of the KING!!!

  • @heatrider
    @heatrider 11 месяцев назад +4

    Thank you for this.

  • @bepositive271
    @bepositive271 11 месяцев назад +2

    Finallt you uploaded!!

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

    Finally finished the whole tutorial!

  • @ali-r8263
    @ali-r8263 9 месяцев назад

    Appreciate your tutorials!

  • @ronaldocouves988
    @ronaldocouves988 11 месяцев назад +2

    Leaving a like and commenting so the algorithm can boost up the video ❤

  • @tako_val
    @tako_val 7 месяцев назад

    Dude i swear i want to learn game dev using C++ since i just think its cool to learn C++ xD but everytime i see one of your videos man, you make me want to switch to pygame, you are the bane of my existance

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

    even though his videos are mainly in python (and now gdscript as well), his videos never fail to help me in my sfml journey really appreciate it :)

  • @muhammadmz8791
    @muhammadmz8791 10 месяцев назад

    Thank you.
    You had a course about sprite classes in your channel, I couldn't find that

  • @grayliar147
    @grayliar147 11 месяцев назад +4

    Thank you for this lecture

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

    Hello! Thank you for this tutorial!
    I hope some day in the near future you consider making a roguelike. It would be awesome to watch and code along.

    • @ClearCode
      @ClearCode  10 месяцев назад

      maybe later this year!

    • @jorgegomes83
      @jorgegomes83 10 месяцев назад

      @@ClearCode I'm glad to read that!

  • @DigitalCanineGamesStuff
    @DigitalCanineGamesStuff 11 месяцев назад +7

    Awesome 9 hr course, I still remember working on this exact project over a ago using your older platformer tutorial, I don't use pygame anymore but your videos have been really fun to watch, and have taught me a lot of things, I've also noticed that you released a complete free course on Godot, out of curiousity do you plan on making Godot and Pygame related tutorials or just focusing on one of them?

  • @saminhi3025
    @saminhi3025 10 месяцев назад

    Loved following this video! Along with the Udemy course and many of the youtube tutorials, I have finally got the confidence to make games myself! Thank you so much, i enjoy all your content and advice :) Could you please make a Pokemon style game next? That would be amazing!

  • @Maverick_iss
    @Maverick_iss 11 месяцев назад +2

    Hello! I love your tutorials, thanks a lot. And i would be very happy if you make a full kivy course like tkinter :)

  • @serhiiivanskoi2253
    @serhiiivanskoi2253 10 месяцев назад

    Hello @ClearCode. First of all I would like to say you a huge thank you very very very much for your tutorials. Would you please cover creating isometric scenes and isometric maps created in Tiled in you further tutorials. It would be very very interesting topic.

  • @BeRaikwal
    @BeRaikwal 11 месяцев назад +2

    WOW, JUST WOW!

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

    Woooo! More awesome game tutorials! 👍 👍

  • @hoteny
    @hoteny 11 месяцев назад +2

    Yooo new video just dropped. I’d love to see you make a (online or LAN) multiplayer game, just to see how to handle synchronization and all…

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

      It's on the cards, I've heard!

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

      @@beemarron3642 really? Thanks, that is excellent. May I ask where you heard about that? Patreon or discord?

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

      I'm lucky enough to love this talented creature@@hoteny (He'll HATE me getting mushy in the comments, but I can't help being so proud!)

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

    This probably won't get answered, but I get to about 3:11:00 and keep getting an error about the index list being empty for self.frames. I can't figure out why mine doesn't work, the code appears the same. If I comment out super().__init__(pos, self.frames[self.frame_index], groups, z), it runs fine (without any animated objects). Is the frames list else where?

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

      when you are importing the graphics something went wrong so self.frames is empty. You can test this by printing self.frames on the line before and to fix it just doublecheck the imports; chances you just got a typo in the path

  • @josephalbert.
    @josephalbert. 9 месяцев назад

    @ClearCode At 1:23:03, I followed exactly the same steps, however when I move (self.collision('vertical')) to the bottom, the code the character does not jump except when it is not colliding with any of the floor, left, right. And when I place it here (orange arrow, it jumps fine but when jumping while colliding with right wall, it sinks downward.:
    def move(self, dt):
    self.rect.x += self.direction.x * self.speed * dt
    self.collision('horizontal')
    if not self.on_surface['floor'] and any((self.on_surface['left'], self.on_surface['right'])):
    self.direction.y = 0
    self.rect.y += self.gravity/10 * dt
    else:
    self.direction.y += self.gravity / 2 * dt
    self.rect.y += self.direction.y * dt
    self.direction.y += self.gravity / 2 * dt
    ▶self.collision('vertical')
    if self.jump:
    if self.on_surface['floor']:
    self.direction.y = -self.jump_height
    self.jump = False
    Can you kindly help with that?

    • @josephalbert.
      @josephalbert. 9 месяцев назад

      self.collision('vertical') seems to be the issue, what can I do?

    • @ClearCode
      @ClearCode  9 месяцев назад +1

      I think that issue happens on a lower framerate; it will be fixed later in the game. Basically, when you jump, move the player up by a single pixel, then things should work fine.

    • @josephalbert.
      @josephalbert. 9 месяцев назад

      @@ClearCode Thank you so much for your reply.

    • @dmitriyzhemkov5954
      @dmitriyzhemkov5954 7 месяцев назад

      @ClearCode @josephalbert.
      thats interesting, i ran into a similar problem. i moved the "self.collision('vertical')" line where you said and it started working again.
      def move(self, dt):
      self.rect.x += self.direction.x * self.speed * dt
      self.collision('horizontal')
      if not self.on_surface['floor'] and any((self.on_surface['left'], self.on_surface['right'])):
      self.direction.y = 0
      self.rect.y += self.gravity / 10 * dt
      else:
      self.direction.y += self.gravity / 2 * dt
      self.rect.y += self.direction.y * dt
      self.direction.y += self.gravity / 2 * dt
      ▶self.collision('vertical')
      if self.jump:
      if self.on_surface['floor']:
      self.direction.y = -self.jump_height
      elif any((self.on_surface['left'], self.on_surface['right'])):
      self.timers['wall jump'].activate()
      self.direction.y = -self.jump_height
      self.direction.x = 1 if self.on_surface['left'] else -1
      self.jump = False
      before it was at the end and it worked at startup, but then broke as i was playing around with it.

  • @StevenCasperson-h4p
    @StevenCasperson-h4p 10 месяцев назад

    Thanks for working on that

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

    unbelievable, amazing.

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

    Great Video!

  • @mrdixioner
    @mrdixioner 8 месяцев назад +1

    PyGame is very similar to some features of the Godot game engine, or vice versa :). The only difference is that there is a lot of manual work compared to Godot, although PyGame includes some techniques to make the game easier to create. But... By programming the entire game by hand, I began to understand more about how the game works, how collisions and movements work, how textures are loaded and much, much, much more.
    Thank you so much for such a wonderful lesson!
    PS. My player still falls through the platform as it moves down. I looked at your code, but didn’t find any differences (maybe I didn’t look well :) ).

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

    the goat is back

  • @AlexanderMoyer-k3b
    @AlexanderMoyer-k3b 6 месяцев назад +2

    why does moving the collision around 1:20 not let me jump

  • @christinatrujillo2952
    @christinatrujillo2952 9 месяцев назад

    For anyone struggling with the file path or getting the error "no such file or director". I have a Macbook and I use VS code. The file path that has worked for me was 'data/levels/omni.tmx'. Just make sure you don't add the '../' in front. That should fix it!

    • @ClearCode
      @ClearCode  9 месяцев назад

      yes, when you open a project folder in VS code it starts going from the main folder, hence the path needs to be relative to that.

  • @Qwerty-gu2je
    @Qwerty-gu2je 11 месяцев назад +1

    Thanks for the code, just wanted to ask, at 13:14 you start writing a line related to pytmx. Is this line nessesary, because if so, is there any way to write it without getting an error?

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

      what error message do you get?

    • @Qwerty-gu2je
      @Qwerty-gu2je 11 месяцев назад

      @@ClearCode Hi man, thanks for the reply. This is the exact error:
      Traceback (most recent call last):
      File "C:\Users\smkei\Documents\Python Coding - Home\SPW_Main\__init__.py\code_start\Clear code platformer.py", line 35, in
      game = Game()
      File "C:\Users\smkei\Documents\Python Coding - Home\SPW_Main\__init__.py\code_start\Clear code platformer.py", line 18, in __init__
      self.tmx_maps = {0: load_pygame('../data/levels/omni.tmx')}
      File "C:\Users\smkei\AppData\Roaming\Python\Python312\site-packages\pytmx\util_pygame.py", line 183, in load_pygame
      return pytmx.TiledMap(filename, *args, **kwargs)
      File "C:\Users\smkei\AppData\Roaming\Python\Python312\site-packages\pytmx\pytmx.py", line 549, in __init__
      self.parse_xml(ElementTree.parse(self.filename).getroot())
      File "C:\Program Files\Python312\Lib\xml\etree\ElementTree.py", line 1203, in parse
      tree.parse(source, parser)
      File "C:\Program Files\Python312\Lib\xml\etree\ElementTree.py", line 557, in parse
      source = open(source, "rb")
      FileNotFoundError: [Errno 2] No such file or directory: '../data/levels/omni.tmx'
      Do you know what I can do about it?

    • @ClearCode
      @ClearCode  10 месяцев назад

      so when you try to import the omni.tmx file something is going wrong in the file path and the code cannot find it. You probably have typos somewhere of the folder names

    • @Qwerty-gu2je
      @Qwerty-gu2je 10 месяцев назад

      @@ClearCode ok, how do I find the location of the omni.tmx so I can make sure that the folder names are correct

    • @ClearCode
      @ClearCode  10 месяцев назад

      @@Qwerty-gu2je in the project folder there is a data folder which contains the tmx maps; I talk about the folder setup early on in the video

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

    Hi, I have a question that at 21:59 I am not showing the same as in the video, I checked the files again and still can't find the error, so is it because of the problem with my onmi.tmx file?

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

    Great video ! Will you ever make java tutorials ? Because you teach very well and your videos look clean.

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

    Thx for the tutoriel.

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

    Thank you 🩵

  • @dailymemes9460
    @dailymemes9460 11 месяцев назад +1

    Just love you

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

    Sensacional!!!! Meus parabéns amigo!!!👏👏👏👏👏👏😎👍

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

    Thank you so much ❤

  • @simplesimon2960
    @simplesimon2960 11 месяцев назад +1

    I've just started this project from earlier videos on your channel. Was just finished generating the level with the list of strings. Is this a different version of the same project? Or part of it?

    • @ClearCode
      @ClearCode  11 месяцев назад +2

      this video is the updated version of the old platformer tutorials, it makes all the old ones obsolete!

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

      Thank you!@@ClearCode

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

    at 2:01:30 I keep having my sprite moving through the moving platform while it goes down, I can't seem to find a way to fix it

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

      okay I fixed it, when I continued watching the semi-collidable platforms, the hint of wrapping the old_rects in ints fixed it for some reason

  • @BrandonWilliams-wf6hg
    @BrandonWilliams-wf6hg 11 месяцев назад

    Awesome!

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

    damn, can't use it cuz my laptop is win-7 and (match func) only works in later version,
    can we use other func instead of match 2:25:21

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

      Hey, you can always use if statements instead of match; although in that timestamp I am not using match?

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

      ​@@ClearCode 2:51:44
      Was finding solutions for days because of this error, but couldnt find any

  • @wazmeister3151
    @wazmeister3151 10 месяцев назад +1

    I'm having trouble, everything works perfect until 1hr 22mins. The wall slide, I've checked and kept code correctly and i get a weird result jump wont work properly if at all adding the changes to move module. If I remove the code and test, it works fine. seems to be moving self.collision('vertical') might be causing it? I sometimes get the error direction in x error too. Odd my code is exactly how shown?

    • @wazmeister3151
      @wazmeister3151 10 месяцев назад

      Have it a bit more response now but still since adding the wall check, jump is very unresponsive at times.....odd

    • @ClearCode
      @ClearCode  10 месяцев назад +2

      I think you need to move the player up by a pixel whenever you jump, otherwise the floor detection catches you; I am adding that part later in the tutorial

    • @josephalbert.
      @josephalbert. 9 месяцев назад

      same here, did you fix it?

  • @lukaasg3476
    @lukaasg3476 10 месяцев назад

    Hi, I've tried almost everything, but nothing helped me.. :( I'm in 17:09 and it still gives me this error
    FileNotFoundError: [Errno 2] No such file or directory: '..\\..\\data\\levels\\omni.tmx'
    I have a main folder where I have a CODE folder and in it I have .py files, then in the main folder I have data and there I have the rest, exactly as it is in the video (also in your .rar file, which I tried to download and also the same problem)
    you don't know what it could be? thank you very much :)

    • @ClearCode
      @ClearCode  10 месяцев назад +1

      are you using VS code? This one uses a different folder path system unless you specifically open the folder

    • @lukaasg3476
      @lukaasg3476 10 месяцев назад

      @@ClearCode Yes, I use VS code, I already fixed it :) Thanks alot
      import os
      script_dir = os.path.dirname(os.path.abspath(__file__))
      tmx_file_path = os.path.join(script_dir, '..', 'data', 'levels', 'omni.tmx')
      self.tmx_maps = {0: load_pygame(tmx_file_path)}
      self.current_stage = Level(self.tmx_maps[0])

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

    Well, now I know what I am going to do on my weekends

  • @brucee6524
    @brucee6524 Месяц назад

    Love this tutorial! Say, not sure if you are into this, but if you are I’d love it if you could make use of type hints in Python, especially since you are using VSCode like I do.
    That said, I love how you arrange your code and your tutorials, especially when you make mistakes (I’m guessing sometimes not accidentally). Those mistakes teach me more than anything else…
    Say, just wondering. I see you are not using python package scripts and things like __init__.py files in your folder structures. I’m wondering if that’s just a preference or something about a recent version of Python where they are not necessary any longer?

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

    я только вчера посмотрел 1 часть и вот спустя 1 день (1 год), 1 час назад вышло продолжение, спасибо тебе

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

    Awesome tutorial!
    By the way, if I would like to make the horizontal movement acceleration based - so e.g. when you press Left, it starts slower and then sets to the 'max speed', how would I implement that? (same could be done to deceleration aswell?).
    I think it would add a nice touch to the smoothness of character movement.

    • @Niels2Oyes
      @Niels2Oyes 9 месяцев назад

      i have the same probleme

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

    thank you

  • @현승-o9p
    @현승-o9p 7 месяцев назад

    this is great! can you upload more of tutorials with godot please?

  • @FilipMC5011
    @FilipMC5011 День назад +1

    After reaching the Stage 4 Node and completing the level, the path disappears entirely for that node and doesn't let you move anywhere, does anyone know a fix? I've tried on the completed code version provided after changing the self.unlocked_level variable to 0 in the "data.py" file (setting it directly to 4 also works for testing) and the same issue occurs.

    • @FilipMC5011
      @FilipMC5011 23 часа назад

      Same thing occurs with Stage 5 Node if you unlock all the stages by default

  • @kingmumputu8931
    @kingmumputu8931 9 месяцев назад +1

    hi brother can you enlighten me there is an error like list index out of range in the class AnimatedSprite(Sprite) thank you very much for the transmission of knowledge

    • @ClearCode
      @ClearCode  9 месяцев назад +2

      something has gone wrong in the import part and there are no frames inside of the AnimatedSprite, so check that part

    • @kingmumputu8931
      @kingmumputu8931 9 месяцев назад

      Thank brother 🙏

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

    The intro music is that of the Ninja Pizza Cats! 😄

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

      Isn't the series called Samurai Pizza cats? :P

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

      @@ClearCode Yes! That one! 😅😅😅

  • @Maxiow
    @Maxiow 10 месяцев назад

    Is it necessary to program the entire collision system? ( Isn't there anything like in Godot, GameMaker or Phaser where collision are already set for us? )

    • @frazomania
      @frazomania 10 месяцев назад +1

      yep, it sucks

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

    You cheeky little goat 🐐

  • @dimebagou7219
    @dimebagou7219 9 месяцев назад

    Hello @ClearCode, I don't understand how you make the pearl collision working as the Shell is in the collision_sprite so the pearl is killed right after its creation. I had to use this trick to make it work : def pearl_collision(self):
    for sprite in self.collision_sprites:
    if not isinstance(sprite, Shell):
    pygame.sprite.spritecollide(sprite, self.pearl_sprites, True)
    Did I miss something ?

    • @ClearCode
      @ClearCode  9 месяцев назад

      when the pearl is created it gets an offset so that it doesn't collide with the shell

    • @dimebagou7219
      @dimebagou7219 9 месяцев назад

      @@ClearCode Ok it's my bad, I forgot I changed it after I chose to launch it from the mouth :D You are perfect. Thank you.

    • @dimebagou7219
      @dimebagou7219 9 месяцев назад

      So I need to let my fix to make that works.

    • @ClearCode
      @ClearCode  9 месяцев назад

      @@dimebagou7219 no worries, hope it works now!

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

    I'm going insane. For the timer at 1:30:49, I import the timer with
    "from .timer import Time"
    The VS Code highlights and functions indicate that the player.py file successfully located the module but for some strange reason it keeps shooting this error:
    "ImportError: attempted relative import with no known parent package"
    Please help I am going insane

    • @ClearCode
      @ClearCode  8 месяцев назад +1

      inside of vs code open the entire project folder, not just the code one and then it should. Make sure to adjust the paths though (you just need to remove the "../' from them.

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

      @@ClearCode I've already had the entire project folder opened but it doesn't work.
      How do I adjust the paths?
      Also, "from timer import Timer" doesn't work. I have to always replace timer with .timer in to refer to the parent directory before it's referenced for some reason.

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

      @@ClearCode Okay, I got it to work. I just renamed the module to something other than timer and now I can access the class with ease. Thanks for helping

    • @brucee6524
      @brucee6524 Месяц назад

      @@rorkeslayer3925that’s what worked for me. No problems with other modules in same directory. Maybe the namespace got polluted with a different module somewhere? I don’t think it’s a built-in like “time,” but it could be something in one of the “ from xyz import * “ places. Not sure.

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

    the best pygame tutor is back. you should do his udemy course if you have not done so already!

  • @omaratef9124
    @omaratef9124 7 месяцев назад

    where did you get those sprites?! (Pirate sprites pack)
    & thank you

  • @ChrisKoe
    @ChrisKoe Месяц назад

    Hi there!
    Awesome video wich I'd love to follow. But I run into a problem early on, when importing the first tileset. No matter how I pass the path (absolute, relative, with/without join()), the line "self.tmx_maps = ..." throws a FileNotFoundError, saying no such file or directory ''F:\Python_projects\Platformer\data\levels\../tilesets\../../graphics/tilesets/outside.png'.'
    In the levels-folder from github, there are only the tmx files.
    I'm using VSCode on Windows, if that matters. Any idea what's the issue here?
    Thanks in advance und liebe Grüße :)

    • @ClearCode
      @ClearCode  Месяц назад +1

      hey, the tmx file is looking for files in the graphics folder so if you change the folder setup it will break. I guess the easiest way to check would be to open the tmx in Tiled, you should get a lot of error messages but Tiled lets you update the paths.

    • @ChrisKoe
      @ChrisKoe Месяц назад

      @ClearCode Yeah, I actually messed up the folder structure. Thanks for getting back so quickly!

  • @detonario
    @detonario Месяц назад

    Er hat sich so viel Mühe gegeben.😂

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

    Watched your ultimate godot tutorial and found it very helpful but i was wondering where is part 2 cuz i can swear there was a part 2 on ur channel

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

      it's literally in the description of that video...

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

      What the heck?! I went to search for it in the videos section of your channel and it doesn't show up but if i go to the description there it was ....

    • @ClearCode
      @ClearCode  11 месяцев назад +1

      @@colipcarazvangbriel7394 the video is unlisted :) Publishing a second video would mess with my RUclips metrics

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

      After reading your first reply i literally went and counted all your videos to see if they add up to 46 fueled by a mix of fear of going insane and shame of making such dumb mistake 😂.

    • @colipcarazvangbriel7394
      @colipcarazvangbriel7394 10 месяцев назад

      @@ClearCode I know it's unnecessary and a little bit late but i felt i had to justify my previous stupid blunder, when i watched the first part i went past the shader chapter cuz i thought it would be too early to go into the topic so i skipped the part where you say using Big White laters that the second part is in description and as I've only just found out about it i find myself back here..... I swear to you I know how to read 🥲

  • @SmaIlHum
    @SmaIlHum 7 месяцев назад

    yeah the sound in the game is very SNES inspired

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

    I have a question. I'm 6 hours into the tutorial and I don't understand why are we using a different method to create the background tiles. Can't you just draw the the BG tiles in Tiled too and use a for loop like we do in the level setup?

    • @ClearCode
      @ClearCode  6 месяцев назад +1

      It's been a while but if I remember correctly the background needs to be more flexible to accommodate for the sky in the some levels

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

      @@ClearCode Thanks for the answer you always do awesome work. I asked that question mostly because when I use that method, my game slows down dramatically. :(

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

      @@ClearCode These lines were slowing the program apparently, and I don't remember why I wrote them lol.
      if dt > 0.001:
      dt = 0.001

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

    Wow, 9 and 1/2 hours!!! Would it be possible to create bit size playlists videos?

    • @nicklansbury3166
      @nicklansbury3166 11 месяцев назад +1

      It's split into 15 time-stamped selectable sections which is nearly the same. Hope this helps.

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

      @@nicklansbury3166 Not really, I easily lose track at where I was the last time

  • @freewheelburning8834
    @freewheelburning8834 11 месяцев назад +3

    Is our protagonist Lemmy from motorhead by chance?

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

    Does this one include joystick control AS WELL AS KEYBOARD? That is a major stumbling block on pygame. And is tiled files available as well?

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

      joystick no but tiles yes.
      Will cover joysticks/ gamepads on my other channel this month.

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

    Wonderful.