Maidens of the Kaleidoscope
~Beyond the Border~ => Akyu's Arcade => Topic started by: Failure McFailFace on November 01, 2015, 02:59:06 AM
-
Link to site here (http://tomorrowcorporation.com/humanresourcemachine)
Human Resource Machine is a game about coding your character in an office building to move boxes with numbers on them form the INBOX to the OUTBOX. Easy, right?
WRONG.
There are 11 different functions in the game, not including comments and labels. These are enough to simulate an entire programming language/computer... ON YOUR COMPUTER! Amazing isn't it?
After playing for several hours and getting frustrated at the lack of high-level programming language features (like for/while loops, multiplication, division, MODULO), I now respect early progammers that had to use machine code/assembly language/something a tiny more advanced.
Here's an example of the hacks that you need to do here:
There is a level where you have to code a program that outputs all of the numbers less than the input all the way to 0.
In-Game:
-- HUMAN RESOURCE MACHINE PROGRAM --
a:
INBOX
JUMPN c
JUMPZ f
b:
COPYTO 0
OUTBOX
BUMPDN 0
JUMPZ e
JUMP b
c:
d:
COPYTO 0
OUTBOX
BUMPUP 0
JUMPZ g
JUMP d
e:
f:
g:
OUTBOX
JUMP a
There's most likely a way to translate it to a different programming language, but I'm to tired to deal with the JUMP functions.
-
It gets worse.
Later, they add registers, allowing you to pull from a spot defined by another number in memory.
Try determining how many of a certain item is already registered in memory.
Try alphabetizing two word strings, sending out the one that's first alphabetically:
-- HUMAN RESOURCE MACHINE PROGRAM --
COPYFROM 23 //Creates string start pointers
COPYTO 21
COPYFROM 24
COPYTO 22
a:
INBOX //Copies first string to line
COPYTO [23]
JUMPZ b
BUMPUP 23
JUMP a
b:
c:
INBOX //Copies second string to line
COPYTO [24]
JUMPZ d
BUMPUP 24
JUMP c
d:
COPYFROM 21 //Resets pointers for search
COPYTO 23
COPYFROM 22
COPYTO 24
e:
COPYFROM [24] //Checks for strings ending
JUMPZ j
COPYFROM [23]
JUMPZ g
SUB [24] //Compares letters
JUMPZ f
JUMPN i
JUMP l
f:
BUMPUP 23 //Increases pointers
BUMPUP 24
JUMP e
g:
h:
i:
COPYFROM [21] //Sends first string
JUMPZ m
OUTBOX
BUMPUP 21
JUMP h
j:
k:
l:
COPYFROM [22] //Sends second string
JUMPZ n
OUTBOX
BUMPUP 22
JUMP k
m:
n:
It's a thing.