Author Topic: Easy diagonals on existing roguelikes! (partial solution)  (Read 11231 times)

RiC David

  • Newcomer
  • Posts: 18
  • Karma: +0/-0
    • View Profile
    • Email
Easy diagonals on existing roguelikes! (partial solution)
« on: February 10, 2014, 06:00:22 PM »
This being a community of ASCII gamers (largely), perhaps everybody here is already savvy enough to figure out a fix to this problem but it took me long enough so maybe this will help somebody else:

I have a laptop without a number pad and so diagonals tend to be pretty awkward; the YUBN keys are reasonable compromises if they alone are an option - often though they're part of the 'vi' keys (YU, HJKL, BN) and so things like 'kick' have to be remapped, which in Nethack is something ridiculous like Ctrl+X.

This fix allows you to use the extremely convenient Shift+Left or Right to go diagonally up & left/right and Ctrl+Left or Right to go diagonally down & left/right; naturally your left hand tends to hover around that area so it makes the whole thing a breeze, for some reason this isn't common in even new-ish roguelikes (only ADOM does this and even that may be a NOTEYE interface feature).

Anyway, you'll need the free and lightweight 'Auto Hot Key' programme which can be downloaded at autohotkey.com. Once downloaded, simply create a new ahk file (you'll find the option in the Right Click > New > AHK file menu, otherwise you can create a text file and rename the extension .ahk) and paste this in (without the lines):

------------------------------

#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn  ; Enable warnings to assist with detecting common errors.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.


+Left::
Send 7
return
+Right::
Send 9
return
^Left::
Send 1
return
^Right::
Send 3


-------------------------------

Then open the file to run the script, a little icon will now reside in your notifications bar that you might want to set to 'hide', and if you're likely to play these games a lot then maybe put it in your 'StartUp' folder so you don't have to keep opening it.

The stuff at the top is the default coding it recommends so don't ask me what that all does. The rest of it tells the computer to map Shift ("+") or Control ("^") and either Left or Right to the horizontal number keys that control diagonal movement. In the unlikely case that the game you're playing doesn't use the horizontal numbers for movement and only uses the number pad then instead of "1" or "9" with "Numpad1" or "Numpad9"; if you have an even more unusual setup for movement then replace those numbers with whichever keys control your diagonal movement.

I can't tell you how much better it feels to play Nethack with easy diagonal movement...but I'm going to try - it feels great. I think I'd prefer this to a number pad anyway because there's less movement involved.

Hope this helps someone else as much as it did me.

 -RiC

« Last Edit: February 10, 2014, 07:42:25 PM by RiC David »

RiC David

  • Newcomer
  • Posts: 18
  • Karma: +0/-0
    • View Profile
    • Email
Re: Easy diagonals on existing roguelikes! (partial solution)
« Reply #1 on: February 10, 2014, 07:42:07 PM »
Okay not so fast  :-\  I've just tried the script out in Brogue and while the downward (Ctrl) movement is working, the upward (Shift) movement is making me run in a line rather than move one step. My guess is that the game already has a run command assigned to the shift key and that this would need to somehow be disabled (not an option in game).

Ah well. Brogue at least has the YUBN keys without stepping on any common commands (like K for Kick in Nethack, which becomes Ctrl+X or something ridiculous) so I'll get by.

Legend

  • Rogueliker
  • ***
  • Posts: 657
  • Karma: +0/-0
    • View Profile
    • Email
Re: Easy diagonals on existing roguelikes! (partial solution)
« Reply #2 on: February 11, 2014, 07:33:04 AM »
Actually, I believe that Infra Arcana may have been the first to use the shift/crtl way of handling diagonals specifically for those without numpads.

The idea of what you are doing is very cool to make an extension of sorts that makes it work for any(or almost any) roguelikes. I will definitely give it a shot later.

A usb numpad is also a viable option.

I actually ended up using xpadder to map keys to a gamepad to get past the diagonals issue since I also play on a laptop. I use a logitec dual action gamepad. I use the dpad for orthogonal movement and use one of the thumb sticks for diagonal movement.  It works surprisingly well and comfortable to play quite a few roguelikes. At least those with somewhat smaller set of commands. Angband and nethack are almost completely out of the question cause there are just too many commands.

Anyways, I look forward to seeing your progress.

Krice

  • (Banned)
  • Rogueliker
  • ***
  • Posts: 2316
  • Karma: +0/-2
    • View Profile
    • Email
Re: Easy diagonals on existing roguelikes! (partial solution)
« Reply #3 on: February 27, 2014, 09:38:41 PM »
Actually, I believe that Infra Arcana may have been the first to use the shift/crtl way of handling diagonals specifically for those without numpads.

Teemu had that in the first version, but at least in the second, year before first Infra Arcana version was released.

awake

  • Newcomer
  • Posts: 43
  • Karma: +0/-0
    • View Profile
Re: Easy diagonals on existing roguelikes! (partial solution)
« Reply #4 on: April 13, 2014, 01:30:26 AM »
In Izuna (a Nintendo DS game) you could only move in cardinal directions unless you held down the R button, in which case you could only move in diagonal directions. This took about 0.5 seconds to learn and afterwards you never hesitated before making a move. Infra Arcana's solution is more efficient in terms of # of keystrokes but you still have to "get used to it".

Kimchi

  • Newcomer
  • Posts: 13
  • Karma: +0/-0
    • View Profile
    • Email
Re: Easy diagonals on existing roguelikes! (partial solution)
« Reply #5 on: May 21, 2014, 09:04:25 PM »
Hey, that's a nifty idea, RiC David! I think I might actually like to incorporate that into my own game. :D