PyGame Scrolling Shooter Game Beginner Tutorial in Python - PART 1 | Creating the Player
HTML-код
- Опубликовано: 2 дек 2024
- In this Python tutorial I code a Scrolling Shooter Game using the PyGame module. I'm going to cover the initial game setup and how to create the player
Code & assets on my website: codingwithruss....
Alternative link: github.com/rus...
Credits for assets used:
mtk.itch.io/gr...
erayzesen.itch...
secrethideout....
soundbible.com...
soundimage.org...
Check out my other PyGame tutorials:
Space Invaders coding tutorial: • Pygame Space Invaders ...
Flappy Bird coding tutorial: • PyGame Flappy Bird Beg...
Props to you for not only teaching people how to make an actually interesting game, but also taking an object-oriented approach right from the start. This really stands out from the crowd as a tutorial. I just hope the code isn't outdated by now with updates to python / pygame.
woah! this is by far the coolest and educational tutorials on pygame i've ever had! you're awesome! thanks a million!🤩😊
Thanks! Glad you liked it :)
y
Man I can't thank you enough for this tutorial series. I'm using the game logic as a foundation for my A level CS project but I've changed the player and enemy sprites and eventually when the enemy engages in a battle with enemies, im gonna make it so that the game loads up a CS Multiple choice question and some more jazz. I got 7 weeks left to code, document and submit it and this series is honestly gonna be a lifesaver. Thank you so very much.
howd it go mate
Following along with this series and adding my own ideas to my project as I go along. Already I can see that with the first video you are clear and concise when explaining difficult concepts, and you have really helped me so much. Thank you so much for posting quality content like this!
Thanks! I'm glad you're finding it useful. Hope to see a demo of your project when you finish it :)
Thank you so much my Guy!! this is awesome. Imagine a project like this would cost thousands of dollars to learn in post secondary institutions, but here we are, the universe has blessed us a Man that willingly share his knowledge for FREE to idiots like me to potentially make it in life. THANK YOU.
Haha thanks! Glad it helped
Never thought making a difficult game like that could be explained so easily, thanks a lot 😭♥️
Thanks! I'm glad it actually makes sense :D
This helped me so much!!! had some problems with using classes but you cleared it for me! you went right to the point and it is explanied so good! best tutorial ever!
Thanks! Much appreciated. I'm glad the videos are helpful :)
Great tutorial. Ill be following this series to make my own but Ill add some of my own ideas to my game. You are good at explaining whats going on and that makes it easy to follow. Thanks
Thanks, glad you find them useful!
BY FAR ONE OF THE BEST CHANNELS FOR PYTHON CONTENT, IF NOT THE GREATEST!
Thank you!
one of the best tutorials on pygame in yt
Thanks!
Part 2 uploaded, in which I add in keyboard controls to move the character: ruclips.net/video/7WsE1Vy1Krg/видео.html
The way you explain everything. perfect. thank you!
Thanks, glad to hear it!
Great video man. This is definitely the most educational pygame video i've ever seen. The way you explained OOP was perfect.
Thanks a lot! Glad you found it helpful
Great explanation, I understand all the small, big and hard concepts. This channel deserves more subscriber's. 😀
Thanks! Glad to hear it helped :)
This is fantastic!😃Looking forward to follow along.
Thank you!
I've seen you previous platformer, but this tutorial is even better!
Thank you for these tutorials!
Thanks, I worked on improving the previous platformer and added extra features to make this one
i love how you explain python basics like oop. i'm just getting started and the way you explain it and show how it works makes me understand it better than in my udemy course ^^
thanks and keep up the good work!
Thanks! Glad to hear it is making sense :)
Nice to see your channel growing. Great work
Fantastic! I always believe anything can be explained, if its explained correctly and you sir have nailed it! You have talked OOP, that can be quite complex, and explained it in a way that can be understood. I agree with all the other comments here. This tut is one of the best I have seen and is worth a sub alone, so I have. Thank you. :)
Thanks Tony! Glad to hear it :)
Awesome, love your tutorials. Cant wait to follow along with this one! Many thanks for sharing with us.
Glad you like them!
AMAZING! Thanks for the videos!!!
Glad you like them :)
Very cool tutorial. Thanks for sharing your knowledge! 👍
Thank you, glad it was useful!
This looks like a realy cool series! I'll do it later!
tysm for these tutorials
you explain these the absolute best and its so easy to understand
Thanks, glad you liked it!
Really enjoying it short burst of information easy to understand
Thanks, glad to hear you like it
Your absolutely awesome
You've explained oop in such easy!!!
Thank you :)
You make it sound like magic, but the achievable kind. Thank you so much for the tutorial !
Thanks a lot :) Glad you like it
Woah!!!!! One of the best tutorials ever on pygame THANK YOU VERY MUCH BROTHER ❤️
Thanks! Glad you liked it :)
Thank you SO MUCH!! I was having trouble with classes and you cleared it all up for me!
Glad it helped!
by far this is the most advance thing i coded but when you say it, it feels a lot easier
Glad to hear it's making sense. It's the most advanced thing I coded too 😅
you explain better than a person in a paid course
WOOOOOOW CANT WAIT FOR PART TWO
Cheers for the clear tutorial mate!
Glad you liked it! 👍
I'm a new student trying to learn, so I can become a programmer with python and I have a project on how to make a port scan.
So far I already make a port scan with Python3, and it scans fine, give a date and everything working good so far.
I see on your video tutorial, it is very good.
I would like to ask for your advice if you can and guide me on how I will add this 3
in a Python script, I have:
2. System should look for all the ports between the range of 1 to 1025
3. If the Ports is open, it should create a file and add an entry for port number
4. In case of any exception for instance “host is not available”, “host name could not be resolved” or
due to any other error, you need to write that exception into the same file.
Thank you and Merry Christmas.
Nice man. You know how to explain everything
Thanks! Glad it helped
good work and thank you so much, Greetings from Egypt
Glad you liked it!
So I am not doing the exact same things as you right now, I am making my own project with help of this one. So one question, you scaled up the image at 9:41 however I want to scale down my image. I thought you could use decimals like 0.5 however, this makes my lengths float values. So how would I do it?
Yea you have to be careful with that. You could use int() to turn the floats into integers.
Finally tutorial came out :)
Part 2 coming soon :)
@@CodingWithRuss Glad to hear that. Your tutorial helped me to make a game (it's like platformer and flappy bird)
You teach really gratifying ,your great waiting for your next vedios.
Thank you very much!
this is awesome ! Thanks Russ !
Thanks! Glad you liked it
What a tutorial!! Super!! Thanks a ton! Subbed immediately
Thank you! Glad you liked it
Woo!! Onto the next one.
This was my favourite game to make. It had a bunch of little features that I hadn't made before so it was fun to figure them out. Hope you like it too.
SO GOOD I DID THE WHOLE THING
Thanks, glad you enjoyed it :)
You're awesome, dude! Thank you very much!
Thanks! Glad you liked it
@@CodingWithRuss Did you read the book "Python crash course"?
I found it very useful, thank you.
Glad to hear that!
that needs more views
its help me learn pygame a lot
Glad to hear it!
thankyou dude, good job! I've learned a lot from you :D
Glad to hear it!
million wows. great tutorial .
Thank you :D
Fantastic Video till now!
Well looks like a found a new lil project to try!
Hope you like it!
Im so exited to make this thanks bro
Have fun! :)
This is amazing!
Thanks!
Love and huge respect for you brother....Respect from Pakistan...My online teachers....Much respect for you all....
Thank you! I'm glad the videos are useful :)
i am being your fan.great video
Thanks, glad you like them
Thanks 🙏
Welcome!
Having problems getting the character files into the code. i have them all in a file called player and when I enter their specific name it will not input that image?
you need to edit the file player onto the programming language you use
@@eliasbegashaw1707 What do you mean by that Can you plss explain me in detail I have everytime I put full path of images it's shows an error plss help 🙏🙏🙏
thanks mate tNice tutorials was a big help
No problem, glad it helped!
Sweet! I look forward to coding this. How often will these videos come out?
I'll aim to upload every 2-3 days
YOOOOOOOOOOO!!!!!!!!! AMAZING TUTORIALS AS ALWAYSS!!! 😎🤩😌
Glad you like them!
as someone who's spent the better part of a year coding to pep8 standards, your code annoys me
But otherwise, great video series. Loved following along and trying to keep up
wow this is so cool! How long did you spend making this set of videos?😃😃😃
Just subscribed. Amazing
Thank you!
i think im finally getting it thanks man if u ever do decide to put out a course im interested
Thanks, glad to hear you found it useful! And funnily enough, I do have a course :). There's a demo of it on this video plus the first 6 or so parts are free to view as a demo: ruclips.net/video/qSBmjSsscI4/видео.html
@@CodingWithRuss and again thank you
Awesome tutorial 😍
Thanks!
your explaination and the game is totally amazing🤩😊
can u give the link to download these images
or how to get these types of images
Thanks! Yes the images are on the github repo in the video description
great job bro!!!!
Thank you!
Hello there! I am here to learn pygame and i just noticed that you don;t have an icon. To do that just put the next code:
icon = pygame.display.image.load("imagename.png")
pygame.display.set_icon(icon)
Hey, I burned through your original platformer series last night and I decided to try to make something of my own. I have a quick question though, when I try to set my window, I keep getting a error that says "video system not initialized." I have double and triple checked my code and it is IDENTICAL to yours at the 04:12 timestamp in this video. Any thoughts? I've googled all over the place to no avail. Thanks for your time
Hi Lucas, I've had some weird errors like that too sometimes even though the code is the same that I've used on other games. Maybe download the code from the link in the description and see if that runs OK?
@@CodingWithRuss thanks for the reply, I finally figured it out. For some reason I overlooked the fact that pygame.QUIT needed a colon instead of an open parenthesis. I'm really enjoying building my first game and you're helping me out quite a lot. Thanks again!
don't give up!, there are more difficult programs then tNice tutorials one
thanks it's really good
Glad you liked it
Nice tutorial
Thanks
Amazing class!
how do you get python
Thank you very much sir. Clearly understand.
Sir please make the playlist for Super Mario game
Thanks! Glad you liked it. Super Mario would be pretty interesting to remake for sure!
Def:😁😁😁😁 class:💀💀💀💀💀💀
Thank you Russ all your awesome content walking us thru such cool Pygame builds, Hey Russ let's build Mario World 3 one these days the game engine and the level editor I want that game on MacBook so much the music the music baby Yoshi, are we allowed to build that game on RUclips w/o upsetting anyone?
That amazing I like it
Thank you!
is there any tutorial that teach how to import images cause i having problem with it
well explained 👍
Thanks!
I'm having a problem in the code, it says
AttributeError: 'Soldier' object has no attribute 'draw'
please help me fix this problem,
thank you.
ik this is 3 years later but if ‘Soldier’ is an image then it can’t have the attribute ‘draw’
You are awesome!
Thanks :)
❤️❤️❤️❤️❤️❤️❤️thank you so much
No problem 😊
Helped me alot thanks
what did u use to import images and where did u put the images?
Bro You are the best! but still why is your popularity so low? 😐😐☹☹
very good!
Thanks!
can you teach panda 3d too
cause you are the best game developer I know on youtube and
thanks for this amazing tutorial
What do I do with the assets
THANK YOU SO MUCH YOUR THE BEST I SUBSCRIBE 🙏🙏🙏🙏
Thank you, glad you like the tutorial! :)
i can't connect images to my work. how do i fix it.
line 15, in that is what pop up
thanks for all
You're welcome!
thanks helpful vid
Glad you liked it
Nice Video! Just one small problem. For line 15, I put in the same code (just with my own png), and it can't find the file. I also typed img = pygame.image.load('insert my png'), and it still can't find the png. Is there a way to troubleshoot?
you have to put all the images that you want to use in a file named 'img' , then you put that file into the projet file
@@andrewgilmore9181 Oh, now that makes sense :) Thanks!
it says FileNotFoundError: No such file or directory.
Thats amazing👏🏻👍🏼👍🏼 Will it run in VS Code ......?
Thanks! Yes, it doesn't matter which editor you use.
Dw bro ADHD helps out so much with soft soft i find. day dreaming always gives new ideas so when i snap back i got that vision ready
I'm gonna lose my mind, I've looked at hundreds of tutorials and explanations but I don't understand anything about the images one bit. Can you please explain to me how to do it. Thank you in advance!
when I import the file into pygame and use the pygame.image.load ('filename.png') it says "FileNotFoundError: No such file or directory" please help :)
@@ghettofilms2792 I think you need the file path ex. '/Users/user/Desktop/textures/png/Idle__001.png'
@@ghettofilms2792 listen you need to create a folder with your game script in python and in that folder you need to have your images and everything, after that before launching your game you need to type in the terminal cd "YOUR FOLDER PATH HERE" for example cd "assets/png.png" something like that. this will tell python to look at that folder
@@opst1x89 oh ok I’ll try that. Tysm :)
Did it work? If not, I always have my sprites in the same folder as my python file. This must work
Hi! I had a question about the image. I think you need the image for the character to already be saved, so where would I find this?
Hello, the images are all available to download from my github. I've linked it in the video description
Thanks :)
You're welcome :)