AGS keyboard support (feature request, kind of)

Started by Radiant, Thu 23/09/2004 16:21:22

Previous topic - Next topic

Radiant

Hello y'all,

I have been playing quite a lot of AGS games, and I noticed that many of them don't have any kind of keyboard support. Personally, I believe that creating hotkeys for the commands (esp. in a LucasArts GUI) greatly improves playabililty. Also in some situations, the ability to control EGO with the keyboard would help in getting to some places. If you think about it, all Sierra and LucasArts games have some kind of keyboard control, and that's probably there for a reason.

So I believe it would be a good thing (tm) to encourage game designers to use keyboard controls. It would be easy to make some basic additions to the standard script to allow this (cursor arrows do something like MoveCharacterDirect(EGO, character[EGO].x - 1000, char[EGO].y); for instance).

Maybe GUI buttons could have a hotkey assigned to them in the AGS editor. Thus, if that GUI is visible and that key is pressed, it is treated as a mouseclick on that button. Or, maybe the default 'popup GUIs' could all be removed by pressing ESC; this could for instance be a separate type of GUI, in the pull-down menu. Or, if this is too much trouble, it could simply be added to the basic global script (the one in the Standard Template).

Or maybe the people who have designed GUI templates and put them available for download, could please consider adding keyboard support there so that people will copy it and use it.

One other idea that crossed my mind is this. I'm not sure if this is even remotely feasible... but if I understand correctly, most AGS game files can be run with the current version of the AGS player application, possibly even if the AGS game file was already in EXE format.
What if the standard AGS player application would allow the user to define custom keys, simply in a text file or something, that state that "key 65 = GUI 3 button 4", so that if the player presses 'A' (=65) it is treated as a mouse click on GUI 3 button 4, if that GUI is visible.
This would allow older AGS games to be played with keyboard control even if they didn't have it in the first place. But like I said I have no idea if this is feasible.

Comments welcome!

Ashen

#1
Long and slightly rambling reply:

Surely it's easy enough to add keyboard control using the on_key_press function? You just have to add, for example:
Code: ags

if (keycode == 76) SetCursorMade (MODE_LOOK); // if 'L' is pressed, change to 'Look' mode

Maybe something like a RunGUIInteraction (int GUI, int object) would help with this (and with your GUI button 'hot key' idea), but probably isn't really necessary, as there are work arounds.
There are also several threads around telling how to use the arrow keys to control the player and, quite recently, monkey_05_06 had a thread about keyboard control of the mouse cursor, too (I think he got it working, but I'm not totally sure).

As to encouraging game designers to use keyboard control - isn't that a matter of preference on their part? Sure, the designer needs to consider the player in setting up their interface, but how many people would really want/need/care about a keyboard option? Also, in the end, the game's designer has to choose an Interface they think best suits their game.

However, making AGSers (especially, I'd guess, newer ones) aware that they're able to use different methods to the standard GUI can only be a good thing (tm acknowledged).

As you said, I don't know how feasible adding custom 'hotkey' control to older games would be - partly as it might involve decompiling and recompiling the code, but mostly because the 'hotkeys' may already be in use.

I'm sure I had an overall point to make, but it kind of escaped me. I guess, this seems low priority, as it's all possible already.
I know what you're thinking ... Don't think that.

Radiant

My point was mainly to add the 'if keycode=X setcursormode Y' bit to the global script in the 'new game' template, as this would increase awareness of it to newer users. Of course they can delete it if they don't like it.

Pumaman

I think this is best left up to the discretion of the game developer.

If you're making a game, and you create a really annoying interface, you're bound to notice it when you test the game, and sort it out.

Hopefully.

Phemar


What I would do if my interface was really annoying CJ, would be to put commands that only make it easier if Debug mode is on. Therefore irritating the crap out of everyone except myself.

Heehee.

monkey0506

Well, I personally think a hotkey would be nice. I know it's easy to script it yourself, but... I know. The suggestion list is too long as it is. Oh well. BTW, "Man who can't seem to remember what the woah ok.. blah blah blah", I think your name is Zoraphoayorayoupsus

SMF spam blocked by CleanTalk