4:10:47 Thanks for this, I thought IfElse was the only thing available here in Python: mood = "focused" match mood: case "focused": print("I am focused") case "resting": print("I am resting") case _: print("I am tired")
In creating the fruit graphic, the picture takes over great part of the screen and not only the cell size, i wrote the code exactly the same. What can be the problem? *Sorry for my lack of english. Edit: i fixed it with: apple = pygame.transform.scale(apple, (cell_size,cell_size))
PyGame is very similar to some features of the Godot game engine, or vice versa :). The only difference is that there is a lot of manual work compared to Godot, although PyGame includes some techniques to make the game easier to create. But... By programming the entire game by hand, I began to understand more about how the game works, how collisions and movements work, how textures are loaded and much, much, much more. Thank you so much for such a wonderful lesson! PS. My player still falls through the platform as it moves down. I looked at your code, but didn’t find any differences (maybe I didn’t look well :) ).
really amazing, the best tutorial I've ever seen.thanks, Christian. but I want to mention a small bug, when I'm running the game in a not full screen window, of course in the playing level mode, if I try to move the window, the game would turn into a sky mode, only the player with the sea, no other objects. it seems the player has fallen down in loop. can you found out whats the problem? thanks
Hi, im watch this video and doing the tutorial at the same time to understand better and memories all the stuff I can I'm on python 3.12, im at 17:20 and the program don't close is it normal ? thanks
Is there any advantage to using sys.exit() to exit the while loop, rather than using a boolean 'running' variable like in the following? running = True while running: for event in pygame.event.get(): if event.type == event.QUIT: pygame.quit() running = False
Hi Clear Code, I’ve followed your Monster Battle one so far - but I’m encountering issue with functions that seemingly don’t exist in my pygame? I’ve uninstalled and installed pygame 2.5.2 but still have issues. Issues were with: get_frect() (I’ve had to use get_rect) Also pygame.key.get_just_pressed() causes and error. The alternative “get_pressed()” works but the menu messes up. Is there something I’m missing? Perhaps incorrect pygame version ? Any help would be great thank you!
I tried to import one of those png with multiple images inside it and when i import it it is all clumped together in a 64 x 64 tile size. How do i work around that.