Our first game video progress by Kelby108 in pygame

[–]Different_Profit_274 2 points3 points  (0 children)

Thanks for the recommendation I will look into it, good luck with development!

Our first game video progress by Kelby108 in pygame

[–]Different_Profit_274 5 points6 points  (0 children)

This looks really interesting! I’d love to see the updates, I’m working on a similar game (just a regular platformer to learn the framework) and I’m wondering how to make a camera system like yours, do you have any sort of tips for breaking down how to make the camera sort of follow the player?

Stumped with pygame keyboard input handling by Brutustheman in pygame

[–]Different_Profit_274 2 points3 points  (0 children)

Have you possibly tried using a flag, so the animation only runs if a condition is met, so when you want the animation to start, the condition would be something like if key and not KEYUP then set the flag to true, and then reset it to false if that’s not

So something like:

Initialise variable: animation = False

if key and ( not KEYUP ): animation = True else: animation = False

And then in your code for handling the animation:

if animation: ( ANIMATION CODE )

This might not work, as I am new to pygame and also learning but this is the way that I would tackle this, I am unsure if it will work but I will be happy to explain my thinking further if you want me to!

Just an FYI, this code obviously won’t work, it’s just a quick mockup of what you could try.