The Dink Network

Reply to Re: Dink Smallwood v1.08 Beta 3

If you don't have an account, just leave the password field blank.
Username:
Password:
Subject:
Antispam: Enter Dink Smallwood's last name (surname) below.
Formatting: :) :( ;( :P ;) :D >( : :s :O evil cat blood
Bold font Italic font hyperlink Code tags
Message:
 
 
December 31st 2005, 01:43 AM
anon.gif
toa
Ghost They/Them
 
"My thinking is if we limit the buffer to 2 or 3 keystrokes, or flush it at appropriate times {perhaps fflush(stdin) in stdio}, then both of these issues might be resolved."

Input streams cannot be flushed. (Flushing invloves commiting buffers to disk and only works on output.) There is probably a special function provided by Windows or DirectInput to clear the input buffer.

However, we end up with even more problems: keys get dropped all over the place, requiring the player to hold the key down for a duration of time so that the key hits the delay between clearing and reading, which might be a smaller delay than between reading and clearing.