[comp.sources.games.bugs] SOKOBAN/EGA with keypad cursor keys

swh@hpcupt1.HP.COM (Steve Harrold) (05/08/89)

Re: SOKOBAN on the EGA

The recent SOKOBAN game for the MSDOS EGA environment is a delight to
use except that the author did not use the PC keyboard to good effect.
Namely, his EGA version still uses the "vi" keys for cursor movement
(i.e.  "hjkl"), which I've never felt was "natural".

Following is my SOKO.BAT file that you can use that will let you operate
the SOKOBAN game with the keypad cursor keys.  In this manner, you will
be able to play SOKOBAN/EGA with the familiar (and more intuitive) PC
keyboard layout.

This is achieved by temporarily remapping the keypad cursor movement
keys to the "vi" keys.  To be effective, your CONFIG.SYS file must
contain a line like:

    device=ansi.sys

or specify some equivalent ANSI screen driver (e.g.  NANSI.SYS, FANSI)

The BAT file uses ANSI facilities to remap the cursor keys, and then to
"unmap" them after the game completes.  If, for any reason, you abort
the BAT file so that it does not execute the "unmap" commands, then just
run the BAT file again, or more simply enter:

    type soko.bat

IMPORTANT NOTE:  In the file that follows, you must edit all tilde (~)
characters to become ESC characters.  Many mailers will not transmit
unprintable characters so you have to perform this step.  There is one
tilde per ECHO command.
--
---------------------
Steve Harrold			swh@hpda.hp.com
				...hplabs!hpda!swh
				HPG200/11
				(408) 447-5580
---------------------

-------- cut here ------ SOKO.BAT --------
ECHO off
:* Plays the SOKOBAN game

:* Remap the cursor keys to the "vi" cursor key codes
echo ~[0;72;"k";p
echo ~[0;75;"h";p
echo ~[0;77;"l";p
echo ~[0;80;"j";p

sokoban %1 %2 %3

:* Reset the mappings of the cursor keys
echo ~[0;72;0;72;p
echo ~[0;75;0;75;p
echo ~[0;77;0;77;p
echo ~[0;80;0;80;p

:---eof---

mct@ihlpe.ATT.COM (452is-Thompson) (05/10/89)

From article <11020002@hpcupt1.HP.COM+, by swh@hpcupt1.HP.COM (Steve Harrold):
+ Re: SOKOBAN on the EGA
+ 
+ The recent SOKOBAN game for the MSDOS EGA environment is a delight to
+ use except that the author did not use the PC keyboard to good effect.
+ Namely, his EGA version still uses the "vi" keys for cursor movement
+ (i.e.  "hjkl"), which I've never felt was "natural".

Is it possible to the binary and/or source for this game.

	Craig Thompson
	ihlpe!mct
	312-979-7575(work)