[racket-dev] multiple key-press
Matthias changed the way the key callbacks work precisely for the
reasons Jay mentions below. There is no such thing as "simultaneous
key presses" something has to track up and downs to know why is down
when. The changes to universe (on a single machine) make this
possible.
Robby
On Thursday, July 22, 2010, Jay McCarthy <jay.mccarthy at gmail.com> wrote:
> As far as I know, at the lowest level there is no "multiple key press"
> event even in the OS.
>
> If they want to do that, they should change their world to record the
> "current key press state":
>
> (define-struct the-world (keys . everything-else))
>
> and at the start of `on-tick' look at the collective impact of all the
> keys, resetting it to 'empty' when the new world is returned.
>
> That's more like how actually game engines work anyways.
>
> Jay
>
> On Thu, Jul 22, 2010 at 7:25 AM, Shriram Krishnamurthi <sk at cs.brown.edu> wrote:
>> I just spoke with a room of high-school students studying Universe
>> programming in a summer course at Brown.
>>
>> One major complaint was that they couldn't do multi-key-presses. For
>> instance, they want to use WASD navigation combined with a right-side
>> key for firing, and want to be able to fire and navigate at the "same
>> time".
>>
>> They've been using Shift, but the general consensus amongst the kids
>> was this was Not Cool. Basically, they felt like they were being
>> cheated out of building a "real game".
>>
>> I don't know what it would take to support this.
>>
>> Shriram
>> _________________________________________________
>> For list-related administrative tasks:
>> http://lists.racket-lang.org/listinfo/dev
>>
>
>
>
> --
> Jay McCarthy <jay at cs.byu.edu>
> Assistant Professor / Brigham Young University
> http://teammccarthy.org/jay
>
> "The glory of God is Intelligence" - D&C 93
> _________________________________________________
> For list-related administrative tasks:
> http://lists.racket-lang.org/listinfo/dev