Pygame Side-Scroller Tutorial #1 - Scrolling Background/Character Movement

  Рет қаралды 84,542

Tech With Tim

Tech With Tim

Күн бұрын

Пікірлер: 84
@gorgestboi1028
@gorgestboi1028 6 жыл бұрын
First :)
@louzynerd129
@louzynerd129 4 жыл бұрын
how can i fix this error when i run the game after 30 seconds or so it crashes and says this: TypeError: invalid destination position for blit
@SM-ht7qf
@SM-ht7qf 6 жыл бұрын
The first pygame side scroller tutorial on KZbin.
@louzynerd129
@louzynerd129 4 жыл бұрын
how can i fix this error when i run the game after 30 seconds or so it crashes and says this: TypeError: invalid destination position for blit
@SM-ht7qf
@SM-ht7qf 4 жыл бұрын
yousuf alshaikhli drive.google.com/drive/folders/15VWtoKZqIr-FjUbloZ-OjZojU03VFDJF I dont know but here is super mario world i made in pygame
@SpencerA99
@SpencerA99 5 жыл бұрын
Thank you for this! Very easy and simple tutorial to follow, even if you do not use the given source code. Much appreciated
@taufiqidr
@taufiqidr 6 жыл бұрын
thank you, I think I'm gonna modify this game into chrome's dinosaur game
@adeoyeoladipupoibrahim3066
@adeoyeoladipupoibrahim3066 4 жыл бұрын
Exactly what I came here for
@hmrocky45
@hmrocky45 4 жыл бұрын
True
@lavinabhambra7611
@lavinabhambra7611 6 жыл бұрын
Great video as always! Would love to see the starting file explained in more detail at the start
@tugdual4639
@tugdual4639 6 жыл бұрын
Thank you for those multiple tutorial, that help us a lot :)
@unisloth
@unisloth 6 жыл бұрын
but is increasing the clock really the best solution to increase the speed of the background image and of the animations of the runner? I thought that by increasing the clock speed the fps cap increases too, and it would not really make much sense to run the game at 30fps in the beginning and at 120fps+ later, right? we should have a stable fps rate of like 60, not connected to the current speed of the game.
@GeeWillikersMan
@GeeWillikersMan 6 жыл бұрын
Mirror the first background about the y axis. That will smooth that transition.
@madMaxXXX999
@madMaxXXX999 3 жыл бұрын
How do we blit a text that flashes/blinks in Pygame? BTW, love your tutorials Tim! Muchos gracias :)
@infogeekoficial351
@infogeekoficial351 5 жыл бұрын
great video, helped me a lot
@gorgestboi1028
@gorgestboi1028 6 жыл бұрын
That is a really smart idea 👍
@TechWithTim
@TechWithTim 6 жыл бұрын
Thanks! Hey I made some changes to the github, make sure you download the newest version :)
@gorgestboi1028
@gorgestboi1028 6 жыл бұрын
Tech With Tim I’ll be sure too!
@avvn9331
@avvn9331 6 жыл бұрын
thanks for the starter file :), another great tutorial and thanks a ton for the tutorial
@roni5245
@roni5245 3 жыл бұрын
Tim, where do you get all these sprites? I want to make games with sprites of my own, but I don't know where to find them
@dre-o6j
@dre-o6j 6 жыл бұрын
My screen speeds up once, and after that it stays the same speed. Any Help would be appreciated.
@louzynerd129
@louzynerd129 4 жыл бұрын
AttributeError: 'builtin_function_or_method' object has no attribute 'get_width' when i run the program at 9:03 this occurs, what do i do?
@Paul-rd5zk
@Paul-rd5zk 5 жыл бұрын
can u please do a tutorial on how to set up just the scrolling background please
@alok7485
@alok7485 6 жыл бұрын
please provide basic understanding of various levels of Mario and AngryBird game ..how to make levels in game, How to increase the difficulty levels in python and pygame and how to perform motions and how to perform attack and swords and usage of riffles ,guns attacks and how to update health status and armour in PYthon
@TechWithTim
@TechWithTim 6 жыл бұрын
Sounds like you need to go to a college program for game development my friend.
@alok7485
@alok7485 6 жыл бұрын
dear sir you explain in a very lucid manner and i adore you , i worship you ...you teach in the best possible manner..i request you to please update more pygame videos please i beg you
@tanishqchandra2719
@tanishqchandra2719 5 жыл бұрын
@@TechWithTim No really!! even if you will hint how to do these, it would really be so much helpful regards
@thomasnicholson2989
@thomasnicholson2989 5 жыл бұрын
my character is too slow how can i fix it?
@floydian25
@floydian25 5 жыл бұрын
Tim there seems to be a problem while loading the images. I followed your pygame tutorials but this is causing some problem. please help
@abdelrahmanrashwan1312
@abdelrahmanrashwan1312 4 жыл бұрын
put them in a folder called images and it will work
@nirantarajade3379
@nirantarajade3379 4 жыл бұрын
Hey Tim, im having problems with the pictures its not working for some reason. It gives ana error saying cant open image
@louzynerd129
@louzynerd129 4 жыл бұрын
how can i fix this error when i run the game after 30 seconds or so it crashes and says this: TypeError: invalid destination position for blit
@sgefanatic5824
@sgefanatic5824 5 жыл бұрын
how did you get all the different images
@ranianew7699
@ranianew7699 3 жыл бұрын
please! where can I get images for my game?
@sankethb.k642
@sankethb.k642 6 жыл бұрын
Thank you
@patentcomic1971
@patentcomic1971 3 жыл бұрын
Hey so im a new coder i just started this new hobby about 2 months and never really started to do this out side of class but this looks really cool to start doing out on my free time is there any tips that you could possible give me
@ibr55
@ibr55 5 жыл бұрын
hey tim I got this error line 13, in bg = pygame.image.load(os.path.join('images','bg.png')).convert() pygame.error: Couldn't open images\bg.png I tried to fix it but I could not
@floydian25
@floydian25 5 жыл бұрын
Put all the images in the same directory/folder with your python file. Everything should be in the same folder or it won't work. If you're still confused see his pygame tutorial series. Hope this helps
@dhairyshrivastava988
@dhairyshrivastava988 5 жыл бұрын
@@floydian25 well mine is in same directory
@RANKKY9
@RANKKY9 4 жыл бұрын
@@dhairyshrivastava988 You can't run the .py file from some editors like Atom. Use the comand prompt to run the .py file
@suzuuschannel4671
@suzuuschannel4671 4 жыл бұрын
Brother I also tried but it won't work
@suzuuschannel4671
@suzuuschannel4671 4 жыл бұрын
Please. Fix this issue tim
@MadaraUchiha-dw9jl
@MadaraUchiha-dw9jl 4 жыл бұрын
Can anyone help me with setting up a background like mario I mean i need a side scrolling but dont want the char. Running in a single direction
@gabestewart2810
@gabestewart2810 4 жыл бұрын
RojoPanda wow uhh you seem to be pretty knowledgeable when it comes to coding anyways could you help me with a problem .My problem is that it says bgX is not defined
@scoopydevy
@scoopydevy 4 жыл бұрын
where do you get these sprites
@louzynerd129
@louzynerd129 4 жыл бұрын
how can i fix this error when i run the game after 30 seconds or so it crashes and says this: TypeError: invalid destination position for blit
@sksahil4374
@sksahil4374 4 жыл бұрын
Is Python is good for game development ?
@chuckchen2851
@chuckchen2851 4 жыл бұрын
Does anyone get this: "Unable to obtain graphics context for NSWindow (Mojave behavior)"?
@zacgreene8283
@zacgreene8283 5 жыл бұрын
Help, I just get the error: ‘TypeError: unsupported operant type(s) for -=: ‘Pygame.Surface’ and ‘float’ regarding bgX -= 1.4 and bgX2 -= 1.4
@jumanshackelford4998
@jumanshackelford4998 6 жыл бұрын
I have downloaded side_scrolls and press starter file and a screen pop up but it does not put me into a Python ildle file as I see you are in. There must be some wrong with me understanding the steps that u have demonstrated
@TechWithTim
@TechWithTim 6 жыл бұрын
Just open IDLE then click open from the file menu and select the file.
@jumanshackelford4998
@jumanshackelford4998 6 жыл бұрын
Tech With Tim I would like to thank you that made it so easy. My next question is what do I do with the other images that you sent me. I still do not fully understand the concept of putting them into the same directory file as Python. But I do appreciate your patience.
@jumanshackelford4998
@jumanshackelford4998 6 жыл бұрын
I would like to thank you because I just figured out how to put my images into the same directory as my Python folder.
@hmrocky45
@hmrocky45 4 жыл бұрын
How do I create some sprites by myself?
@hakyt8746
@hakyt8746 5 жыл бұрын
its giving an error can't open bg.png
@shubhangagrawal4401
@shubhangagrawal4401 4 жыл бұрын
Remove "os.path.join" simply keep pygame.image.load('path', 'image_name')
@RANKKY9
@RANKKY9 4 жыл бұрын
You can't run the .py file from some editors like Atom. Use the comand prompt to run the .py file
@ScroatyDontKnow
@ScroatyDontKnow 4 жыл бұрын
Is anyone else getting a slightly jittery background every often? My background scrolls across the screen occasionally gets a weird rolling line go down it, kinda like a rolling shutter. Is there something I need to change or is it just my machine?
@sameerashajeem5979
@sameerashajeem5979 2 жыл бұрын
It happened to me too I can't find a fix
@mdammar9265
@mdammar9265 4 жыл бұрын
instead of using 64 by 64 why dont you use pygame.image.get_width() and height respectively i mean that would reduce the unnecessary sixe especially if you more characters since they are sprites and the image and height although can be altered afterwards
@kemiscape
@kemiscape 5 жыл бұрын
How can i make the player's jump speed and slide speed into a stable vel? like it's not increasing the speed. :(
@marishwarannadar5323
@marishwarannadar5323 6 жыл бұрын
USEREVENT not defined error occured help me
@sidharthnair7775
@sidharthnair7775 6 жыл бұрын
Me too. Help needed Tim!
@awsumturtle
@awsumturtle 5 жыл бұрын
Did you include it in the While Run?
@tanishqchandra2719
@tanishqchandra2719 5 жыл бұрын
I was getting the same problem ... have you imported all modules from pygame.locals ? as... from pygame.locals import *
@sairajsatawase7481
@sairajsatawase7481 5 жыл бұрын
i got the error(ModuleNotFoundError: No module named 'pygame.color') how can i solve that/
@mohammedaashirjameel
@mohammedaashirjameel 4 жыл бұрын
sairaj satawase I have the same problem
@mohammedaashirjameel
@mohammedaashirjameel 4 жыл бұрын
sairaj satawase did you manage to fix it?
@dhairyshrivastava988
@dhairyshrivastava988 5 жыл бұрын
It shows no errors and yet the screen is blank
@yamom...5918
@yamom...5918 5 жыл бұрын
I couldn’t get it to work
@trishmorrison2529
@trishmorrison2529 5 жыл бұрын
Me either I couldn't figure how to put the image on to python once I downloaded the zip.
@yamom...5918
@yamom...5918 5 жыл бұрын
☺☺☺☺☺☺☺☺☺
@tanishqchandra2719
@tanishqchandra2719 5 жыл бұрын
hey Tim, whats up! can u help me find some free sprites for my own game by suggesting any website or source? Thank you for your great videos that help me so much to learn python...
@amanihussain5789
@amanihussain5789 4 жыл бұрын
Guys this sounds really stupid but can someone explain how the pygame and sprites should be saved as bc its not working for me :(((((
@charliefelix9326
@charliefelix9326 5 жыл бұрын
Which version of python are you using? Thanks! And where could I find other characters?
@pythonicperson7216
@pythonicperson7216 4 жыл бұрын
he is using python 3.6.2, and to find other characters probably go to a sprite sheet or something.
@scoopydevy
@scoopydevy 4 жыл бұрын
ive got aproblem
Pygame Side-Scroller Tutorial #2 - Random Object Generation
19:21
Tech With Tim
Рет қаралды 22 М.
Scrolling Backgrounds in Pygame
7:53
Paget Teaches...
Рет қаралды 86 М.
Арыстанның айқасы, Тәуіржанның шайқасы!
25:51
QosLike / ҚосЛайк / Косылайық
Рет қаралды 700 М.
How Strong Is Tape?
00:24
Stokes Twins
Рет қаралды 96 МЛН
Python Pygame Tutorial - Scrolling Background With Player
13:51
code.Pylet
Рет қаралды 28 М.
2 YEARS of PYTHON Game Development in 5 Minutes!
4:54
Coding With Russ
Рет қаралды 993 М.
How To PLAN your Game as a Solo Developer
16:26
Heartbeast
Рет қаралды 530 М.
Super Mario Bros with Python and Pygame
7:37
Justin Armstrong
Рет қаралды 437 М.
How to Convert any Python File to .EXE
8:24
Tech With Tim
Рет қаралды 1,8 МЛН
But what is a neural network? | Deep learning chapter 1
18:40
3Blue1Brown
Рет қаралды 18 МЛН
Easy Way to Make Jumping in PyGame! (7 Mins)
7:24
baraltech
Рет қаралды 35 М.
Арыстанның айқасы, Тәуіржанның шайқасы!
25:51
QosLike / ҚосЛайк / Косылайық
Рет қаралды 700 М.