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

ExtremoPenguin

  • Newcomer
  • Posts: 19
  • Karma: +0/-0
    • View Profile
    • Entropy Interactive
Re: Input system and the "-More-" prompt.
« Reply #15 on: May 17, 2013, 05:05:03 AM »
8. Yes, walking on a wall would consume a turn the way it is now. I'd like it not to.

To fix this should be pretty easy if you are using a queue to order your actors. Just put the player back on the front of the queue if their action doesn't do anything.

NON

  • Rogueliker
  • ***
  • Posts: 349
  • Karma: +0/-0
    • View Profile
    • Infra Arcana
    • Email
Re: Input system and the "-More-" prompt.
« Reply #16 on: May 17, 2013, 07:41:00 AM »
Is there so little screen space that messages have to fit into one line and the game flow needs to be interrupted with a "more" prompt?
I prefer it this way. If there's a lot happening at once (e.g. several monsters casting spells, attacking, etc), I think it's best if the game shows one thing at a time.

"Monster X casts a spell, you are confused -MORE-"

Alright, what's next?

"Monster Y throws a rock, you are hit! -MORE-"

and so on...

It's a good pace, and allows me to verify each event.

If I end my turn and get 6 messages (events) all at once (no -MORE- prompt) it's much more likely that I miss something. And besides, I think it happens too fast. When I'm in a critical situation I think it's much more suspenseful to just verify one message at a time, each one making you sweat more :)
Happy is the tomb where no wizard hath lain and happy the town at night whose wizards are all ashes.

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 #17 on: May 17, 2013, 10:20:36 AM »
Is there so little screen space that messages have to fit into one line and the game flow needs to be interrupted with a "more" prompt?
I prefer it this way. If there's a lot happening at once (e.g. several monsters casting spells, attacking, etc), I think it's best if the game shows one thing at a time.

"Monster X casts a spell, you are confused -MORE-"

Alright, what's next?

"Monster Y throws a rock, you are hit! -MORE-"

and so on...

It's a good pace, and allows me to verify each event.

If I end my turn and get 6 messages (events) all at once (no -MORE- prompt) it's much more likely that I miss something. And besides, I think it happens too fast. When I'm in a critical situation I think it's much more suspenseful to just verify one message at a time, each one making you sweat more :)


And what happens if I'm in a room with 4 weak monsters throwing stones at me from the opposite side, and decide to walk over and melee them?

"Monster 1 throws a rock, but misses! -MORE-"

"Monster 2 throws a rock, you are hit! -MORE-"

"Monster 3 throws a rock, you are hit! -MORE-"

"Monster 4 throws a rock, but misses! -MORE-"

*moves one step towards monsters*

"Monster 1 throws a rock, you are hit! -MORE-"

"Monster 2 throws a rock, you are hit! -MORE-"

"Monster 3 throws a rock, but misses! -MORE-"

"Monster 4 throws a rock, you are hit! -MORE-"

A few turns, a dozen -MORE- prompts later:

*Kills monster 4*

"Monster 1 throws a rock, you are hit! -MORE-"

"Monster 2 throws a rock, but misses! -MORE-"

"Monster 3 throws a rock, but misses! -MORE-"

This is bad because I knew the risks of crossing the room to kill the weak stone-throwing monsters when I made the decision - I don't need to be reminded four times a turn (+ 6 while killing them) of what they're doing. If the game removes some of those prompts through some arbitrary decision about which ones are "important", then I get the even-worse situation where I don't know how many prompts I need to clear to get through to the next turn. Especially if a key assigned to an action can clear -MORE- prompts, this can cause more player error than it prevents.

I prefer Cataclysm's way of doing this - if an enemy is sighted, it prevents all time-consuming actions until you activate Danger Mode (or whatever it's called) which is taken to mean that you're aware there are things nearby trying to kill you, and that you're paying attention to the message log.

NON

  • Rogueliker
  • ***
  • Posts: 349
  • Karma: +0/-0
    • View Profile
    • Infra Arcana
    • Email
Re: Input system and the "-More-" prompt.
« Reply #18 on: May 17, 2013, 10:49:06 AM »
Is there so little screen space that messages have to fit into one line and the game flow needs to be interrupted with a "more" prompt?
I prefer it this way. If there's a lot happening at once (e.g. several monsters casting spells, attacking, etc), I think it's best if the game shows one thing at a time.

"Monster X casts a spell, you are confused -MORE-"

Alright, what's next?

"Monster Y throws a rock, you are hit! -MORE-"

and so on...

It's a good pace, and allows me to verify each event.

If I end my turn and get 6 messages (events) all at once (no -MORE- prompt) it's much more likely that I miss something. And besides, I think it happens too fast. When I'm in a critical situation I think it's much more suspenseful to just verify one message at a time, each one making you sweat more :)


And what happens if I'm in a room with 4 weak monsters throwing stones at me from the opposite side, and decide to walk over and melee them?
[...]
Similar lines should be grouped, and just show the number of times it was repeated. So 5 goblins swinging a dagger at you would only print:
"The goblin misses x5" (no -MORE- prompt)

Of course that only partly solves the problem you described above. But it tends to keep the prompts within reason for most situations.

Another disadvantage of the one-line message is that it can be easy to miss messages about discovering traps, or sensing a hidden monster etc. Because the message is cleared when the next player turn ends, if you just hold down the walk key, the message will only be displayed on the screen a small fraction of a second. With a multi-line log, the message will still be on the screen the next turn.

So yeah there's advantages and disadvantages of both systems. I'm not saying either way is objectively better, I just wanted to mention what I think is good about the single line message system. I don't think it's only some obsolete old crap (*cough*vi-keys*cough*) which should be removed without question.

---
A question for anyone:
With multi-line message logs, does it usually (traditionally?) use a -MORE- prompt as well, if more than 6 (or whatever the height of the log is) messages are printed between the player's turns?
« Last Edit: May 17, 2013, 11:37:21 AM by NON »
Happy is the tomb where no wizard hath lain and happy the town at night whose wizards are all ashes.

Xecutor

  • 7DRL Reviewer
  • Rogueliker
  • *
  • Posts: 263
  • Karma: +0/-0
    • View Profile
Re: Input system and the "-More-" prompt.
« Reply #19 on: May 17, 2013, 01:26:44 PM »
May be this is a stupid question, but still...
Where do you find 80x25 terminal these days?
My terminal is 140x60. There is PLENTY of space for multirow message log.
Even in old good dos there was 80x50 text mode.
I'd say - stop solving nonexistent problem.

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 #20 on: May 17, 2013, 02:52:38 PM »
A lot of platforms make an 80x24 terminal by default. This guy had to put effort in (using some command, not just dragging a window corner) to get an 80x30 window. This is one of the advantages of libtcod - it reliably gives you the (potentially quite large) terminal size you want. 80x50 seems to be standard for it.

Krice

  • (Banned)
  • Rogueliker
  • ***
  • Posts: 2316
  • Karma: +0/-2
    • View Profile
    • Email
Re: Input system and the "-More-" prompt.
« Reply #21 on: May 19, 2013, 10:44:29 AM »
Is there so little screen space that messages have to fit into one line and the game flow needs to be interrupted with a "more" prompt?

Someone posted a nice idea where you just print all messages in that turn over the screen and then wait for key to clear it. I think it can be better than having press -more- repeatedly, but haven't tried it yet.

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 #22 on: May 19, 2013, 10:58:38 AM »
I think Dredmor does something like that?

kraflab

  • Rogueliker
  • ***
  • Posts: 454
  • Karma: +0/-0
    • View Profile
    • kraflab.com
Re: Input system and the "-More-" prompt.
« Reply #23 on: May 19, 2013, 12:55:16 PM »
I think Dredmor does something like that?

When I played dredmor back in the day the log did not function at all.  It did not negatively affect the game at all :P

mike3

  • Rogueliker
  • ***
  • Posts: 125
  • Karma: +0/-0
    • View Profile
    • Email
Re: Input system and the "-More-" prompt.
« Reply #24 on: May 19, 2013, 10:36:22 PM »
I've just discovered a new wrinkle here: the need to put up prompts in the message area like "Do you want to climb this mountain? (Y/N)" (needs keypress) or similar. What's the best way for handling that? Note that since these are in the message area, there's an obvious connection to the message-printing system, and like "-More-" prompts, it requires the keyboard.

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 #25 on: May 19, 2013, 11:53:37 PM »
Those are much easier to handle than "more" prompts because they happen during the player's turn. If you accept multi-keystroke commands already (with some kind of state machine or equivalent) then you can handle such confirmation requests in the same way.

mike3

  • Rogueliker
  • ***
  • Posts: 125
  • Karma: +0/-0
    • View Profile
    • Email
Re: Input system and the "-More-" prompt.
« Reply #26 on: May 20, 2013, 02:44:17 AM »
Those are much easier to handle than "more" prompts because they happen during the player's turn. If you accept multi-keystroke commands already (with some kind of state machine or equivalent) then you can handle such confirmation requests in the same way.

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.

Krice

  • (Banned)
  • Rogueliker
  • ***
  • Posts: 2316
  • Karma: +0/-2
    • View Profile
    • Email
Re: Input system and the "-More-" prompt.
« Reply #27 on: May 20, 2013, 07:47:31 AM »
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 must be joking? Or are you mentally challenged?

mike3

  • Rogueliker
  • ***
  • Posts: 125
  • Karma: +0/-0
    • View Profile
    • Email
Re: Input system and the "-More-" prompt.
« Reply #28 on: May 20, 2013, 08:22:13 AM »
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 must be joking? Or are you mentally challenged?

The game loop gets input. This input is passed to a command processor, which then turns it into, say, a movement direction for the player (e.g. mapping "arrow key" presses to grid movement). The movement system then uses this movement direction (not the raw keyboard command) to do the moving of the player. The keyboard object is not global, since globals are evil due to the dependency issues they create. So the movement system object does not know of the keyboard object as it does not interact directly with it, but is fed the movement information from the command processor, which is in turn fed keypresses from the keyboard. The movement system also handles movements of monsters (though they're not implemented yet). This couldn't be given by keyboard input anyway, but would have to be decided internally.
« Last Edit: May 20, 2013, 08:25:25 AM by mike3 »

Krice

  • (Banned)
  • Rogueliker
  • ***
  • Posts: 2316
  • Karma: +0/-2
    • View Profile
    • Email
Re: Input system and the "-More-" prompt.
« Reply #29 on: May 20, 2013, 10:20:02 AM »
The keyboard object is not global, since globals are evil due to the dependency issues they create.

If there is only one global instance of a class, let's say a GUI class, it doesn't create any "dependency issues". It's just like using std::vector or printf in C++. "Globals are evil" makes me laugh. Anything can be evil in programming if you don't understand how to use it properly.