Python Platformer Tutorial | Animations, Sprites, Collisions, Jumping, Gravity...

  Рет қаралды 124,004

Tech With Tim

Tech With Tim

Күн бұрын

Пікірлер: 194
@TechWithTim
@TechWithTim 2 жыл бұрын
What are your favourite types of games to make in Python??
@specialx9856
@specialx9856 2 жыл бұрын
TopDown RPG
@tried5736
@tried5736 2 жыл бұрын
Thanks I really wanted to make a platformer game
@timon1816
@timon1816 2 жыл бұрын
sandbox and simulation
@madhupappala2577
@madhupappala2577 2 жыл бұрын
Rpg top down
@muhammadmz8791
@muhammadmz8791 2 жыл бұрын
first thank you a lot because of your tutorials then personally I came toward pygame after python tutorials, to learn how to program and more about python, then I will thank you a lot if you use all advance python topics in your pygame tutorials like decorators or multi-threading and processing and ... 🙏
@Rachinter
@Rachinter 2 жыл бұрын
This guy is pouring so much time into his videos to make it the best. Its absurd that these videos are not getting enough views. We should appreciate people like this. ❤️💯👍
@thoserandomshredders
@thoserandomshredders Жыл бұрын
As a beginner python coder: your tutorials help me so much. Keep making them!
@cjn9ne
@cjn9ne 2 жыл бұрын
This simply deserves way more views
@Ismail_Dagli
@Ismail_Dagli 2 жыл бұрын
Comment for the algorithm!
@emmang2010
@emmang2010 2 жыл бұрын
Comment
@srqubit9480
@srqubit9480 Жыл бұрын
For the algorithm!
@joshmaclean8206
@joshmaclean8206 Жыл бұрын
Hail the algorithm!
@eyeofcthulhu526
@eyeofcthulhu526 Жыл бұрын
@@____unknown_____ what 💀
@MrTactics26
@MrTactics26 2 жыл бұрын
I went back to school to learn Python. Loving it so far! Thanks for the hard work. Subbed.
@samanthaecotothermia7896
@samanthaecotothermia7896 2 жыл бұрын
Thanks so much for making these tutorials! I’m definitely one of those “monkey see monkey do” learners and these are incredibly helpful for me
@chesslife5640
@chesslife5640 2 жыл бұрын
Thank you for the tutorial Tim ! Its incredible how you manage to simplify problems so it is easy to follow and understand
@JeraWolfe
@JeraWolfe Жыл бұрын
27 Minutes in, you just explained how you need to do all this stuff upfront, before you can explain it, but the brilliant part of that thoughtful consideration of yours is that, I'm completely tracking, following along, and I have a pretty good idea of why you're doing it this way. When I tried an earlier simpler tutorial, I used 'gravity' and 'shift' and an update loop, but didn't yet figure out I needed to determine direction, and played around with animation states equivalent to your animation frames. Figuring it out on my own for the first time. So validating to see I was on the right path, and you just cleared all the confusing noise and brush from that path and now I'm speeding along. Thank you, Tim. Amazing, simply Amazing, tutorial.
@ArunManivannan
@ArunManivannan Жыл бұрын
Wow ! I managed to code along until the end. Fantastic content compressed into less than 2 hours ! Have taken away some points for further research. As always, thanks a lot for your time, Tim !
@Dice
@Dice 2 жыл бұрын
Great video, Tim!
@ArchonHimitsu
@ArchonHimitsu 2 жыл бұрын
I will work really hard to expand on your amazing game using the assets you provided!
@Vanukass
@Vanukass 2 жыл бұрын
Great tutorial! As a sort of beginner, this was still easy enough to follow. Though some things are still a bit lost on me, like how they actually work. Was thinking of going through most of the stuff in the code and trying to add comments describing what is going on to get a bettter grasp. Edit. my engrish sucks more than I thought
@MDonteMoore
@MDonteMoore 2 жыл бұрын
Thank you for another masterpiece.
@TechWithTim
@TechWithTim 2 жыл бұрын
Thanks for the comment!
@Dave-DIY
@Dave-DIY 2 жыл бұрын
For the algorithm and for my favorite coder on yt! Danke.
@shivenlak
@shivenlak Жыл бұрын
These videos are so underrated they help me so much and are so useful, please keep making them and never stop.
@Boogie-wi7hd
@Boogie-wi7hd 9 ай бұрын
Great vid bro! But I couldn't understand how the sprite creating works. I would love if anyone explained it to me in the comments section
@dommafia
@dommafia 2 ай бұрын
What a great tutorial, si much packed into a short video (all things considered)
@seanyB0123
@seanyB0123 10 ай бұрын
I'm 01:40 into this video, and I am freaking excited about this!!!! I have a really cool idea for a platformer and I'm hoping this will help me realise it :]
@GeikoTreyarch
@GeikoTreyarch 4 ай бұрын
I have a question: Where is the rest of the enemy sprites? I looked on github and could not find the spritesheet? Love your videos especially the pygame ones. Thumbs up and subscribed!
@emmang2010
@emmang2010 2 жыл бұрын
Amazing video as always!
2 жыл бұрын
Incredible tutorial! Thanks.
@mathew1855
@mathew1855 Жыл бұрын
Love the video man. I had so many questions I would looking for the answer to online and you helped me figure it all out. Great work, you're helping so many people.
@uno3688
@uno3688 Жыл бұрын
help why does mine get error on the draw(window, background, bg_image) part??
@danyalahmed3995
@danyalahmed3995 Жыл бұрын
@@uno3688 I also get an error when I try to add player, it says AttribueError:'Player' object has no Attribute 'draw' and I followed the video 100% up to that point
@uno3688
@uno3688 Жыл бұрын
@@danyalahmed3995 ty, another problem is that I don't use folders like his bcs I just downloaded one bg
@ankithg3101
@ankithg3101 Жыл бұрын
@@uno3688 you have to add ,player (after bg_image)
@bloxanim8444
@bloxanim8444 Жыл бұрын
I love this man I have watched all his python videos and his just amazing
@aunrizvi8063
@aunrizvi8063 Жыл бұрын
You are my favorite coding youtuber
@cotekokotrees1527
@cotekokotrees1527 Жыл бұрын
Thanks I have learned a lot of pygame watching and copying your video now I can create my own game
@smanzoli
@smanzoli Жыл бұрын
Thanks a lot! To continue, the best way to create (design) the levels for this exact game would be a csv file with the map, where each character translates to a sprite/tile... Because we need an easy way to place the blocks. Let's say a level has 200 x 10 blocks... so we need a csv file with 100 columns and 10 rows... import it and relate it to the tiles.
@arkie87
@arkie87 Жыл бұрын
35:11 FYI that is not how gravity/acceleration works. You are over complicating it. Gravity does not increase the velocity by more the longer it is falling. The acceleration is constant, meaning the velocity increases by a constant value each time step.
@Ashir1
@Ashir1 2 жыл бұрын
Hi tim i am from Pakistan and i follow you since last 1 year and your tutorial is good and i learn from many thing in python
@TheTeleportingProgrammer
@TheTeleportingProgrammer 2 жыл бұрын
You are my inspo!
@nikolaysavinov1891
@nikolaysavinov1891 Жыл бұрын
There is a very tricky bug in your code - running animation consists of jump phase and landing phase, and in jumping phase sprite collision detects that he is not touching block and start falling - increase Y position. Then in landing phase you get a collision just by change to next sprite, and this treated by X movement as a collision, and code doesn't change X position. This is easy to see, if you add delay when get X collision, and run left and right.
@blackpanda3405
@blackpanda3405 Жыл бұрын
yea if you spam jump button you will stay in air and even go up if you are fast and how do you fix it ?
@nikolaysavinov1891
@nikolaysavinov1891 Жыл бұрын
@@blackpanda3405 I've uploaded my version of this platformer on GH, user Nick507
@anuperera174
@anuperera174 7 ай бұрын
Thank u sm!
@samplaying4keeps
@samplaying4keeps 2 жыл бұрын
Hi Tim! Thanks so much for this I'm excited to get started on it. I was trying to download all the assets from the Github first and for the enemies there's a PNG that says "link on the project page" but I can't see to find that.
@daveruble5150
@daveruble5150 Жыл бұрын
I did it! typed the whole thing. Pretty neat.
@delltoid5980
@delltoid5980 Жыл бұрын
I’m really excited to try this!!!
@pietraderdetective8953
@pietraderdetective8953 2 жыл бұрын
Great work Tim! Any plan on doing some game project using Godot? Its syntax is really similar to Python..but the game engine is much more powerful than Pygame.
@3lite6am3r
@3lite6am3r Жыл бұрын
My man, you are a real one that saved my mind from disintegrating ❤
@CarloObrad
@CarloObrad 2 жыл бұрын
another amazing tutorial keep it up Tim!!!
@daveruble5150
@daveruble5150 Жыл бұрын
I'm stumped. Tim's backgrounds are working perfectly and my background remains black. when I click the ❌ to quit, my chosen background is revealed briefly as the window collapses. Its loading the correct image but isn't drawing until after I quit. EDIT! As I was writing out the 'problem' I got an inkling of the solution: I had the indentation fubar'd. tabbed the draw call right once and voila! Now I can continue! Tim moves around so well in the editor that it's critical for me to pay close attention as the indention isn't 2nd nature to me, yet.
@musicfan4952
@musicfan4952 Жыл бұрын
Okay so i did everything but for each block i make i have to copy and paste the line of code he showed so i was wondering if there's any less of a tedious way to make blocks.
@eurosat7
@eurosat7 Жыл бұрын
This is amazing for learning. Thank you for your time! :) I have a question: Is this the way code and classes are organized in python in general? I have 40k+ hours experience in php and am a technical lead. And for my taste this could use some cleaning.
@zGuii99z
@zGuii99z 2 жыл бұрын
You're awesome, thanks for your hard work!
@Confuciuss
@Confuciuss 2 жыл бұрын
will follow this tomorrow
@3dblendermodeler
@3dblendermodeler 7 ай бұрын
Excellent tutorial, could you add enemies in a next video?
@linsieharris7041
@linsieharris7041 Жыл бұрын
Glad I found this.
@-Barny
@-Barny 11 ай бұрын
Thank you very much for that video. Can I use that code and assets in my commercial project? Thank you
@dmkanz
@dmkanz Жыл бұрын
Great Video - quick question - where do you go to get the pngs for all the assests or how can i create my own?
@paulthomas1052
@paulthomas1052 2 жыл бұрын
Great intro and tutorial. Thanks so much :)
@TechWithTim
@TechWithTim 2 жыл бұрын
Glad you liked it!
@myJapanTV013
@myJapanTV013 2 жыл бұрын
Thanks a big fan! ***Humble request, please put tutorial for pytest as well 🙏
@Gilmore_Coding
@Gilmore_Coding Жыл бұрын
@TechWith Tim First off your amazing and have helped me learn a lot with python , but quick question in your def handle_vertical_collision you make a list with collided_objects but you never go back and reference the list would you be able to explain why, and what is the purpose off appending to the list ?
@Fahim_Uchiha416
@Fahim_Uchiha416 Жыл бұрын
Im currently getting a problem of type error module object is not callable. When i was creating the player i did everything same as 28:32
@Ivan-hj8li
@Ivan-hj8li Жыл бұрын
Insane brother
@punuravathsara
@punuravathsara 2 жыл бұрын
Very Nice Video 👍👍
@Mango-Fun
@Mango-Fun 10 ай бұрын
To all of the slow typers out there i feel you
@Goobersfrrrr
@Goobersfrrrr 2 жыл бұрын
Can you make a video on how to do more levels and how to add stuff in to the platformer
@TheBl4ckPe4rl
@TheBl4ckPe4rl 6 ай бұрын
Thank you friend
@Dump_FF
@Dump_FF 2 ай бұрын
Can I use the gif image in the back ground to make it more good???
@boolean0_046
@boolean0_046 2 жыл бұрын
GREAT JOB!!!!!!!!!!!!!!!!!
@SkyFly19853
@SkyFly19853 2 жыл бұрын
Could you make a tutorial on how to use Tilemap Editor with Python?
@atracom71slavyansk4
@atracom71slavyansk4 Жыл бұрын
Hello. I like your video. I think there is a bug in this program. When player is hitted doesn't work horizontal collide.
@tomcotom8
@tomcotom8 2 жыл бұрын
When I make my own sprite PNGs with Photoshop I keep getting error 'pygame.error: Unsupported image format' It works just with yours. How did you make them? What's the catch? Thanks
@tcgvsocg1458
@tcgvsocg1458 2 жыл бұрын
wow huge work
@saadedi75
@saadedi75 2 жыл бұрын
thanks for all video
@fanboieditz
@fanboieditz Жыл бұрын
How do you create multiple flames in your platformer, if I try to make a list just like blocks it gives me an error
@Oybekjon_Nuriddinov
@Oybekjon_Nuriddinov Жыл бұрын
Thank you for your interesting video. It is amazing. Can I translate it into my Uzbek language. It would be for those who don't know English. If you permit I will write who is the author of the video and from which channel it is taken. Can I do it?
@boxhead-zk7sn
@boxhead-zk7sn 8 ай бұрын
Pls if possible can you make tutorial or hint on how to make a level editor for this game🙏🙏🙏🙏🙏🙏🙏
@jtiguy9375
@jtiguy9375 Жыл бұрын
1:43:34 my program still tells me that the list index is out of range but my code is identical, anyone else have this problem?
@jtiguy9375
@jtiguy9375 Жыл бұрын
Now i can not collide with the top of the fire after drawing it now i have solved the issue.
@kenjik8736
@kenjik8736 Жыл бұрын
Hi I have a question, while moving the character and it staying in idle it bounces up and down. Is there a way to fix it?
@arnoldnyasetia4798
@arnoldnyasetia4798 Жыл бұрын
Big fan
@georgeenticknap4216
@georgeenticknap4216 2 жыл бұрын
great video and easy to follow!! I can not seem to find the link for all 20 enemies that are mentioned on an image in the asset folder? do you have the link for this?
@TechWithTim
@TechWithTim 2 жыл бұрын
It’s on the GitHub!
@eradboi
@eradboi Жыл бұрын
Good job
@nikratlehead
@nikratlehead 2 жыл бұрын
Top ! Thanks
@rip_f4kee
@rip_f4kee Жыл бұрын
classical tim, completely misspelling every text in the middle of a tutorial ☕
@justhamza_3344
@justhamza_3344 2 ай бұрын
did you create pix builder game for samsung smart tv
@avgrobloxanimator
@avgrobloxanimator Жыл бұрын
I am already getting errors at 31:57 which is stating the error: self.rect.x += dx TypeError: unsupported operand type(s) for +=: 'getset_descriptor' and 'int'
@stefano_er
@stefano_er 2 жыл бұрын
thanks!
@sofixfan_limlight
@sofixfan_limlight 2 жыл бұрын
your channel is pretty!
@johnpayne9265
@johnpayne9265 4 ай бұрын
I am getting unsupported image format error (using the provided png files) while creating the background (time 13:03) function (def get_background).
@tuckercomm
@tuckercomm 2 жыл бұрын
This will get 50 thousand views.
@TechWithTim
@TechWithTim 2 жыл бұрын
Let's hope!
@HenryTSBs
@HenryTSBs Жыл бұрын
I can't load background image because it said FileNotFoundError: No file 'assets\Background\Gray.png' found in working directory Pls help me on that. Thank you so much for your help
@MelinaSaaid
@MelinaSaaid 17 күн бұрын
how can i edit the background, characters and all that???
@Peachwarrior-f9r
@Peachwarrior-f9r Жыл бұрын
I love your videos. Can you make a pokemon game pls
@MelinaSaaid
@MelinaSaaid 17 күн бұрын
can i use Pycharn too?? instead of visual code
@jotaframo
@jotaframo Жыл бұрын
When scrolling the background my blocks move but the collisions don't detect it, any ideas?
@ondrasuchanek6467
@ondrasuchanek6467 Жыл бұрын
you have constant size of the window, but what if I need to set it differently for each level of the game? since "window" is parameter of the main function, I don't see any way how to change it inside main game loop :(
@noxiusphant9360
@noxiusphant9360 Жыл бұрын
Why doesn't my player flip but I don't get any errors in the code? tell me what's wrong please
@atarimae7718
@atarimae7718 Жыл бұрын
how can i make the background move with parallax effect? im new to programming and dont know much, Thankk you!
@sofixfan_limlight
@sofixfan_limlight 2 жыл бұрын
i love python!!!!!!!
@SkyFly19853
@SkyFly19853 2 жыл бұрын
Real Nice...
@lolducks
@lolducks Жыл бұрын
Hello, i was wondering is there a way to change how the player character looks?
@God_Bananna
@God_Bananna Жыл бұрын
How exactly do u change the sprites to our liking?
@MateuszBanach-eb3zl
@MateuszBanach-eb3zl Жыл бұрын
I'm just making my first pygame project and was wondering - can I create a separate class for a main loop? I saw someone's code written that way but then someone else advised me that it's not recommended.
@timchat9_my_teleqram_id
@timchat9_my_teleqram_id Жыл бұрын
Teleqram me 👆⬆️…
@trivu5022
@trivu5022 Жыл бұрын
i have a problem in line player=Player(100,100,50,50). it says that "pygame.sprite.Sprite.add() argument after * must be an iterable, not int" how to fix it
@mostlyLK
@mostlyLK Жыл бұрын
same! did u figure it out?
@Clendy321
@Clendy321 Жыл бұрын
hello, I fixed the error at the end of loading sprite sheets but still it couldnt load i tried saving but it still didnt work
@sahildas.
@sahildas. 11 ай бұрын
What should I use? Pink Man or Virtual Guy?
@sahildas.
@sahildas. 11 ай бұрын
Pink man chosen
@Melo-Mōng
@Melo-Mōng 2 ай бұрын
@@sahildas. That's my dude
@sahildas.
@sahildas. 2 ай бұрын
@@Melo-Mōng 👍
@Melo-Mōng
@Melo-Mōng 2 ай бұрын
@@sahildas. 👍🏻
@dip8
@dip8 Жыл бұрын
im at 32 something and the movement seems to stutter a lot, my pc isnt a potato as far as im aware
@shauryananda9905
@shauryananda9905 Жыл бұрын
[WinError 3] The system cannot find the path specified, this error is coming pls tell what to do
@lucasmontgomery1545
@lucasmontgomery1545 Жыл бұрын
you dont want to know how long it took trying to find the error when it did not work and the error turned out to be the english american spelling differences of grey/gray
@nancytran7336
@nancytran7336 Жыл бұрын
Hi! i need help. In the chapter loading & splitting sprite sheets i got the same Error: "self.sprite = self.SPRITES['idle_' + self.direction][0] KeyError: 'idle_left'". My def of moving in both direction are ok. have anyone an idea? i am a newbie and google don't help :D
@AGLegend-f2j
@AGLegend-f2j 7 ай бұрын
It says i got an invalid syntax on line 1. i typed in: import os
Make 2048 In Python | Full Python Game Tutorial
1:15:53
Tech With Tim
Рет қаралды 49 М.
Pygame in 90 Minutes - For Beginners
1:35:22
Tech With Tim
Рет қаралды 1,1 МЛН
ТВОИ РОДИТЕЛИ И ЧЕЛОВЕК ПАУК 😂#shorts
00:59
BATEK_OFFICIAL
Рет қаралды 6 МЛН
I made Games with Python for 10 Years...
28:52
DaFluffyPotato
Рет қаралды 367 М.
«Осень». Самая большая загадка Windows XP
14:36
Девять десятых
Рет қаралды 1,3 МЛН
How to STUDY so FAST it feels like CHEATING
8:03
The Angry Explainer
Рет қаралды 1,8 МЛН
Python / Pygame Tutorial: Animations with sprites
14:25
Clear Code
Рет қаралды 121 М.
Making a Game in Python with No Experience
5:57
Goodgis
Рет қаралды 1,7 МЛН
Pygame Tutorial - Creating Space Invaders
1:56:03
Tech With Tim
Рет қаралды 815 М.
Make Pong With Python!
1:12:42
Tech With Tim
Рет қаралды 117 М.
ТВОИ РОДИТЕЛИ И ЧЕЛОВЕК ПАУК 😂#shorts
00:59
BATEK_OFFICIAL
Рет қаралды 6 МЛН