Python Forum
My ship is not moving(
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
My ship is not moving(
#1

.py   Rocketboom.py (Size: 1.44 KB / Downloads: 127)
.py   Settings.py (Size: 105 bytes / Downloads: 124)
.py   Sprite.py (Size: 414 bytes / Downloads: 137) my rocket on my screen but i don't understood why it is not working
Yoriz write Nov-13-2022, 09:57 AM:
Please post all code, output and errors (in their entirety) between their respective tags. Refer to BBCode help topic on how to post. Use the "Preview Post" button to make sure the code is presented as you expect before hitting the "Post Reply/Thread" button.
Reply
#2
You aren't updating the screen. You need to redraw the screen any time anything changes.

I don't think you're going to be happy with how the ship moves. I would expect the ship to start moving when I press a key and stop, or begin decelerating, when the key is released. Your ship moves one tiny step each time a key is pressed.
Reply
#3
Look, I need it to move at all. Then I upgrade the program. I do everything strictly according to the book, but for some reason their code does not work. If it’s not difficult, can you explain exactly where I need to change the code so that it constantly updates the screen.
Reply
#4
I did tell you. Each time you move the ship you need to redraw the screen. Do you know where in the code you are moving the ship? Do you know what code redraws the screen? Make sure that each time you move the ship you call the code that redraws the screen.
Reply


Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020