Get Started in Pygame in 10 minutes!

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

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

  • @CodingWithRuss
    @CodingWithRuss  8 หลายเดือนก่อน +39

    If you are getting an error like "no module named pygame" or "pip is not recognised", then there may be an issue with your python install. This short video shows how to fix those errors: th-cam.com/video/0x_MEKr0OJQ/w-d-xo.html

    • @confidenceart12
      @confidenceart12 7 หลายเดือนก่อน

      You haven't had your python run to paths

    • @pretzelshi
      @pretzelshi 2 หลายเดือนก่อน

      Whenever I run the command, nothing happens, not even text appears

  • @PyroProtato
    @PyroProtato ปีที่แล้ว +157

    Genuinely, you’re a lifesaver. I was stressing so much about the complexity of Pygame, but this tutorial gave me such a good start. Thanks!

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

      Glad it helped!

    • @ChrisMaster2
      @ChrisMaster2 11 หลายเดือนก่อน +4

      I've made FlapPy Bird, but it was from a sample. Now, I'm watching this video to truly learn.

    • @GirduzzYT
      @GirduzzYT 7 หลายเดือนก่อน +1

      I’m trying to make Tetris and you helped me a lot

  • @laura-vara
    @laura-vara 9 หลายเดือนก่อน +11

    I've been studying Data Analytics and been skipping Python so much to learn other things due to the Syllabus, and I really wanted to go back to learn more about the functionality of Python for other things. This tutorial made it fun, with concepts I am familiar with, but just focusing on other cool things we can do with Python. Thank you so much! It lightened my face and made my day.

  • @fumainc.4403
    @fumainc.4403 ปีที่แล้ว +73

    I can say as a beginner to pygame and pythoon as a whole. This was a easy tutorial to follow.

  • @erie969
    @erie969 9 วันที่ผ่านมา +2

    this is AMAZING !!!!! as someone with no experience i learned SO much SO quickly. this might be the best tutorial ive found

    • @CodingWithRuss
      @CodingWithRuss  9 วันที่ผ่านมา +1

      Thanks you! Glad you found it useful.

  • @drnazishimran
    @drnazishimran 4 หลายเดือนก่อน +18

    Thanks bro. I just learned Python and wanted to try out some graphics. Most videos are like 30-60 minutes and don't have clear explanations, but this video explains everything in a great way in just 10 minutes! Awesome video

    • @CodingWithRuss
      @CodingWithRuss  4 หลายเดือนก่อน +1

      Nice! Glad to hear it helped. I've got plenty of long tutorials too but this one gets you started quickly.

  • @giorgioclavelli1757
    @giorgioclavelli1757 19 วันที่ผ่านมา +3

    Very well done tutorial: short enough to keep your attention and very well explained! Liked and subscribed.

  • @theafro
    @theafro 11 หลายเดือนก่อน +12

    Brilliant! this is what a tutorial should be, neither over nor under-explaining. (and now I have a natty little red box on my screen and i'm going to make it eat things now!)

  • @aimeeh2079
    @aimeeh2079 4 หลายเดือนก่อน +7

    Oh my gosh I've been meaning to get into proper coding after Scratch and this is suchhh a good tutorial I'm so excited with the possibilities! Thank you Russ

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

    I started using Python for my work as a scientist and now I can also use if for my passion of games :D thank you alot for this introduction!

  • @Programm3r
    @Programm3r 10 วันที่ผ่านมา +1

    Been programming python for data analytics, didn't want to learn c# just to make a game for when I'm bored, but this tutorial helped a ton with understanding the library! Thanks!

    • @CodingWithRuss
      @CodingWithRuss  9 วันที่ผ่านมา

      Nice! Glad you liked it

  • @jpopperman9369
    @jpopperman9369 2 หลายเดือนก่อน +2

    It literally took me 10 minutes following this video. Thanks so much! What a confidence booster this was!

  • @Animalistic_
    @Animalistic_ ปีที่แล้ว +76

    Im following your platformer tutorials they are great!
    I started coding 9 daysa ago and they are easy to follow and awseome!
    at school we were learning about print('hello world') and its so cool seeing myself progress with your tutorials as you explain whats happening so im learning not just copying
    thanks you so so much your awsome

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

      That's great to hear! Glad you are enjoying the tutorials.

  • @m0th.shroommm
    @m0th.shroommm 10 หลายเดือนก่อน +6

    Dude, this was freaking fun. Thanks for the tutorial. It may look like it is from the Atari years, but the feeling of creating this is great!. Cheers!

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

      Thanks! Glad to hear you liked it

  • @NileshDarsan
    @NileshDarsan 6 หลายเดือนก่อน +2

    thanks, I needed to draw rectangles for a chart so I thought to use pygame and this is the only tutorial that is not an hour long, lifesaver

  • @CodingPiratesHillerod
    @CodingPiratesHillerod 11 หลายเดือนก่อน +13

    One of the best explanations of the needed basic elements to start a Pygame project. Thanks a bunch!

  • @garrettbodily
    @garrettbodily 2 หลายเดือนก่อน +2

    This is a great "Hello World" for pygame! Thank you!

  • @pastellamayday
    @pastellamayday ปีที่แล้ว +6

    tsym for this tutorial king :> the simplicity in the explanation helped a ton, finally gonna be able to make games with screens rather than pure text inputs T>T

  • @yvonnevarley6351
    @yvonnevarley6351 ปีที่แล้ว +7

    Hi, Russ!
    Thanks for this. FYI, in Thonny, you have to capitalise the True and False in the code for it to work.

  • @ethanforman9850
    @ethanforman9850 4 หลายเดือนก่อน

    this is great! just got started in python and this is literally the first video (of many) I've come across that performed exactly as you explained. and everything made sense! thank you.

  • @Master_Ed
    @Master_Ed ปีที่แล้ว +81

    personally I'd not use elif for the movement so you can move diagonally

    • @dminikkk
      @dminikkk ปีที่แล้ว +3

      How do you do it then?

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

      @@dminikkkyou could just do separate if statements for each directions

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

      Thanks this was so helpful

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

      ​@@pukeblo4382but that means moving diagonally is quicker than sideways

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

      ​@@dminikkkif up elif down
      if left elif right
      2 if statements and 2 else ifs

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

    Thank you so much, I was clicking video after video until I saw yours. Great work!

  • @Derpfulness
    @Derpfulness 2 หลายเดือนก่อน +1

    Thanks a ton for making this man, this boost me so far ahead in learning pygame

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

      Thanks! Glad it helped

  • @testAjitSNU
    @testAjitSNU 4 หลายเดือนก่อน +1

    What a simple concise tutorial. Loved it.

    • @ilikepissuwu
      @ilikepissuwu 4 หลายเดือนก่อน

      he's not gonna see you lil bro

  • @igoratagyan6664
    @igoratagyan6664 6 หลายเดือนก่อน +1

    Great tutorial, thank you very much! I played the final result for about 15 minutes!

  • @electricanimations6183
    @electricanimations6183 13 วันที่ผ่านมา

    2:50 If an error appears that says it cant find "__main__" module, you need to name your code file (the thing that you are inputting everything into right now) something like "main.py". Im not sure if it HAS to be called main, but it definitely needs the .py at the end.

  • @Max_AE
    @Max_AE 20 วันที่ผ่านมา +1

    Great Video! Very well explained!

  • @AB-rh5yq
    @AB-rh5yq 4 หลายเดือนก่อน

    This worked so well. I’m excited to code alongside your other videos

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

    Great tutorial. Perfect for peoples who never used pygame before what to know how to get started.

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

    Thank You, Altough It Will Still Take 2 Days To Revise, I Needed A Reasonably Good Tutorial. JUST What I Was Looking For!

  • @Thesportymouse973
    @Thesportymouse973 5 วันที่ผ่านมา +1

    hey russ just wanna ask how do you run the program like what do you click

  • @anartxx1583
    @anartxx1583 9 หลายเดือนก่อน +2

    Bro actually i am new in programming so i dont know much about it but when i use commands like
    Import , init etc
    It doesnt show the colour like purplish as it shows urs
    Plz help me out of this

  • @iwozz1044
    @iwozz1044 7 หลายเดือนก่อน +3

    I wanted to try pygame and this video helped me with understanding pygame. Thanks!

    • @blacklight6376
      @blacklight6376 27 วันที่ผ่านมา

      should I install Python 3.13.0 the latest version or 3.11.1 ??? I'm confused!!!

    • @iwozz1044
      @iwozz1044 26 วันที่ผ่านมา

      @@blacklight6376 pretty sure you should install latest

  • @vdBlogMaster
    @vdBlogMaster 6 หลายเดือนก่อน +1

    This is an amazing tutorial and great explanation! I can understand every line of the code and why it was written. Thank you so much!

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

      Thank you! Glad to hear it makes sense

  • @Acegamer1000-i1w
    @Acegamer1000-i1w 10 หลายเดือนก่อน +2

    I got stuck on the very beginning and got this error:
    RuntimeWarning: import threads: No module named 'pygame.threads'
    (ModuleNotFoundError: No module named 'pygame.threads')
    import pygame

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

      I also got an error saying
      [Errrno 2] No such file or directory: ‘ ‘[finished in 110ms]

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

    Hmm... I have PyGame installed, but when I try to run the code it says, "No module named 'pygame'".

    • @specktyplays4467
      @specktyplays4467 10 หลายเดือนก่อน

      try another code editor like notepad++

  • @mysterious_monolith_
    @mysterious_monolith_ ปีที่แล้ว +8

    I think you're the best teacher I've found. Thanks for this video.

  • @Camirritelecul
    @Camirritelecul 2 หลายเดือนก่อน +1

    How do I make the rectangle to go slower?

  • @shenfon01
    @shenfon01 3 หลายเดือนก่อน +1

    i am sorry to ask but when i type pygame.init,it said init was not in the pygames(AttributeError: partially initialized module 'pygame' has no attribute 'init' (most likely due to a circular import)),i want to know what happened?

  • @chloepudding
    @chloepudding 2 หลายเดือนก่อน +1

    Did anyone’s red square go completely off screen idk what I did but the s key works but other keys make it go fast off screen if that makes sense ?

  • @asherphoenix5584
    @asherphoenix5584 11 หลายเดือนก่อน +2

    mine keeps on not responding after i added the movement components. any clues what might be going on?

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

    great video, about to start trying to code a little game in python and this helped a lot! keep up the good work!!!

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

    when i try to install py game it says 'pip' is not recognized as an internal or external command,
    operable program or batch file. Do you know how to fix that. Thanks:)

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

      I've got a video covering just that :) th-cam.com/video/0x_MEKr0OJQ/w-d-xo.html

  • @captainoftheocarina
    @captainoftheocarina 9 หลายเดือนก่อน +1

    Why does my sublime not have any colored text and when you get to the rect leaving a trail the pygame program is closing

    • @Jacksonsprx
      @Jacksonsprx 8 หลายเดือนก่อน

      i have same issue

  • @levipennerMTB
    @levipennerMTB 9 หลายเดือนก่อน +1

    So I installed sublime text, and I wrote the code that was in the video, but all the text is just white, and not multicolored like in the video. How can I fix that?

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

      in the bottom right of sublime it should say "plain text" click that and then a menu should pop up, look for "python" and click that. that should make them change colour.

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

    Woooow, so much code for such a "simple" task . How the hell you got all that knowledge ! Thanks

  • @P0isonw0lf
    @P0isonw0lf 10 หลายเดือนก่อน +1

    Straight to the point and crystal clear, thanks alot !

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

    This was the best 101 I've found so far. You've got yourself a new subscriber.

  • @tubetimppa7071
    @tubetimppa7071 18 วันที่ผ่านมา

    amazing tutorial, super easy to follow and understand

  • @judelfenix1949
    @judelfenix1949 9 หลายเดือนก่อน +1

    brooo you're so goodddddddddd i understand all and now i can start project. thank you so much

  • @MJ-ly1cv
    @MJ-ly1cv 4 หลายเดือนก่อน +1

    thank you for the tutorial! i am in a (very) begginer state regards python, so some of the code's modules (i hope that's what they're called im so sorry 😭😭) are new to me and i thought i wasn't going to understand, but you explained it so well!! thank you very much :) i really wanted to try out making games, it seems fun

    • @CodingWithRuss
      @CodingWithRuss  4 หลายเดือนก่อน +2

      Thanks! I really wanted to make it easy to follow so I'm glad to hear it all made sense. Good luck with your game projects. Pygame is really flexible and you can make lots of different types of games with it.

  • @AmogusVR34
    @AmogusVR34 2 หลายเดือนก่อน +1

    Um i using a raspberrypi 5 but it is keeps saying "Traceback (most recent call last): file "/home/#####/skibidi app (game).py", line 13 if key[py.K_a] == True: IndentationError: unindent does not match any indentation level"

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

      It means the indentation in the code isn't right. Double check it to make sure it matches the code in the video

  • @jerrychandler7094
    @jerrychandler7094 ปีที่แล้ว +3

    I copied your code exactly, but all I get is a black screen. I have tried many things to fix the problem, even changing the screen to gray instead of black, but still it shows a black screen. No error warnings. Any thoughts?

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

      I had this same issue and also an issue where as soon as i would load the window it would tell me not responding. I had to go through the code with a fine toothed comb and realized somehow i left all the [pygame.k_*] lower cased k instead of capitals and for some reason didnt get an error code it would just crash the window but once i made the k capital it ran like a charm. you may have some issue like that in the code

  • @mrblock1318
    @mrblock1318 11 หลายเดือนก่อน +1

    Simple. Clear. Effective

  • @richardcornwell2151
    @richardcornwell2151 9 หลายเดือนก่อน +1

    I'm getting the following error, any suggestions?
    C:\Windows\System32>pip install pygame
    'pip' is not recognized as an internal or external command,
    operable program or batch file.

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

    When I open up the program after the code at 7:30 it does not show the red box till I close the program 😕😕😕

    • @Warlock_710
      @Warlock_710 11 หลายเดือนก่อน

      What probably happened is that your pygame.display.update is under the quit program
      I had that problem too. What helped me was to put a extra line with enter

  • @Crum27
    @Crum27 10 หลายเดือนก่อน +2

    i cant find where pygame was installed

    • @One-love_One-God_and_One-way
      @One-love_One-God_and_One-way 10 หลายเดือนก่อน

      Same. The only thing I have found online is if you open up the "cmd" window and type "pip install pygame" then if it's already installed it will show you a c: path to find it. Let me know if you figure it out.

    • @One-love_One-God_and_One-way
      @One-love_One-God_and_One-way 10 หลายเดือนก่อน

      Now that I'm looking at the tutorial I don't think you have to open pygame. I think you just import and int pygame as the first two lines of code.
      I think I'm not actually sure.

    • @ParticleAcceleratorgaming
      @ParticleAcceleratorgaming 4 หลายเดือนก่อน

      you have to open your code editor, pygame itself isn't an program
      I use pycharm, and typed exactly what he did and it asked me if I wanted to download the "PyGame" module
      So for short, PyGame is just a module and not an app.

  • @Hi.-_-
    @Hi.-_- ปีที่แล้ว +2

    Thanks! The Coding was easy, but when i press Ctrl+B my pygame window opens up and shows a black screen and then it shows not responding and gets closed. I am using sublime text editor. please help me with this.

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

      It's likely that your event handler isn't working correctly. Follow along with the video and you should get it to work

  • @g0obr
    @g0obr 5 วันที่ผ่านมา

    i got this error what do i do "AttributeError: module 'pygame' has no attribute 'init' (consider renaming 'c:\Users\\python\pygame.py' if it has the same name as a library you intended to import)"

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

    Glad to see you back!

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

      Thanks, it's been a while! You even changed your name :)

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

      @@CodingWithRuss it sure has been a while and yeah i changed my name :))

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

    Weird question, I seem to have followed everything exactly, but am not seeing the rectangle until right as I close the game... not sure where I went wrong

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

      In these cases it's usually a small typo or missed indentation somewhere. Maybe your screen.flip() is outside the main game loop? Double check the code and see if you can track the issue.

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

      @@CodingWithRuss thanks so much for your reply! Still trying to track down the issue, but running into the game just crashing every time I try to play it, even though there's still no rectangle. I'm going to keep at it though!

  • @soopyrmuan
    @soopyrmuan 3 หลายเดือนก่อน +1

    can i ask why
    "run = True
    while run:"
    is used over just "while True"?

    • @CodingWithRuss
      @CodingWithRuss  3 หลายเดือนก่อน +1

      It's just my preference. It was how I learned it when I first started with pygame but either method works fine.

    • @soopyrmuan
      @soopyrmuan 3 หลายเดือนก่อน

      @@CodingWithRuss thanks

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

    HELP: 2:53 "The game window flashed for a second"
    my code:
    *import pygame
    pygame.init()
    SCREEN_WIDTH = 800
    SCREEN_HEIGHT = 600
    screen = pygame.display.set_mode((SCREEN_WIDTH, SCREEN_HEIGHT))
    run = True
    WHILE run:*
    it says "can't find '__main__' module in 'C:\\Program Files\\Sublime Text 3'
    [Finished in 86ms]" and continuing onto further steps doesn't work.
    It's not your problem but help a brother out

  • @justcallmespike5162
    @justcallmespike5162 7 หลายเดือนก่อน

    I am attempting to code the rectangle movement, but I can only press one directional button each time I run it, and then it goes to the edge of the screen and doesn't move if I try to press another one.

  • @BrokenBattle
    @BrokenBattle 8 หลายเดือนก่อน

    The elif statement prevents it from going diagonal I suggest just doing an if statement

  • @IdoM9-zd5oi
    @IdoM9-zd5oi 9 หลายเดือนก่อน +1

    why on the W key its (0, -1) and not (0, 1)?

    • @CodingWithRuss
      @CodingWithRuss  9 หลายเดือนก่อน +2

      Y coordinate in pygame increases as you move down the screen. It starts as 0 at the top edge, so to move up you have to do reduce the y coordinate, and you end up with (0, -1)

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

      @@CodingWithRuss that's so weird tho, why is it different than the normal cartesian plane?

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

    do you know how to move up right using the keys w and d at the same time like tboi

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

    Now do i open the game Window like you do for checking if it's working?

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

      Depends on your editor but in sublime text I use CTRL+B

  • @meiscoolbutmo
    @meiscoolbutmo 2 หลายเดือนก่อน

    I don't have any problems with this. For me this works really well and it's super cool i think

  • @enigma6925
    @enigma6925 3 หลายเดือนก่อน +1

    Thanks, Great tutorial, easy to follow and works great, I'm running on Windows 11 using Geany 🙂

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

      Nice! Glad to hear it :)

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

    What’s your opinion on pygame2 vs pygame zero vs arcade, from the perspective of an experienced python developer? Should I just go for pygame2 or are the other two worth using?

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

      I've never used pygame zero but I played about with arcade a bit and that was quite cool. It does some of the work for you in terms of collision handling etc so you can get up and running faster. Overall though pygame is the more established of those, the documentation is decent and there's more tutorials and online support so it's probably the best one to begin with. It's not a huge time investment to try out each one though, so once you get a feel for one of them, you could try making a simple game in all three to see which you prefer.

  • @7-N0B0DY
    @7-N0B0DY 3 หลายเดือนก่อน

    Hi so this a rlly good video but I need one piece of help, whenever I run the text and use WASD to move the red square around it just teleports to place by place not moved and flows like yours any ideas how to fix

  • @zoundart
    @zoundart 7 หลายเดือนก่อน +1

    Thanks - great video! Is there a follow up, part two etc?

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

      After this video it makes sense to jump into some small projects, so I've got tutorials for tic tac toe, snake etc that take what is in this video and build on it into a game.

  • @JosiahBang
    @JosiahBang 7 หลายเดือนก่อน +1

    import pygame
    pygame.init()
    SCREEN_WIDTH = 800
    SCREEN_HEIGHT = 600
    screen = pygame.display.set_mode((SCREEN_WIDTH, SCREEN_HEIGHT))
    gives me: AttributeError: partially initialized module 'pygame' has no attribute 'init' (most likely due to a circular import)
    i have windows 11, python and pygame both installed, plz help

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

    this code doesn't work with python3 it gives me an indentation error on line 13 and i cant fix it i dont know what is going on here but if anyone can help id appreciate it greatly

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

    Could you use a bigger font size or zoom, at least in the beginning , with the first page of code, or with the command prompt. 🙂

  • @johnmichaelcasila8317
    @johnmichaelcasila8317 9 หลายเดือนก่อน +1

    Why was "w" set to (0,-1)? Shouldn't it be (0,1)?

    • @ULTIMATES99
      @ULTIMATES99 8 หลายเดือนก่อน

      I have the same question, I actually set the code to (0,1) and the rectangle started moving downwards when I pressed the W key.

    • @ParticleAcceleratorgaming
      @ParticleAcceleratorgaming 4 หลายเดือนก่อน

      It is because then it would be inverted in the wrong direction
      -1 is up, 1 is down, so (0, -1) is up.

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

    i have the same setup but when i compile from sublime nothinghappens

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

      What does it say in the console at the bottom of the screen? Do you use "Tools" then "Build" to run it? You may need to use "Build With" and make sure to choose a python installation

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

    Hello, I get the window to open and vscode shows no issue, but the window keeps loading and if I click it it turns white and stops responding until it crashes, any help?

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

    im a little confused on how you made the commands become commands in sublime. i have it downloaded, but my words arent coloured like that and it feels imprtant lol

  • @CrimsonGrowlithe
    @CrimsonGrowlithe 2 หลายเดือนก่อน

    I can’t open the programmed window. When I boot it, it just says “[Finished in 110ms]” on the lower console.

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

      You must be missing the loop or have a typo in it because it means the loop isn't running and the code goes to the end

  • @Acceleration299
    @Acceleration299 8 หลายเดือนก่อน

    i tried the install pygame command but all it said was "pip is not recognized as a internal or external command, operable program or batch file." how do i fix this?

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

      I have a short video that explains how to fix that error here: th-cam.com/video/0x_MEKr0OJQ/w-d-xo.html

  • @rob2701ful
    @rob2701ful 6 หลายเดือนก่อน

    I have an issue when I run the program it is fine until I enter the code for movement control then it freezes and crashes please can anyone help?

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

    Thank You so Much! This Helped Me Improve My Python Skills a Lot!

  • @x7r45HM4Nx
    @x7r45HM4Nx 11 หลายเดือนก่อน

    I created the window and I can move it around, but the window doesn't close when hitting X.
    I followed the code exact up to that point. Any reason why that would happen?

  • @otakuuu1710
    @otakuuu1710 7 หลายเดือนก่อน

    the explanation is very clear. but i still had a problem with displaying the red cube correctly. it only showed once i closed the window. i moved the pygame.display.update() to a different place , under the line pygame.draw.rect() and now it seems to work. i don't know why that happened..

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

    can make the key inputs random because im making a car simulator and this could simplify it a ton by using import random for npc ???......

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

      For that you don't actually need key inputs since it isn't controlled by the player. You can just randomly generate the variables in your code to control the NPC car.

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

      @@CodingWithRuss thx

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

      Also could there be a way to make them go In a specific path ?

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

      Like to not turn left if there is a wall there like collision detection ?

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

    7:27 MY SCREEN CRASHED HOW DO I FIX

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

      try to restart ur software
      and check indents

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

    this tutorial is great but i cant get the sublime text editor to run the code

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

    hello i did exactly what you showed but it said "can't find '__main__' module in 'C:\\Program Files\\Sublime Text' "

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

      pls help

  • @garnet4945
    @garnet4945 18 วันที่ผ่านมา

    Why is the y coordinate for W a negative 1?

    • @learnwithswadesh
      @learnwithswadesh 7 วันที่ผ่านมา

      Because in python the origin is the top left corner. That means the x coordinate is the distance from the left side and the y coordinate is the distance from the top

  • @LMGstudios-qp3ld
    @LMGstudios-qp3ld 11 หลายเดือนก่อน

    THANK YOU SO MUCH now i can start my dream job because of you😄

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

    Hello folks! Visit codingwithruss.com/tutorial/getting-started to get the code and a quick reference of what was covered in this video.

  • @OliverLundevall
    @OliverLundevall 6 หลายเดือนก่อน

    Where do you press to run the code? IK this is a stupid question but idk how to

  • @Zenlayne
    @Zenlayne 2 หลายเดือนก่อน

    Epic tutorial, just what I needed

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

    Hello, im not to sure when you say to run the code i don't where to click to run the code?
    also, when i type it doesn't show the colours or even the "other alternative words". what im i doing wrong? thank you

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

      in the bottom right of sublime it should say "plain text" click that and then a menu should pop up, look for "python" and click that. that should make them change colour.
      to run the code go to tools in the top left then hit build system then hit python, to run it hit ctrl + b

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

    Can anyone explain the difference between Import pygame and using pygame.init() method. What exactly is being initialized?

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

      import pygame just makes the module available to the python interpreter, pygame.init() actually initializes the module

    • @ParticleAcceleratorgaming
      @ParticleAcceleratorgaming 4 หลายเดือนก่อน

      the pygame import module is being initialized

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

    I am having issues running the software. It's trying to reach images from my C: Drive, but I am using my E: drive for coding.

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

    very nice
    thank you for sharing your knowledge
    (also have to say, as someone who's spent far too long being tortured by c++ build systems, python is a nice change; yeah, yeah, performance will be an issue many times but for what i'm trying to do python's just fine - thanks again)

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

    im just confused on how to come up with this on my own. like all the (()) and : , . how do i even know what to type? i can follow your steps and basically cope and paste but how do i understand what to write?