How to not immediately refresh after user input curses

Viewed 180

I am writing a DoodleJump game for the terminal in Python with curses. I use getch() to get the user input to know in which direction the character should move. When I get the user input my environment gets updated simultaneously but I want that it just keeps on moving and not update when I get the user input. Does anybody know how I can achieve this? I tried using nodelay() but that still doesn't cut it. Thanks in advance

2 Answers

curses refreshes the window associated with getch. You could prevent refreshes (or hide them) by turning off echo, and using a window that won't have changes made to it (even one that you create just for that purpose).

Related