LURKMAN is a robust terminal-based interface for playing games on Lurk
Protocol-abiding servers. It is written in C/C++ using the
ncurses library for
Debian systems. This guide goes over everything needed
to build it and get it running, how to use it and its features, and example screenshots and videos. Note
that all screenshots and videos on this page are of the Windows Terminal. The source code for LURKMAN can be found on my GitHub.
The three ncurses packages are very similar, but when attempting to build without all three, I
have
run into issues. Your mileage may vary.
Because of a conflict of naming in the graphviz and ncurses header files (graphviz has a
structure
named "box" and ncurses has a function named "box"), I have included a modified set of graphviz
header files with the structure "box" commented out. These are required for it to build
correctly.
Building
The command used for building LURKMAN is as follows:
There is also an included Makefile which will build the executable upon simply running:
make
Commands and Features
Scrolling the windows
The up and down arrow keys can be used to scroll the main window up and down. There are 500 lines in the
main window to scroll back through.
CTRL + U and CTRL + D (U for up, D for down) can be used to scroll the message window up and down. There
are 250 lines in the message window.
Notes:
If the user resizes the terminal while the windows are not scrolled all the way to the bottom,
they will automatically be scrolled all the way down upon resizing.
!help
The !help command simply prints a list of available commands and their purposes.
!make
The !make command provides a series of prompts for the user to enter information about their character.
It asks the user to provide the following:
Character name (up to 31 letters long)
Whether the player would like to automatically join battles (y/n)
Desired attack value
Desired defense value
Desired regeneration value
Character description
After the !make command is finished, LURKMAN sends the created character to the server for
acceptance.
Notes:
All input is validated. If a user enters a name that is too long, a value for one of the stats
that is too high, etc., an error will be printed and new information must be entered.
As the user enters their desired name and stats, the status window will update. However, if the
server modifies the user's character after receiving it (if the character is being revived and
their stats/description/room number were changed to match the existing character, for example),
the
status window will update to reflect those changes.
The !make command is disabled after an accept of
type 10 (character) is received.
!start
The !start command sends a type 6 start message to the
server indicating that the user is ready to begin the game. If successful, LURKMAN will be sent a room,
every character currently in it, and all of the connecting rooms available.
Notes:
If the user has not already used !make to create a character, an error
message will be displayed
!qmake
The !qmake command is a convenient way to create a character and start the game quickly. It prompts the
user for a name, then creates a character according to the following rules:
Attack: initial stats specified by the server divided by 2
Defense: initial stats specified by the server divided by 4
Regeneration: initial stats specified by the server divided by 4
Description: "Logged in from LURKMAN"
As seen in the !qmake screenshot, the initial stat value sent by the server was 1000. When !qmake was
used to create Example2, LURKMAN allocated 500 attack, 250 defense, and 250 regeneration and
promptly sent a start request.
Notes:
If the user has already created a character, an error message will be displayed
!move
The !move command prompts the user to enter a room number to move to. If the user enters an invalid
number, the server should send back an appropriate error message.
Notes:
Instead of using !move every time, the user can quickly switch rooms by simply entering a number
into the input box. LURKMAN will interpret it as a !move command and attempt to move to the
number entered.
!map
The !map command attempts to create a map of the visited areas of the server using the graphviz and
graph-easy libraries. Graphviz is used
to keep track of what rooms the player has visited and what they connect to, while graph-easy is used to
convert the graph to box art to display on screen.
Notes:
The !map command is not perfect. Depending on the number of rooms in the server and a few other
factors
(what order the rooms were visited in, etc.), the map can either not fit on screen, or
graph-easy may fail to visually connect some rooms to each other due to a lack of space. In the
second case, an error message will be printed above the graph indicating that graph-easy failed
to successfully display everything.
If the user uses the !map command without having the graph-easy library installed on the system,
an error message will be displayed.
!back
The !back command is very simple. It attempts to return to the previous room the player was in. For
example, if a player moves from room 2 to room 5, the !back command would send a changeroom request to room 2.
!fight
The !fight command sends a type 3 fight request to the
server in an attempt to initiate a fight in the current room. What happens as a result is
server-dependent.
!loot
The !loot command prints out a list of dead players and monsters in the current room for the player to
choose from. Rather than having the player enter the name of the character they wish to loot, LURKMAN
generates a numbered list so the player only needs to enter the number temporarily associated with the
desired character. This makes it quicker and easier to use.
Notes:
If there are no dead players or monsters in the current room, LURKMAN will print an error
message.
!pvp
The !pvp command prints out a list of players in the current room for the player to
choose from. Rather than having the player enter the name of the character they wish to select, LURKMAN
generates a numbered list so the player only needs to enter the number temporarily associated with the
desired character. This makes it quicker and easier to use.
Notes:
If there are no players or in the current room, LURKMAN will print an error
message.
PVP functionality is server-dependent. Some server will support it, some will not. For example,
in ttydServ, the PVP protocol message is used for interacting
with NPCs rather than player-vs-player combat.
!msgn
The !msgn command prints out a list of players in the current room for the player to
choose from, then prompts the player to enter a message to send. Rather than having the player enter the
name of the character they wish to message, LURKMAN
generates a numbered list so the player only needs to enter the number temporarily associated with the
desired character. This makes it quicker and easier to use.
Notes:
Messages can be sent to anyone in the server. However, since the !msgn command only prints the
names of players in the current room, the !msg command must be used to send
messages to players in other rooms of the server.
!msg
The !msg command facilitates the sending of messages between players. LURKMAN prompts the player to
enter the name of the player for which the message is intended followed by the message itself. After the
message request is sent to the server, the server should reply with either an accept of type 1 indicating the message was delivered
successfully or an error messaging indicating what went
wrong.
!playerlist
The !playerlist command simply lists all the players in the current room along with their stats. If
there are no players in the current room, an error is printed.
!monsterlist
The !monsterlist command simply lists all the monsters in the current room along with their stats. If
there are no monsters in the current room, an error is printed.
!alive
The !alive command simply lists all living players in the current room along with their stats. If
there are no living players in the current room, an error is printed.
!roomlist
The !roomlist command displays a list of all rooms that connect to the current room.
!about
The !about command allows the player to view a specific character's description. It prints out a list of
players in the current room for the player to
choose from. Rather than having the player enter the name of the character they wish to select, LURKMAN
generates a numbered list so the player only needs to enter the number temporarily associated with the
desired character. This makes it quicker and easier to use.
!color
The !color command allows the player to choose between 5 different interface colors:
Green
Blue
Magenta
Yellow
White
Notes:
The colors vary from terminal to terminal, so your mileage may vary on what they end up looking
like.
The !color command is disabled while the player is dead. When the player dies, the interface
automatically changes to red. If the server the player is connected to has a revival system in
place, the interface will return to whatever color the player chose before they died when they
are revived.
!bottom
The !bottom command scrolls the main window all the way down. If you are scrolled far up and want to
save time scrolling down, !bottom is the command to use.
!cbottom
The !cbottom command scrolls the message window all the way down, just like the !bottom command.
!leave
The !leave command sends type 12 leave request to the
server,
exits ncurses terminal mode, frees memory, and exits LURKMAN.
Gallery
Screenshots
Example Video
Below is a short video demonstrating LURKMAN. I move through the server, check a character's
description, and lose a fight to enemies.