#๐ i don't uderstand this pygame problem
42 messages ยท Page 1 of 1 (latest)
@charred forge
Remember to:
- Ask your Python question, not if you can ask or if there's an expert who can help.
- Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
- Explain what you expect to happen and what actually happens.
:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.
anyone for help?
Yeah wait lemme see it
ok
just try to implement any pictures if you want
i just started so the program is not that good
UR good bro its clean
it does look clean, yes
but the fighters are going a litlle fast to the left
I noticed you have no clock
should i send a video?
wait i don't understand this i did never used a clock
it limits your framerate
(i changed something in the code but only to not go a lot down in the ground)
and it also returns a "delta" in milliseconds since the last frame, ande helps you actually run everything frame rate independent
i think u should use it before the screen updates
ok
and you might need to increase your player speed after wards.
should i import clock?
no
i think the speed is good or it's gonna be so cursed
I usually do something like:
delta = clock.tick(60) / 1000
``` at the top of the while loop, and then multiply delta with all player_speed occurences.
put it like this easly
no, that's wrong
it works
it should be early, so you actually can use the result
you recreate the clock every frame, that's silly ๐
(might be a singleton, I guess, so maybe it works)
@charred forge
after all that, another thing I noticed: the diagonal movements appear faster than horizontal/vertical movement ๐
But we can talk about that later, if you can't figure that out yourself. don't hesitate to ping me.
can u also pls help me im trying to learn pygame
create a help channel if you have a specific problems
This help channel has been closed and it's no longer possible to send messages here. If your question wasn't answered, feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.