Pygame Platformer Tutorial - Full Course

Поділитися
Вставка
  • Опубліковано 16 тра 2024
  • Making a platformer with Pygame is a fun way to learn both game development and software engineering. This tutorial covers a variety topics including tiles, physics, entities, particles, sparks, camera, parallax, enemies, AI, combat, level editing, level transitions, making executables, and more!
    Project Reference Resources:
    dafluffypotato.com/assets/pg_...
    Wishlist Yawnoc (Made with Pygame):
    store.steampowered.com/app/28...
    My Discord (ask questions here):
    / discord
    Old Pygame Tutorial Series (without OOP):
    • Pygame Tutorial Series...
    Amateur and Advanced Pygame Tutorials:
    • Pygame Tutorial Series...
    • Pygame Tutorial Series...
    Pygame CE Video:
    • Pygame CE - Better & F...
    Pygame's Performance Video:
    • Pygame's Performance -...
    Physics Explanation Video:
    • In-depth Pygame Physic...
    Timestamps:
    0:00:00 - Introduction & Tips
    0:03:55 - Installing Pygame
    0:07:04 - Creating a Window
    0:16:42 - Images, Input, & Collisions
    0:33:07 - Player, Tiles, & Physics
    1:27:49 - Camera & Sky
    1:46:43 - Optimization
    1:57:51 - Animation
    2:22:25 - Level Editor
    3:13:26 - Particles
    3:35:03 - Jump & Slide
    3:50:45 - Dash Attack
    4:10:07 - Enemies, Guns, Death, & Sparks
    5:11:33 - Screenshake
    5:15:21 - Level Transitions
    5:26:11 - Outlines
    5:37:40 - Audio
    5:45:57 - Making an Executable
    6:02:20 - Next Steps
    Patreon:
    / dafluffypotato
    My Website (links to games):
    dafluffypotato.com
    Potato Tier Patrons:
    Agent Effe
    Eivind Teig
    fatcake
    RyDawgE
    Sam Cork
    GaryTMSFruitcake
    Dale Topley
    Jb mandri
    tbf135
    #python #pygame #gamedev
  • Наука та технологія

КОМЕНТАРІ • 412

  • @DaFluffyPotato
    @DaFluffyPotato  10 місяців тому +118

    Here's a tip: VSCode shows the current object and function I'm editing right under the file tabs, which can help you keep track of where I am at all times.
    Clarification: If you have larger entities, they need to look up a larger area of tiles around them for physics. I used a 3x3 table in the tutorial, but you may need a larger one for large entities. A 5x5 table would be every pair of numbers between -2 and 2. (3x3 is -1 to 1)
    As of the release of this tutorial, I'm still using Pygame CE. They've actually released another update since I started working on this video as well!

    • @rubendriezen7177
      @rubendriezen7177 10 місяців тому +4

      I made my own programming language in python!

    • @herikgiammaria9961
      @herikgiammaria9961 10 місяців тому +9

      I love your work!! I love love love it, I study pygame for your videos and I try to improve every day! Could you put subtitles in this video of yours? I'm Brazilian and I don't understand your videos very well when they don't have subtitles

    • @DaFluffyPotato
      @DaFluffyPotato  10 місяців тому +10

      @@herikgiammaria9961 I think UA-cam may still be processing the automatic subtitles. There's no way I could write up manual subtitles for a 6 hour video though. I just do manual English ones for my scripted videos now since I can just put in the script. Also, I'm impressed that the automatic ones are useful since it often doesn't understand what I'm saying.

    • @herikgiammaria9961
      @herikgiammaria9961 10 місяців тому +5

      @@DaFluffyPotato Thank you very much!!!! I thought so haha, after all it's a 6 hour video! UA-cam must be processing, I'll come back to watch it later! MT thanks for helping this community to grow, I appreciate you and your work, hugs

    • @AndrewHTR
      @AndrewHTR 10 місяців тому +1

      @@herikgiammaria9961 salve herik

  • @thes_ntry
    @thes_ntry 10 місяців тому +131

    You are a wizard of using Pygame, your previous tutorials were amazing, and the amount you've been able to build up around the library is immensely impressive. Thank you for sharing your experience and insight to everyone

  • @nilusnilus6365
    @nilusnilus6365 10 місяців тому +15

    wow i remember a few years ago following your platformer tutorial, very glad to see you continuing the series :D

  • @emperor8716
    @emperor8716 10 місяців тому +25

    this is crazy. a tutorial from the actual best, i can't wait to do this.

  • @user-nx2qk6gi3l
    @user-nx2qk6gi3l 10 місяців тому +7

    So happy this was uploaded, couldn't find a better person to explain pygame then this legend, Well done Potato keep killing it

  • @RAM-nb1ot
    @RAM-nb1ot 10 місяців тому +1

    I was literally following your old pygame tuts and if they werent alr a blessing we got this :) thanks man

  • @daniehexer7016
    @daniehexer7016 10 місяців тому +5

    It's great seeing your tutorials, can't wait to try this myself!

  • @Programmer-Anchous
    @Programmer-Anchous 10 місяців тому +2

    This is the best pygame platformer tutorial I've ever seen! Thank you!

  • @TheDarkSide11891
    @TheDarkSide11891 10 місяців тому +24

    Thanks so much for the great tutorials! It’s awesome to see your thought processes and see how you make such high quality experiences using python!

  • @ZaynBrando
    @ZaynBrando 3 місяці тому +3

    This is actually the best video i've ever seen that explains things very easily for a beginner and helped me understand the "WHY" behind every code. Thank you so much, subbed!

  • @moanzx2
    @moanzx2 9 місяців тому +2

    this has helped me so much now im hooked on your videos :) also remade my platformer im working on thanks to so many of your techniques. and joined the discord and there are so many helping people there!
    looking forward of what your'e gonna do next! 😊

  • @sourcream1671
    @sourcream1671 8 місяців тому +1

    This is amazing, brilliant work!

  • @melchiorvanderberg897
    @melchiorvanderberg897 7 місяців тому +39

    Just finished this amazing tutorial, took me about 4 days though spent about 18hours on it. But it was worth every second!
    This is the first time I actually worked with Pygame, and after your tutorial, I definitely have quite a few ideas of what I can do on my own.
    Will be checking out your other tutorials as well.
    Thanks for some amazing content !

  • @carrotsandcats
    @carrotsandcats 10 місяців тому +1

    Thank you so much for this, it’s so cool that you « remade » your old tutorial séries and improved it!! Thx

  • @gibran800
    @gibran800 3 місяці тому +1

    This smooth camera movement trick is fucking amazing. I had to go over the geometry of it a couple of times, but once it clicks, holy shit, it makes so much sense.

  • @paranimias
    @paranimias 3 місяці тому

    on 2020 you totally saved my butt on my programming project with your first tutorial, I'm really glad that you keep posting this tutorials, greeting from Colombia!

  • @flor18gatar
    @flor18gatar 9 місяців тому

    Immensely grateful for this. Thank you.

  • @josuebarros5727
    @josuebarros5727 10 місяців тому +1

    Oh my god!!! its soooo perfect!!!
    I'll take this tutorial this Saturday!!!

  • @official-phuh
    @official-phuh 8 днів тому +1

    I've been trying not to comment until the end of the video, but right now I'm in the middle of making the Level Editor and I just have to say, things are really starting to click and I'm really grateful for your teaching style, optimization/pragmatism/problem solving, and effort to make this tutorial. I'm changing things around too as to really push myself to understand your code more thoroughly (for example I used a sprite sheet that needs coordinates instead of files for the Level Editor, which required a fair bit of tweaking across multiple files).

  • @LukaGantar
    @LukaGantar 9 місяців тому

    Thanks a lot for this, the tutorial is a great, comprehensive intro to pygame!

  • @thisisnotkj
    @thisisnotkj 10 місяців тому +1

    thank you for the great tutorial :D, will be watching it over the coming days!

  • @ekaterinamalinkina3899
    @ekaterinamalinkina3899 3 місяці тому

    What a great tutorial! Clear, concise, and not tiring to watch :) feel like i got a lot from this, thanks

  • @willwillcode7568
    @willwillcode7568 10 місяців тому +2

    Finally, a good tutorial on pygame! Thanks so much

  • @q1chen
    @q1chen 9 місяців тому

    It took me several days to finish it and i really learned a lot, thanks!

  • @bini420
    @bini420 10 місяців тому +4

    I did not expect a banger like this from you, I went from "oh new 10 minute video of his old tutorial" to "course? So 1 hour? That's unexpected" to "bros brain turned to mash patatos of he done this"

  • @breadman7733
    @breadman7733 10 місяців тому

    Just what I needed in my life. Thanks so much !

  • @Rafaeldonfigueiredo
    @Rafaeldonfigueiredo 10 місяців тому +1

    It's another great tutorial, Fluffy. Thank you

  • @prafultimbadiya9891
    @prafultimbadiya9891 10 місяців тому +1

    Your graphics are AMAZING!! ❤❤

  • @lustrias
    @lustrias 7 місяців тому +1

    Amazing tutorial. I've tried a few others, but this one is just what I needed. I do deviate here and there from your code. I added vsync to the window. But vsync only works with the flag pygame.SCALED. So I removed your method of scaling (drawing a 320*240 surface and then upscale it in the main window). The amount of experience and information you give is really impressive. Thank you so much👍

  • @mojojojo123
    @mojojojo123 4 місяці тому

    Thank you for sharing!!! This is such a great tutorial :)

  • @Jioarg
    @Jioarg 9 місяців тому

    This is a great tutorial. Some things I would like to see is a tutorial on a way to implement 3d isometric levels(editor and player) and menus and sprite sheets as assets. Thank you for all of your help.

  • @PeterDinklager
    @PeterDinklager 9 місяців тому +16

    Around 32:34 a good practice is to stop and try to code in left and right movement, then add a collision box on each side at equal distances. Helped me understand the code and get a better grasp for placing things in relation to the resolution

    • @sc2sperwerfy249
      @sc2sperwerfy249 4 місяці тому

      hey, do you know witch event i have to use for the key right and key left? I cant find them in python. thanks

    • @kuba.9108
      @kuba.9108 3 місяці тому

      @@sc2sperwerfy249just normal eventtype K_UP or K_DOWN i belive

  • @q1chen
    @q1chen 9 місяців тому

    i literally said wow at the jumping part, genius idea

  • @FaunFunc
    @FaunFunc 4 місяці тому

    i just migrated to pygame from html and js canvas, am skimming through this tutorial and it's very fun. Learning OOP for games is really worth it🙂

  • @musaplusplus
    @musaplusplus 10 місяців тому +3

    God damn Fluffy , you really went in with this one

  • @Forakus
    @Forakus 4 місяці тому

    This is so incredibly valuable.. thank you

  • @subnatiby
    @subnatiby 10 місяців тому +2

    HOLY MOLY A NEW ONE!!!

  • @curiousstudent7961
    @curiousstudent7961 6 місяців тому +1

    my coding got so much cleaner from using this as a guideline, thanks!

  • @thaimeuu
    @thaimeuu 4 місяці тому

    wow, 6 hour tutorial. definitely gonna check this out. thank you.

  • @justin7oo994
    @justin7oo994 9 місяців тому +2

    This is actually really cool, I have never seen anyone use Json files for loading maps I have only used csv files that's such a neat trick, also another neat trick for even more performance, use orjson instead of normal json its much faster

  • @curlydev2
    @curlydev2 9 місяців тому +1

    THANK YOU SO MUCH, Thanks to you i achived my rpg engine, and it's so fast ! I'm really happy

  • @user-bf9ul9wv1d
    @user-bf9ul9wv1d 10 місяців тому +21

    I think you are the only developer who works so hard on making games in python, knowing that it was easier to do it in unity.
    You really inspire me a lot.

    • @DaFluffyPotato
      @DaFluffyPotato  10 місяців тому +19

      It's only easier to get started learning with Unity. At my level, I can work faster than people using Unity.

    • @chigstardan7285
      @chigstardan7285 10 місяців тому +2

      @@DaFluffyPotato That's so cool.

    • @sushismitcher225
      @sushismitcher225 10 місяців тому +1

      I have been using pygame for over a year, and I've made over 20 pygame snippets in vs code to make anything in pygame from particles to a basic platformer. This lets me make prototypes faster than with a game engine. Each method to making a game has its advantage.

    • @Man-mx2sy
      @Man-mx2sy 7 місяців тому +1

      nah check out clear code, that dudes fire

    • @chigstardan7285
      @chigstardan7285 7 місяців тому

      @@Man-mx2sy man clear code is the best, though he uses pygame for educational material while fluffy uses it for his personal projects. I hear clear code is gonna bring a new Godot 4 tutorial.

  • @koufdell
    @koufdell 10 місяців тому +1

    amazing content..thank you so much..exactly what i am struggling with...

  • @sricharanathanti3181
    @sricharanathanti3181 4 місяці тому +3

    This guy has to go down in the books as the best Python game developer.

  • @deecyrlysons3401
    @deecyrlysons3401 4 місяці тому

    Tutorial done! Thank you for this...from France

  • @jumparoundtheatoms
    @jumparoundtheatoms 8 місяців тому +2

    Awesome stuff you did sharing this , many thanks :) . One thing for those who made it to enemies :P : while DaFluffyPotato does mention and switches to off grid placement for the player ( and subsequent the enemies ), if one does place the spawners by accident on grid like me, extract will fail. This is because the spawners are not part of self.offgrid_tiles, but self.tilemap, and the loop in the extract function its done on the self.tilemap directly and not on a copy. Reckon by accident and the loop should be done on a copy to catch this cases.

    • @Nolexes
      @Nolexes 29 днів тому

      I totally overheard the offgrid part couldn't get my game running anymore and got different kind of errors trying to fix it so thanks for the comment. I bet it would have taken me ages to find this out on my own :D

  • @doganaktar
    @doganaktar 10 місяців тому +1

    thanks a lot dude you're the best

  • @DerpyDungeoneer
    @DerpyDungeoneer 9 місяців тому +3

    I almost cried not finding that typo that didn't let me start the game at the end of the cloud part.
    Dude I love your insights you give into various methods of handling stuff. Super abstract thinking. I aspire to get on that level at some point.
    This is my first step into game development. Hope I get my mind primed the right way following your thought process.

  • @Tristaxx
    @Tristaxx 3 місяці тому

    MAN THIS IS FRICKIN LIT 🔥 thx man 🗿

  • @viniciusamaral3085
    @viniciusamaral3085 10 місяців тому +1

    Man, thank you so much for this...

  • @villageraxo3988
    @villageraxo3988 10 місяців тому

    Thx potato i was looking for a tutorial like this

  • @joshuarose20
    @joshuarose20 9 місяців тому +17

    *HOW IS THIS FREE*

  • @unknownMusk
    @unknownMusk 10 місяців тому +1

    Wow! It's a big work!! You are so cool!!!

  • @wkol1120
    @wkol1120 14 днів тому

    Hi DaFluffyPotato, through your teaching video, I learned about the python construction and many useful skill about game development! Especially on python container, it did help me a a lot to understand the syntax and tips.
    Thank you for your kindly sharing~~~

  • @galaxybrainnews9772
    @galaxybrainnews9772 6 місяців тому +5

    After the optimizations around 1:52:15 I adjusted the tilemap __init__ to add a million tiles in each direction instead of just 10. it took a while for the project to start but even with 2 million tiles loaded into the tilemap it was still buttery smooth once it got going! (Using python 3.12 and pygame ce as of 11/9/2023)

    • @DaFluffyPotato
      @DaFluffyPotato  6 місяців тому +5

      Yep, that's expected. You can have some pretty massive worlds. Often times RAM will become an issue before CPU usage in those cases (provided you don't have too much on the screen at once).

    • @lucaivaldi4520
      @lucaivaldi4520 16 днів тому

      @@DaFluffyPotato I wonder if the optimization is more about not having to query the whole dict more than queuing a lot of draw calls. Of course premature optimization is the root of all evil and we should always benchmark before trying to optimize. I think the SDL library (and the backend it uses, Opengl, Metal, Vulkan..) will be more than happy to discard any draw call that draws off the screen, but there is the cost of querying the whole dictionary anyway, so your solution could cut the time spent there. Anyway, I'm not sure how much of an issue that could be.
      Anyway, this is only something I'm asking myself and your videos are super, thank you!

  • @SagaContinu
    @SagaContinu 4 місяці тому +4

    If anyone runs into an issue with their character falling through the floor:
    Collision detection is checking where you are located in the a grid system ---> that's what the tiles_around() function does. It uses the co-ordinates from the top left of your player image to workout where you are. If your player image is larger that the grid system it will only register that you are in the next grid section to update the collisions after you have fallen through the floor. Try checking from the center of the image instead. Or else you may need to do more than one check i.e. top left, bottom right. Or else increase the checking distance to include more tiles.
    Interesting way to do the collision detection though

    • @HammouaI0I0I0
      @HammouaI0I0I0 Місяць тому

      how to do this btw

    • @SagaContinu
      @SagaContinu Місяць тому

      @@HammouaI0I0I0 Adjust tilemap.physics_rect_around() function to check from the center of the player instead of the top left
      player_loc = self.game.player.rect().center
      However, if the distance from the center of the image to the sides (right,left,top,bottom) is still greater than a tile width this won't work.

    • @HammouaI0I0I0
      @HammouaI0I0I0 Місяць тому

      @@SagaContinu cool, but where do i insert this line of code
      edit: cool my player doesn't fall trough the wall, but its sometilmes glitch out with upper collisions

  • @redcore_gamer
    @redcore_gamer 10 місяців тому +1

    THANK YOU!!

  • @bcorey3660
    @bcorey3660 6 місяців тому

    This seems like a good approach for people who already know how to program. Honestly some of the APIs seem similar to normal web dev. I guess at the end of the day, game dev is still just listening for events, updating state and rendering to the display

  • @thefunnyegg-fe8lr
    @thefunnyegg-fe8lr Місяць тому

    thank you!! pygame is tricky but i'm determined to get it down!!

  • @tortutute1707
    @tortutute1707 10 місяців тому +1

    I don't comment much on videos, but thank you very much for your videos which help me a lot. Keep it up 🔥🔥! sorry for my english i am french

  • @lodybaguette2487
    @lodybaguette2487 10 місяців тому +1

    Good work !

  • @Inkety
    @Inkety 6 місяців тому

    this is an amazing tutorial! i learned a ton from it!
    i just want to let you know is that this project has a bug in the way you implemented the death by falling. if you wall-slide for too long it kills you, and for some reason in this project if you wall-slide for too long, it kind of glitches out and shakes the screen. I'm not too sure why that is.
    also, when you reloaded the level, the player's dash value is not reset.
    but i loved this tutorial and will be looking forward to more videos! thanks!

  • @BumpDev
    @BumpDev 10 місяців тому +1

    The ultimate course

  • @naturep1x3ls
    @naturep1x3ls 10 місяців тому +1

    the ultimate pygame tutorial has arrived.

  • @ahmedabuharthieh579
    @ahmedabuharthieh579 9 місяців тому

    Still following along here bit by bit with some experimenting along the way, great tutorial so far! I just wanted to ask, since the screenshake changes the blit position of the display, won't we get black bars on the edges of the screen when it occurs?

    • @DaFluffyPotato
      @DaFluffyPotato  9 місяців тому +1

      Yes. If you don't like that you can use the camera offset technique I mention instead. It's negligible.

  • @yds6268
    @yds6268 4 місяці тому

    This deserves a million views

  • @jasonfun4069
    @jasonfun4069 3 дні тому

    I learned more from this tutorial than my past 2 years of python classes

  • @sopvop
    @sopvop 2 місяці тому

    Great video! I've learned a lot of basics about side scrollers, even though I'm following with c++ and raylib instead of python.

  • @ozcar06
    @ozcar06 9 місяців тому

    Hi @DaFluffyPotato, I ran into a problem where im not able to locate the png's in the player, tiles and physics part. Is there a way to fix this?

  • @trumansmith7630
    @trumansmith7630 7 місяців тому

    Thank you so much for sharing this tutorial! I have a question though, at 1:51:00 during tile optimization, I'm getting a TypeError on line 37, within the definition of the render function. 'float' object cannot be interpreted as an integer. Would installing numpy and using arange() be a solution? I compared my code with the repository, maybe I'm missing something...

    • @DaFluffyPotato
      @DaFluffyPotato  7 місяців тому +2

      Just wrap the parameters with int(). I think the // operator has varying behaviours depending on the system/version.

    • @trumansmith7630
      @trumansmith7630 7 місяців тому

      @@DaFluffyPotato That worked, thank you!

  • @Ibrahimmurtaza-qx8dc
    @Ibrahimmurtaza-qx8dc Місяць тому

    i love this
    course

  • @dagmawiabey8358
    @dagmawiabey8358 8 місяців тому +1

    i have a few questions, i hear people and most of the internet say that python is very slow compared to programming languages like c++, so is there any disadvantage that i would get from making 2d and 3d games with python? thanks!

  • @MonLes-xt7gc
    @MonLes-xt7gc 9 місяців тому

    You are legendary

  • @maxsurkov
    @maxsurkov 6 місяців тому

    amazing work

  • @bokaroid1946
    @bokaroid1946 7 місяців тому

    Thank you for this tutorial !
    question: Can I use "Tiled" application for level editor?

  • @xanderpixel281
    @xanderpixel281 10 місяців тому +1

    Nice one!

  • @mobs9306
    @mobs9306 3 місяці тому +1

    Following this series with Zig and Raylib pretty similar experience except a lot of low level concerns.

  • @cursorop1716
    @cursorop1716 5 місяців тому

    at 1:33:00 if you divide self.scroll by 30 then the camera follow up will be slow . If you jump from high distance your player will fall first and camera wouldn't be able to follow up player , so divide it by 20 so no matter how high you jump the camera will follow up player in slow manner but without losing its track .

  • @ahakz3314
    @ahakz3314 7 місяців тому

    What do you use to create the blocks, clouds, etc

  • @arbitervildred8999
    @arbitervildred8999 8 місяців тому +1

    you can actually do something about that camera bug when it gets closer to it's target, I believe you can target more of a radius of 5-10 pixel from the player origins, so once it gets closer to the player it will stop trying to center it perfectly and avoid the bug (but of course, the player will be slightly offset by 5-ish pixels) OR when it gets to that 3-5 close pixels, suddenly speed the camera from 30 to 100 so it gets spot on in maximum 2 frames
    (about 1:35:50)

    • @khushankgalgat
      @khushankgalgat 5 місяців тому

      hey, can you please tell what camera bug are you talking about? i didnt understood what "choppy" movement sir is talking about? Please explain that bug in some detail..
      Thank You
      Have a nice day!

  • @peasantrobot
    @peasantrobot 10 місяців тому +1

    Thank you for this complete course! I will try to reproduce it in C language and raylib...

  • @moisesdepaulodias7980
    @moisesdepaulodias7980 7 місяців тому

    Hi, first of all, thanks for the tutorial!
    I have a simple question: This tutorial cover everything from your first tutorial series (Old Pygame Tutorial Series without OOP) or should I watch both?

    • @DaFluffyPotato
      @DaFluffyPotato  7 місяців тому +1

      It's most of the same stuff. Either would cover most of what you'd need. One has OOP and the other doesn't.

  • @4kumetsu
    @4kumetsu 9 місяців тому

    HOLY SHIT 6 HOUR FULL COURSE

  • @squirre1_m4ster22
    @squirre1_m4ster22 8 місяців тому +1

    how would we add our own assets? Also you are really good at programming and I really appreciate you making this video and so many others.

    • @DaFluffyPotato
      @DaFluffyPotato  8 місяців тому

      The same way you load in and use the assets provided with the tutorial. The only difference is that you have to make them now.

  • @AsifWest-wp5ke
    @AsifWest-wp5ke 9 місяців тому +1

    If i wanna run this game in my mobile phone how can i?
    am i gonna have to re adjust the frame size and responsiveness of the game to run on diffren size?

  • @TarunThakur-go4qg
    @TarunThakur-go4qg 9 місяців тому +1

    hello big fan i have created my own game
    thanks to you

  • @K5RTO
    @K5RTO 10 місяців тому +1

    youre a good man

  • @ragnarok_141
    @ragnarok_141 9 місяців тому

    It 's kinda hard to understand but im sure i'll get the hang of it.
    Nice tutorial Btw :).

  • @elishashmalo3731
    @elishashmalo3731 9 місяців тому +1

    Would you be interested in a colab? I absolutely love that you use pygame to make your projects. It’s the first graphics library I ever learned. I’m learning godot now just because I thought it would be fun. I think it would be interesting to see what a newb in godot could do vs what a pro in pygame could do.

  • @moisesdepaulodias7980
    @moisesdepaulodias7980 7 місяців тому

    Hi there, I have a question, I was testing the code from the part "02_images_input_collisions.zip", but I noticed that, even with one image and some rectangles (btw, i used the .convert() in the image) the FPS is kinda weird, like, the movement of the cloud is not smooth.
    if i take the cloud to the upper part and hold the down arrow, i can see some stutter, like if some frames was being skipped. I can also see that in your video.
    I dont know if i was clear enough. I tried to debug and i added a start_time = time.time() right after the while True and added a print(time.time() - start_time) right after the self.clock.tick(60), the expected result should be close to 0.01666, but sometimes it was printing 0.019, 0.020. Is this expected? I can see some of these stutters when you show your partial results, i dont know if this is intrinsec to pygame.

    • @DaFluffyPotato
      @DaFluffyPotato  7 місяців тому +1

      clock.tick() isn't perfect. It will always take slightly longer than it's supposed to and cause some jitter because of the display refresh rate. Typically it's better to use delta time and uncapped framerates, which I have another tutorial on.

  • @maikelvangrootel3843
    @maikelvangrootel3843 2 місяці тому +1

    Could someone help me with the following:
    When running after the 2:40:00 mark the tiles that are being placed are transparent instead of full? When I change the alpha of the current_tile_img the placed tiles are not transparent anymore. How can it be that this is not the case in the video.

  • @ChaosFleischer
    @ChaosFleischer 5 місяців тому

    Thanks for the nice Course

  • @yannickblum5348
    @yannickblum5348 7 місяців тому

    Awesome stuff, thanks a lot. I seem to have some inconsistency when dashing and killing enemies. Enemies sometimes don't die even though they should (I am well within distance where the if statement if abs(self.game.player.dashing >= 50): should be True, also no sparks), not sure where this could originate from, any ideas?

    • @DaFluffyPotato
      @DaFluffyPotato  7 місяців тому +1

      Test the reference code to see if the issue persists.

  • @56-ish
    @56-ish 8 місяців тому

    DaFluffyPotato = GOAT

  • @mike_jay
    @mike_jay 3 місяці тому +1

    Hi,thx for the tutorial. At the start there’s a cart racing game, I wondered if you have a series or video etc on writing that plz. Thx.

  • @skylerthacreator
    @skylerthacreator 8 місяців тому

    🔥🔥🔥

  • @ahmedabuharthieh579
    @ahmedabuharthieh579 9 місяців тому

    For the Autotile map, can you use a set so you wouldn’t have to worry about the order? i.e. condition = {(1, 0), (0, 1)}

    • @DaFluffyPotato
      @DaFluffyPotato  9 місяців тому +1

      Sets are mutable and can't be used as dictionary keys.

  • @00p11
    @00p11 8 місяців тому

    Thanks.

  • @mildanhali
    @mildanhali 10 місяців тому +1

    🥰Thank you very much sir. this video really helped me

  • @sekonder44
    @sekonder44 10 місяців тому +1

    savior