Re: Where to put interface?
- From: Radomir 'The Sheep' Dopieralski <thesheep@ sheep.prv.pl>
- Date: 24 Oct 2005 06:37:18 GMT
At 23 Oct 2005 17:33:57 -0700,
Jeff Lait wrote:
> Milesss wrote:
> I will note that the same abstraction is required.
>
> 1) You need your device dependent API which returns characters. This
> can't just be curses or SDL. Both have peculiarities (ie, arrow keys,
> etc) that you want to normalize. You Only Live Once has this in
> gfxengine, along with some #defines for cross platform/engine arrow
> keys.
>
> 2) You should have a second level which translates your generic
> keypresses into roguelike specific actions. This has to be context
> sensitive. When you are wating for an action, 'y' may be "move north
> west". When you are waiting at a prompt, it may be "yes". You want
> this layer to allow for user defined keyboard mappings. You Only Live
> Once pretty much lacks this layer, instead just hard coding
> translations of keys to function calls.
>
> POWDER does a bit of a better job, first translating the keys into
> ACTION_ enums which are used to trigger different behaviours. This is
> necessary in POWDER as dynamic key remapping is an integral part of the
> GBA version.
>
> 3) Your AI code is equivalent to your Keyboard Input Code. As such,
> both routines should call the same set of functions. An extreme
> approach to this would be to have the AI code just return the ACTION_
> tokens that it wishes accomplished. I'm less pure and suggest one can
> avoid the level of marshalling by just calling whatever action_ method
> those tokens correspond to.
I'd say there are (at least) two aspects of input and output.
The most common output is as you described -- displaying the map, the
messages and the effects. It is tied with the dungeon harder than with the
player input, and I think it's a good idea to have it separated.
Similar with the 'action' input.
But then there's that meta-game, ui-related input and output. The
simpliest form is the 'Direction?' prompt, but there are more
sophisticated ones, like 'Drink what?' and the look command.
Count in the procedures that display various menus, character stats,
inventory, help screen, etc. -- these are tied pretty closely with
the input.
They are not really 'input' in game terms -- they are not directly used
for controlling of the characters. But they surely use the computer's
input and output, and I'd say they are pretty different from what you
described, including totally different requirements for helper functions.
Sure, they can be simulated, to some extent, with the messages, but
I think it's very liiting and crippling for the ui.
--
Radomir `The Sheep' Dopieralski @**@_
(Qq) 3 Sob?
. . . ..v.vVvVVvVvv.v.. .
.
- Follow-Ups:
- Re: Where to put interface?
- From: Jeff Lait
- Re: Where to put interface?
- References:
- Where to put interface?
- From: Milesss
- Re: Where to put interface?
- From: Jeff Lait
- Where to put interface?
- Prev by Date: Re: New roguelike magic system?
- Next by Date: Re: New roguelike magic system?
- Previous by thread: Re: Where to put interface?
- Next by thread: Re: Where to put interface?
- Index(es):
Relevant Pages
|