Banner with text reading 'LURKMAN'

LURKMAN Usage Guide

Welcome to the LURKMAN usage guide!



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.





Building and Running


Packages Needed


Notes:
  • 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:

g++ main.cpp receive_from_server.cpp send_to_server.cpp curses_control.cpp handle_receive.cpp helper_funcs.cpp -o lurkman -O3 -lncursesw -pthread -lgvc -lcgraph

There is also an included Makefile which will build the executable upon simply running:

make




Commands and Features


Scrolling the windows

Scrolling the main window in LURKMAN. Click to enlarge
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

Using the !help command in LURKMAN. Click to enlarge
The !help command simply prints a list of available commands and their purposes.

!make

After using the !make command in LURKMAN. An accept of type 10 was received. Click to enlarge
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:
  1. Character name (up to 31 letters long)
  2. Whether the player would like to automatically join battles (y/n)
  3. Desired attack value
  4. Desired defense value
  5. Desired regeneration value
  6. 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

After using the !start command in LURKMAN. Click to enlarge
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

After using the !qmake command in LURKMAN. Note the attack, defense, and regeneration defaults. Click to enlarge
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

After using the !move command in LURKMAN to move to room 5. Click to enlarge
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

A sample map created using the !map command. Click to enlarge
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

Using the !back command to return to room 1 from room 2. Click to enlarge
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

A fight initiated using the !fight command. Click to enlarge
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

Using the !loot command. Click to enlarge
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

Using the !pvp command on ttydServ. Click to enlarge
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

Using the !msgn command multiple times to engage in conversation with other players. Click to enlarge
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

Using the !msg command to talk with players in different rooms. Click to enlarge
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

Using the !playerlist command. Click to enlarge
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

Using the !monsterlist command. Click to enlarge
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

Using the !alive command. Note that "Bryan" is excluded from the list !alive generates. Click to enlarge
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

Using the !roomlist command. Click to enlarge
The !roomlist command displays a list of all rooms that connect to the current room.

!about

Using the !about command. Click to enlarge
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

Using the !color command to change the interface to green. Click to enlarge
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

Using the !bottom command. Click to enlarge
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

Using the !cottom command. Click to enlarge
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.






Screenshots

Screenshot of the LURKMAN program



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.