Re: LF: Questions (key-scanning)


[Prev][Next][Index][Thread]

Re: LF: Questions (key-scanning)





On Sun, 22 Dec 1996, Andrew wrote:

> OK, I have two questions for all you wizards out there--how would one go
> about reading a key and delaying then updating a sprite's position at the
> same time? (Confused enough :)..read on...)
> 
> In columns-I am trying to make it so that the blocks' falling is independent
> of the key-scanning and am running into trouble--either you can keep
> flipping or moving the blocks and they won't continue falling, or too brief
> a window is given to flip and move the blocks.
> 
> Also, is there a smoother and faster keyscanning method (like the one(s)
> used in F-Tris ) because dropping the blocks isn't very nice or easy with
> the methods that I have tried. (Yes, I have requested the F-Tris source code
> already )
> 
> I hope someone can offer assitance,
>                         Andrew Von Dollen
> 

	I will make a suggestion:  look at the source to hexdump.  It has
more or less what you want... The idea is that (from ram.txt) the keyboard
buffer is a circular buffer in memory... and one of the bytes in memory
keeps track of how many bytes are currently in the keyboard buffer.  You
check there to see if a key has been presse, and then can read that key
directly from memory, or use idle_loop to read it. 


References: