#really bizarre problem with ncurses

21 messages · Page 1 of 1 (latest)

violet cloak
sick grottoBOT
#

When your question is answered use !solved to mark the question as resolved.

Remember to ask specific questions, provide necessary details, and reduce your question to its simplest form. For tips on how to ask a good question use !howto ask.

violet cloak
#

as you can see, i'm having a bit of trouble with ncurses drawing my window

#

i draw the window in a loop that essentially happens every time the player presses wasd or space

#

for some reason it draws the window "off-terminal" until the second time around drawing it

rare lava
#

I havent used ncurses but I wrote a snake game manually

#

looks like you dont overwrite the first frame but write a new one

violet cloak
#

wdym manually?

#

printf/cout?

rare lava
#

I wrote to console buffer directly

#

hmm

#

I see something on google that you shouldnt mix in getch with others

#

I see people calling refresh after initscr

violet cloak
#

okay i got it lol

#

wgetch(this->oknoGry)

#

i don't quite understand why it matters what window i'm using for getting a character from the keyboard, but alright lol

sick grottoBOT
#

Thank you and let us know if you have any more questions!

This thread is now set to auto-hide after an hour of inactivity

rare lava
#

getch apparently calls refresh

#

and you should use wrefresh and wgetch?

violet cloak
violet cloak