smcameron / space-nerds-in-space

Multi-player spaceship bridge simulator game. Captain your starship through adventures with your friends. See https://smcameron.github.io/space-nerds-in-space
GNU General Public License v2.0
724 stars 73 forks source link

keyboard mappings and interface design for communications station #340

Open heaventwig opened 9 months ago

heaventwig commented 9 months ago

As currently instantiated, the comms screen does not allow (much) for the possibility of keybindings, because the input dialogue box has focus.

For accessibility and customization, both for those who are modding and making exterior IO devices or alternative interfaces, and for those for whom the mouse/trackpad is unworkable, it might help to make it possible to deselect the computer interface dialogue box and use the number keys (possibly modified with meta keys like shift, ctrl, and alt/opt/cmd).

The first solution that occurs to me, surely not the best possible, is to use the top row of the comms screen as a basis for the first layer of these menus -- press 1 to hail, 2 to select channel, shift-3 to put weapons on main screen, shift-7 to return main screen to its default "exterior forward camera" display, 8 to enter cryptanalysis mode, and so on. In this mode, the button attached to the /computer command might return focus to the input dialogue box, from which perhaps the ESC key would bring focus back out from that dialogue (and allow a second ESC to initiate the QUIT interface).

The other items in the comms screen that could then use associated actions are the red alert button, the mining bot button, the main screen toggle (to show recent messages on main, or not), and the zoom controls for the main screen. As a default, I'd suggest the following non-case-sensitive bindings r redalert m miningbot c commsonmain left keyunzoom right keyzoom

This then leaves the commands accessible through the typing interface. The most obvious ones to add to the numberkey line are the ones listed immediately in the help text: /inventory -- which turns out to produce identical output to the /manifest command /passengers /antenna which might be worth adjusting the interface to include these in the visual cue lineup at top of screen, in which case maybe there's some rationale to apply to the sequencing; it seems like they belong at least before the help and about commands. (I've just now noted in a separate report that the help info obtained by hitting f1 is quite different from the info obtained by hitting the help button or typing /help into the input box.)

Since manifest and inventory are synonyms, we have ten functions to assign to numeral keys. Convenient.

If I were resequencing those, I might go as follows, with things not in the current top-of-screen lineup, or in a different location in that lineup, in all-caps: hail, channel, ANTENNA, manifest (or inventory), PASSENGERS, eject, crypto, COMPUTER, HELP, ABOUT (and in case it wasn't clear: I'm not sure the help and about buttons belong here. I think they might more properly belong in top-line items, with the about button putting the credits up as an overlay on whatever else is on mainscreen, and the comms station HELP button -- not F1 -- maybe prompting the computer to put the help screen up on every screen on the ship as if they themselves had hit F1. Might want a confirmation dialogue box for that, too.)

... And reviewing this all before submitting it, I'm seeing that I didn't specify, and it seems worth specifying: what I would hope for after inputting a command like "hail" (with no arguments, whether as terminal input) would be to see a list of options. For HAIL, it might be a set of options like STARBASES, SHIPS, PLANETS (can we hail those yet?), and FACTIONS (because we can slice data in different ways!). Selecting STARBASES (default key 1) might bring up a list of those, perhaps showing each with its associated faction, its coordinates, its registration number, and a number to press to select it (better still: also show the number of missions available to start there, the number of missions you can currently complete there, and something about your current status with that faction); if there are more than ten of them, either require another layer of selection (eg by faction) or, if that's not a distinguishing feature (or if you've already selected a faction and there's still more than ten available interlocutors for hailing), I guess you could make 0 into a "next page" button so long as there are additional pages of interlocutors, and make 1 into a "prev page" button when you're not on the first page.

This does start to suggest another comms interface concept to me, which is to have two of those terminal-ish screens. Make one of them the computer terminal, maybe even having both the cursor and the stdout display, and direct all other comms traffic (Starbase Foo: "we're under attack again!") to the other (what I think of as the current) output screen. This separation of functions would make it possible to navigate even some rather complex menus without getting lost in a stream of starbase complaints about incoming fire. But properly that ought to be a separate issue report, I think. It's not even 100% clear to me that getting lost in comms traffic isn't a ... feature. It definitely evokes the ridiculousness of games like Space Team, and makes the comms station into a very information-management-heavy game.

smcameron commented 9 months ago

We may have a fundamental disagreement about how things should work. I gather you may be trying to build some physical consoles and want to map buttons on these consoles to keyboard keypresses. Keypresses are not button presses, they are separate things. I have a separate (unfinished) project for building physical consoles that relies on an entirely different mechanism to communicate physical interface button presses to snis_client: https://github.com/smcameron/snis-consoles It also allows for potentiometer inputs.

The notes section has the most details about my current progress: https://spacenerdsinspace.com/snis-consoles/notes.html

heaventwig commented 9 months ago

Oh, I'm not likely about to build physical consoles myself, though it's been a back-burner side-project pipe-dream of mine for a while now. I have long admired your unfinished project!

My focus on enabling users to fly SNIS from a keyboard is more about fun and accessibility: fun for me, and accessibility for those of us who, for whatever reason, find the requirement of mousing to be a barrier to participation in the game.

On the fun-for-me side: I like being able to choose between typing some things and mousing others. I'm used to flying in bridge simulators and three-degrees-of-freedom flightsims where I can do everything --- yaw, pitch, roll, throttle, reverse --- from the keyboard. Similarly, on other bridge sims I can run my fingers over the keyboard to navigate numbered communications menus much faster than I can type out the hailing commands, or click them on the screen.

On the access side: I want the LAN parties I host to accommodate e.g. folks with mouse-related RSI, or disabilities that prevent holding their hands in the position required for mousing/trackball use, and so on. I'm partly informed by the friends who have attended my LAN parties over the years, some of whom choose their station in the bridge sims I've run before based on the absence of a requirement to engage in mousing. And I'm partly informed by my understanding of the impact Anacreon: Reconstruction 4021 had in the blind community; that game was properly huge, and the designer had no idea at the time what he was contributing to the world, but it was possible because the game was entirely ASCII output screens, and ASCII input menus. Learning that, twenty-some years ago, left me with a persistent desire to design for access, and an understanding that this means, among other things, allowing people to select or trigger screen events with their keyboards. And partly that means reducing the required number of keystrokes, as one does with a numbered menu (like the ones you've built for starbase communications after the hail has gone through).

I'm curious about the fundamental disagreement you believe you've uncovered --- what would be the positions you think each of us is taking?

smcameron commented 9 months ago

That all sounds pretty reasonable, so I'll try to accommodate what I can.

I'm curious about the fundamental disagreement you believe you've uncovered

I somehow got the idea that you were wanting to build physical consoles that work by emulating a keyboard, (as is somewhat common in the MAME world, I think, and also I believe Artemis Spaceship Bridge Simulator players do this). Not sure where I got that idea, maybe I'm thinking of someone else. In any case, as you've discovered, mapping keys to actions is somewhat at odds with also being able to type stuff in. Besides COMMS, DEMON screen has the same problem, and there's an optional ship's computer interface on the NAV screen (type "set NAV_HAS_COMPUTER=1" on the DEMON screen to enable it) which also has this problem (it's disabled by default because of this conflict between typing and using the keyboard as buttons. If the computer input box on NAV has focus, none of the keyboard controls work, which players found very confusing.)

There is a system in place for using TAB to change widget focus for input widgets (you can see it on the login screen to change focus between the 3 input widgets) but comms only has one input widget. Not sure I want to say for example, make all buttons and sliders able to get focus, and let you TAB all over the place. I'm not sure if that's what you're suggesting. Some laptops have a touch screen (I used to have one, but it was unfortunately and literally cleft in twain) which if you touch them register a mouse click at the position where touched, which could be used to trigger on screen buttons, sliders, etc. Probably not really satisfactory for your problem though.

heaventwig commented 9 months ago

"I believe Artemis ... players do this." Yes 100% I have aspired to do that with Artemis. But more just admired the things others had done. And I'm glad we cleared that up, because yeah, no, that's not what I'm aiming for here.

Tabbing all over the screen sounds horrible, honestly, and I can understand why one might choose this approach as a reasonable compromise, especially with the availability of your fancy speech-to-text controls, and how comms can be used for ... everything.

But using tab (or esc, or `) to de-focus/re-focus that input box might well do the trick and get us to the place where keyboard-jockeys can run comms super fast with single-key commands and without typing anything out. Much. Because I guess there's still registry codes to input when querying starbases about specific other ships. And I think that's probably fine.

smcameron commented 9 months ago

keyboard-jockeys can run comms super fast with single-key commands and without typing anything out.

You might not realize that there is one mission script that has comms remotely controlling a robot aboard the hulk of a derelict ship interactive fiction style to rescue survivors and defuse a bomb. See sturnvulf.lua (spoilers within). There's no avoiding the typing in that one.

heaventwig commented 9 months ago

I think it's okay to have specific missions that require many many keystrokes. Just like it's fine that there are hiking trails that a person in a wheelchair can't use. We're not about to pave the Appalachian Trail, thank goodness.

The text-adventure nature of such a thing might be worth calling out in the mission description text (I haven't checked if that's already been done).

That's fairly distinct from the design of the comms interface, which (to return to my trail access analogy) is more like having wheelchair-accessible restrooms at the ranger/info station near the trailhead, or flat and sturdy paths from an overlook parking area out to where there are some nice views.

Part of what I'm aiming for is to make the comms interface in general less dependent on accurately typing specific commands that might only be known by intuition. Two main reasons for this: 1) it's super frustrating for a comms officer to type out a command and find that they mis-keyed for example a digit in a ship registry number (especially if that comms officer is dyslexic and/or lives with any kind of chronic fatigue), and 2) intuitive knowing of the commands is strongly dependent on familiarity with the tropes of the genre, which, when it's required, makes the game less fun for new players who haven't yet discovered the joys of space-fiction (let's build on-ramps for our beloved hobby, rather than barricades).

smcameron commented 8 months ago
smcameron commented 8 months ago
smcameron commented 6 months ago

Had to revert most of this for the time being, it was interfering with typing in the text box. I may revisit this in the future, but for right now, it's out.