Author Topic: Input system and the "-More-" prompt.  (Read 19179 times)

Quendus

  • Rogueliker
  • ***
  • Posts: 447
  • Karma: +0/-0
  • $@ \in \{1,W\} \times \{1,H\}$
    • View Profile
    • Klein Roguelikes
Re: Input system and the "-More-" prompt.
« Reply #30 on: May 20, 2013, 11:19:13 AM »
Quote from: mike3
8. Yes, walking on a wall would consume a turn the way it is now. I'd like it not to.

The program doesn't currently have support for multi-keystroke commands. Also, checking whether there's a mountain or something would be done in the movement code, yet that doesn't have access to the input system.

You need to fix this first, before anything else in the input system. Even if the game doesn't have any commands that require more than one keypress, you need to be able to process a key without consuming a turn. One way to do this is to have the function return true if the keypress completed a valid command, and false otherwise.

mike3

  • Rogueliker
  • ***
  • Posts: 125
  • Karma: +0/-0
    • View Profile
    • Email
Re: Input system and the "-More-" prompt.
« Reply #31 on: May 20, 2013, 06:45:16 PM »
Quote from: mike3
8. Yes, walking on a wall would consume a turn the way it is now. I'd like it not to.

The program doesn't currently have support for multi-keystroke commands. Also, checking whether there's a mountain or something would be done in the movement code, yet that doesn't have access to the input system.

You need to fix this first, before anything else in the input system. Even if the game doesn't have any commands that require more than one keypress, you need to be able to process a key without consuming a turn. One way to do this is to have the function return true if the keypress completed a valid command, and false otherwise.

Agreed.

Darren Grey

  • Rogueliker
  • ***
  • Posts: 2027
  • Karma: +0/-0
  • It is pitch black. You are likely to eat someone.
    • View Profile
    • Games of Grey
Re: Input system and the "-More-" prompt.
« Reply #32 on: May 21, 2013, 11:57:01 PM »
One option is to use the T-Engine which takes away all this low level stuff if you want it to.

mike3

  • Rogueliker
  • ***
  • Posts: 125
  • Karma: +0/-0
    • View Profile
    • Email
Re: Input system and the "-More-" prompt.
« Reply #33 on: May 27, 2013, 09:21:53 AM »
One option is to use the T-Engine which takes away all this low level stuff if you want it to.

Yes, of course, but I've already made code and I'd prefer it not to go to waste :)
« Last Edit: May 27, 2013, 09:46:58 PM by mike3 »