Re: [AD] Shawn's thoughts about new Allegro

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


Grzegorz Adam Hankiewicz wrote:

[snip]

"timing is everything" and you have some clunky 5 fps? Come on, you
surely must have a better argument. Otherwise I don't see how the user can
benefit having precise input with _very_ unprecise graphic representation
(the lowest I could accept from one of my own games was 15 fps, below
that it was not a game, just a useless slideshow).


Very often, you simply can't control what goes on in the background. Frame rate can drop easily with a little disk activity induced by some famous operating system which shall remain nameless.


Now, what do you do with the fact that al_readkey() uses a serial buffer
and can't detect simultaneous key presses? And I am saying the kind
of pressing up, right, alt to slide, firing continously and pressing a
third button to release some bomb.



Oh, right. I kinda forgot about those :/

In SUUTB, we serialized both key press events and key release events. This way, detecting multiple keys is quite simple - just check which keys have been pressed but not released.

I guess it would make it a pain for regular Allegro games though.

Perhaps something like:

do {
  /* Game loop */
  al_next_input_tick();

  if (al_key_pressed(KEY_ALT) && al_key_pressed(KEY_SPACE)) {
     do_stuff();
  }
}


Well, I'm just tossing ideas around.


--
- Robert J Ohannessian
"Microsoft code is probably O(n^20)" (my CS prof)
http://pages.infinit.net/voidstar/



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/