Pygame Tile Based Game Tutorial: Collisions

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

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

  • @Isaacyang1000
    @Isaacyang1000 4 года назад +9

    you are criminally underrated! not sure how you haven't blown up yet but you content is amazing. It wouldnt hurt to do some self promotion at the start or end of your vids because you deserve more!!!

    • @CDcodes
      @CDcodes  4 года назад +1

      Thanks for the kind words : )

  • @duskmanepokemon4943
    @duskmanepokemon4943 4 года назад +1

    I was waiting for it 😍, thank for the videos 😘

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

    Thank you so much for your help! You explain so crearly. I wish to create a videogame and thank to you I am closer to achieve it. I hope you to grow up in RUclips.

    • @CDcodes
      @CDcodes  3 года назад

      Happy to hear! Goodluck with your game, hope I can play it some day : )

  • @mart9946
    @mart9946 4 года назад +1

    please continue this game! objects you can pick up would be a great video!

    • @CDcodes
      @CDcodes  4 года назад

      Sure, I could do a video on that

    • @mart9946
      @mart9946 4 года назад

      @@CDcodes Ive been trying to combine all your previous videos into one game for the past 20 hours, im sure ill eventually get there 😅😭

  • @mtbminibomber
    @mtbminibomber 4 года назад +1

    Your so good at making games!

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

    This opened up my brain a bit as to why my collision for my Android game hasn't been functioning correctly! I've been working on my math for 3 days to long so here's hoping!

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

      Good luck!

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

      @@CDcodes ha thanks I got it working figured out I doubled a line of code which was causing my player to move 2x further making it get stuck in the tiles.. Next I can't wait to play around with a platform style game like this!

  • @Ed-of2id
    @Ed-of2id 4 года назад +1

    very informational, thank you.

    • @CDcodes
      @CDcodes  4 года назад

      You're welcome stranger

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

    please make video on animation on this series please

  • @aadityabhetuwal5990
    @aadityabhetuwal5990 3 года назад

    This is really a really nice explanation.

  • @thepaparich
    @thepaparich 4 года назад

    Great video man.

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

    how would you create collison rect for a slope

  • @celiojunior304
    @celiojunior304 3 года назад

    Will all this run well if we keep all the logic of colliding in the main Thread?

  • @Pradeepkumar-id3bw
    @Pradeepkumar-id3bw 4 года назад

    Can you post how to have multiple enemies nxt please?🙏

  • @MrStegore
    @MrStegore 4 года назад

    really helpful

    • @CDcodes
      @CDcodes  4 года назад +1

      Glad to hear that!

  • @duskmanepokemon4943
    @duskmanepokemon4943 4 года назад

    In the previous video, we were able to walk on the empty space in the map, is it fixed now?
    And the collisions are applicable for all the blocks?

    • @CDcodes
      @CDcodes  4 года назад +1

      It should work on all the blocks, and the player should fall off the mapnif they arent on a tile (but there's no logic to handle character death so the player will just disappear)

    • @duskmanepokemon4943
      @duskmanepokemon4943 4 года назад

      @@CDcodes can we write a if statement in which if the player's y position is greater than the bottom of the screen, reset the player's position.
      I think that will work 😀

    • @CDcodes
      @CDcodes  4 года назад

      Yeah thats one way of handling it!

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

    Hello! is there any way to turn off collision with specific tiles?

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

      What you can do is exclude those tiles from your list of tiles that are used to check collision. What I like to do is store them in a different list if they will interact with the player in a different way, or exclude them entirely from the collision list if they are just for decoration.
      You can also add a bool variable to the tile class that denotes whether the tile should be collided with or not

  • @Jagjot_Singh
    @Jagjot_Singh 4 года назад

    Bro can you make a tutorial for animating the movement of player. That would be so awesome 😍
    I saw video from clear code, my player starts animating when I hold the key, but it is not moving.
    It will be helpful if you make a video on movement animation of the player

    • @CDcodes
      @CDcodes  4 года назад

      I actually have a video on animation: ruclips.net/video/qPnKIbrVnJk/видео.html
      My production quality was a little lower when I made it, so I may redo it in the future. But you can still learn from it!

    • @Jagjot_Singh
      @Jagjot_Singh 4 года назад

      @@CDcodes thanks for the reply, I'm new to your channel so I didn't knew 😅

  • @chicuongluong9876
    @chicuongluong9876 4 года назад

    I can't open when I dowload your file on github

    • @CDcodes
      @CDcodes  4 года назад

      What kind of error are you getting?

  • @DJSUPERSAW
    @DJSUPERSAW 4 года назад

    so this is minecraft???