PyGame Beginner Tutorial in Python - 3D Background Effect with Parallax Scrolling

แชร์
ฝัง
  • เผยแพร่เมื่อ 17 ธ.ค. 2024

ความคิดเห็น • 52

  • @2MSTennis
    @2MSTennis 2 ปีที่แล้ว +18

    I think this would be really cool for a turn based rpg. Have the character enter the instance and when a mob approaches it enters a battle sequence!! Cheers!

  • @drewnash132
    @drewnash132 ปีที่แล้ว +9

    Thanks a lot. Amazing tutorial.
    I am a new in pygame, but not in python. So I implemented the Parallax logic to my code and it looks terrific.
    I decreased scroll step from 5 to 0.8 and increased x range for the endless effect.
    P.S. found nice background images on craftpix.

    • @xaviergo9645
      @xaviergo9645 ปีที่แล้ว

      where can i copy the code?

  • @SkyFly19853
    @SkyFly19853 2 ปีที่แล้ว +5

    Wow...
    Python has so much potential...

  • @ToujoursIris
    @ToujoursIris 2 ปีที่แล้ว +9

    A nice way for creating a 3D effect. Was a bit hard for me to do it myself, but I followed the tutorial and got the required output. (still waiting for the discord server)

    • @CodingWithRuss
      @CodingWithRuss  2 ปีที่แล้ว

      Thanks! And good to see you again :)

    • @ToujoursIris
      @ToujoursIris 2 ปีที่แล้ว

      @@CodingWithRuss Yea, we have summer break now so I can watch your videos :)

    • @atharvkumar2564
      @atharvkumar2564 2 ปีที่แล้ว

      Yeah

    • @xaviergo9645
      @xaviergo9645 ปีที่แล้ว

      where can i copy the code?

  • @ghazalareeba126
    @ghazalareeba126 ปีที่แล้ว +2

    Just what I needed ❤

  • @floridaadventurediving144
    @floridaadventurediving144 ปีที่แล้ว +1

    Great tutorial Russ!

  • @UnleashedEntomber
    @UnleashedEntomber 2 ปีที่แล้ว +2

    I hope you will be back soon, you are making great staff.

    • @CodingWithRuss
      @CodingWithRuss  2 ปีที่แล้ว +2

      I've been working on a new game, it should be ready soon :)

  • @coderunner743
    @coderunner743 2 ปีที่แล้ว +1

    Super explanation and awesome effect

  • @plexus2000
    @plexus2000 2 ปีที่แล้ว +1

    Oh that looks great

  • @DineshVaidyaOfficial
    @DineshVaidyaOfficial 2 ปีที่แล้ว

    Really Awesome. Thank You very much...

  • @fbushphone
    @fbushphone 5 หลายเดือนก่อน +1

    Elegant thanks for sharing

  • @ferasalatrash7372
    @ferasalatrash7372 2 ปีที่แล้ว +1

    I found your channel recently and your content is amazing!
    Could you please do a game with full screen so we can learn how to handle that every user might have a different screen size 😅

    • @CodingWithRuss
      @CodingWithRuss  2 ปีที่แล้ว

      Thanks! Glad you like it. Yes that's something I'd like to look at because I've noticed sometimes the games I make are too big or too small on other people's screens

  • @alexany4619
    @alexany4619 9 หลายเดือนก่อน

    Hi, how would you locate and move sprites behind the first layer?

  • @SorachiEte-r5m
    @SorachiEte-r5m ปีที่แล้ว

    Actually I tried to apply the endless scrolling with this parallex logic, but its not continous as compared to a single image

  • @xavierbourguignon37220
    @xavierbourguignon37220 ปีที่แล้ว

    How would one do an endless scroller? Currently when we hit the last image in the list, we get nothing else. I guess there is a way to wrap these images around

    • @CodingWithRuss
      @CodingWithRuss  ปีที่แล้ว

      To achieve that, you can combine the parallax logic with the endless scrolling logic from this video: th-cam.com/video/ARt6DLP38-Y/w-d-xo.html

    • @frazomania
      @frazomania 8 หลายเดือนก่อน +1

      @@CodingWithRuss wow great so helpful, do you not understand that it has a delay like it doesnt work like that

  • @uthmanjimmy1377
    @uthmanjimmy1377 5 หลายเดือนก่อน

    I notice a bit of jitter while scrolling. Have you found a solution for this? Perhaps this approach might not be the best way of doing parallax effects?

    • @CodingWithRuss
      @CodingWithRuss  5 หลายเดือนก่อน

      I've noticed jittering in a few of my pygame projects where I have continuously moving images and spent a while trying to troubleshoot them but could never figure it out. Not really sure what causes it.

    • @uthmanjimmy1377
      @uthmanjimmy1377 5 หลายเดือนก่อน

      @@CodingWithRuss Good to know! Thanks for your speedy reply!

  • @AG06_GabryGunner
    @AG06_GabryGunner ปีที่แล้ว

    i see that it draws 5 times, i do wonder if it can loop infinately
    for x in range(5):

    • @CodingWithRuss
      @CodingWithRuss  ปีที่แล้ว

      Yes it would be possible to do. I have another video where I explain how to create an infinite scrolling background so the method in there can be combined with this one to give an infinitely scrolling parallax background. This is the other video: th-cam.com/video/ARt6DLP38-Y/w-d-xo.html

  • @ghguyrur7
    @ghguyrur7 2 ปีที่แล้ว

    So I make this, do I also code my game in here? I’m still not sure if I’m supposed to use one box of code for my whole game or if I’m breaking it into parts

    • @CodingWithRuss
      @CodingWithRuss  2 ปีที่แล้ว +1

      You can split your project into different files and this background effect can be one of those parts. You can then import it into your main game and use it there.

    • @ghguyrur7
      @ghguyrur7 2 ปีที่แล้ว

      @@CodingWithRussyou’re amazing and you’ve me helped so much

  • @anameter4715
    @anameter4715 2 ปีที่แล้ว

    Hi. Do you have a snake game in pygame?

  • @onr28
    @onr28 ปีที่แล้ว +1

    Is there a way to make this infinite?

    • @CodingWithRuss
      @CodingWithRuss  ปีที่แล้ว

      Yes, you can combine it with this video to create an infinite parallax background: th-cam.com/video/ARt6DLP38-Y/w-d-xo.html

  • @evagok3698
    @evagok3698 2 ปีที่แล้ว

    Completed!
    jehhueeheyy!

    • @CodingWithRuss
      @CodingWithRuss  2 ปีที่แล้ว +1

      Wow you're getting through them quick. I will need to make more :)

    • @evagok3698
      @evagok3698 2 ปีที่แล้ว +1

      @@CodingWithRuss I will be doing your all videos about python because I think they are really nice and you are very good at sharing your knowledge. Thanks a lot. Ohh also after making that platform game some people tried it and 6 years old a child like it very much and I felt super proud. I just followed all your tutorials and I had change to write the code and I learn a bit of course. Thank you for me feeling good. I really appreciate that.

  • @half-eye3006
    @half-eye3006 ปีที่แล้ว

    you guys know how to make the image in a infinit loop.

    • @CodingWithRuss
      @CodingWithRuss  ปีที่แล้ว

      This video shows how to make an infinite background, so you can apply the same logic here by modifying the code a little bit: th-cam.com/video/ARt6DLP38-Y/w-d-xo.html

    • @half-eye3006
      @half-eye3006 ปีที่แล้ว

      @@CodingWithRuss i managed to make it, thank you brother

    • @CodingWithRuss
      @CodingWithRuss  ปีที่แล้ว

      @@half-eye3006 Nice one

    • @shadowace159
      @shadowace159 ปีที่แล้ว

      @@half-eye3006 Hello, I'm trying to make the same thing. Did you have to make a scroll variable for each background? Or is there a less redundant way to do things?

    • @half-eye3006
      @half-eye3006 ปีที่แล้ว

      @@shadowace159 scroll variable for each background i did that

  • @walti3202
    @walti3202 ปีที่แล้ว

    peak

  • @idiedlastmonth
    @idiedlastmonth ปีที่แล้ว +1

    Absolutely wonderful!

  • @Doubletrouble192
    @Doubletrouble192 2 ปีที่แล้ว

    Hello! I am new to programming and am attempting to code a something in Pygame, however I am struggling a lot. Would it be possible if I could contact you somehow and ask for some help?