Python Forum
My ship is not moving( - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: Homework (https://python-forum.io/forum-9.html)
+--- Thread: My ship is not moving( (/thread-38699.html)



My ship is not moving( - Like_begginer - Nov-13-2022

[attachment=2098][attachment=2099][attachment=2100] my rocket on my screen but i don't understood why it is not working


RE: My ship is not moving( - deanhystad - Nov-13-2022

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.


RE: My ship is not moving( - Like_begginer - Nov-13-2022

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.


RE: My ship is not moving( - deanhystad - Nov-13-2022

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.