home · contact · privacy
Server: Make objects definable as "consumable" to gain n hitpoints.
[plomrogue] / README
1 plomrogue
2 =========
3
4 plomlompom tries to build his own roguelike. It doesn't do much yet (although
5 plomlompom has insanely ambitious long-term plans).
6
7 You can move around a player on an island and meet different enemies. You have 5
8 hitpoints to lose before death. Enemies start with different amounts of
9 hitpoints, depending on their species. Dead enemies become dirt, skeletons or
10 "magic meat" -- such objects can be collected, and "magic meat" can be consumed
11 to gain hitpoints. Note that different kinds of movements/actions take different
12 numbers of turns to finish.
13
14 Enemies' AI is very dumb so far: Each turn, they try to move towards their
15 shortest-path-wise nearest enemy. If no enemy is found in their surroundings,
16 they just wait.
17
18 Diagonal movement is possible, but takes (40%) longer than orthogonal movement.
19
20 Once you start a new world, every move of yours is recorded in a file called
21 "record". Once you re-start the game, all of your previous moves are replayed
22 automatically up to the point wherere you left the game. To start over in a new
23 world, simply delete this file.
24
25 System requirements / installation / running the game
26 -----------------------------------------------------
27
28 The game is expected to run on Linux systems that contain the ncurses library.
29 Do the following steps:
30
31 $ git clone https://github.com/plomlompom/plomrogue
32 $ cd plomrogue
33 $ make
34 $ ./roguelike
35
36 (It may also work on other Unix-like systems with ncurses, who knows.)
37
38 Make generates two executables ./roguelike-server and ./roguelike-client.
39 ./roguelike is a pre-existing shell script that merely executes both of them,
40 with the server as a background job. You can also ignore the script and start
41 the two by hand.
42
43 Client's keybindings and window management
44 ------------------------------------------
45
46 In the client's default window configuration, the window appearing on the left
47 sports a list of keybindings available globally, and additionally via the window
48 selected as active.
49
50 Hit "w" (per default keybindings) to switch the "active" window to a view that
51 allows changing its geometry. One more hit on "w" switches the window to a view
52 that allows changing its window-specific keybindings. The global keybindings can
53 be changed in the "Global keys" window, those of the window geometry
54 configuration in the "Window geometry keys" window, and those of the
55 window-specific keybindings configuration in the "Window keybinding keys"
56 window; by default, these three windows are not visible, but may be turned on by
57 (per default keybindings) hitting the "F6", "F7" and "F8" keys.
58
59 Keybindings and default window selection / visibilities / geometries are read
60 from the textfile ./confclient/interface_conf by default, or by another one
61 named by the -i command line option of the client. Some other default window
62 configurations are stored below ./confclient/single_windows/: "map", "info",
63 "inventory" and "log". Each of these opens up only a single window into the
64 client, filling up the entire terminal. This may be useful for running multiple
65 clients in parallel in multiple terminal windows that can be managed by one's
66 own window manager choice, instead of relying on plomrogue-client's bizarre
67 in-client window management.
68
69 Replay game recording
70 ---------------------
71
72 Run "./roguelike -s" to watch a recording of the current game from the
73 beginning. Hit any player action key to increment turns (they will not trigger
74 the actions usually mapped to them, only repeat the actions done at that point
75 in the game as defined in the "record" file). Keys to manage windows, scroll on
76 the map and quit the program do their usual thing. Append a number to the -s
77 option (like "-s100") to start the recording at the respective turn number.
78
79 Hacking / server internals and configuration
80 --------------------------------------------
81
82 The movements/actions available to the player and the enemies are defined and
83 can be changed in ./confserver/map_object_actions. Each entry consists of a
84 first line of a numerical ID used internally to uniquely identify and manage the
85 action, a second line of the number of turns the action takes, and a third line
86 of a string that maps the action to the game logic to do when it is called.
87 Finally, a delimiter line of "%%" ends the entry.
88
89 The different map object types, i.e. species (including the player's human one)
90 and item types, can be edited in ./confserver/defs. Here the first value is a
91 numerical ID that represents the object type, the second one describes what type
92 this object decomposes to when it gets destroyed/killed, the third value is the
93 ASCII character used to represent the object visually on the map, the fourth
94 value is the number of hitpoints the object starts with (items are dead and
95 start with zero hitpoints, anything else moves), the fifth is the string that
96 names the object in the game log, the sixth defines if the object is consumable
97 (it is if it is non-zero) and how many hitpoints are gained if it is. Finally,
98 the same delimiter as for the map object action definitions file follows.
99
100 All source files are thoroughly documented to explain more details of
101 plomrogue's internals. The ./roguelike-server executable can be run with a -v
102 option for helpful debugging info (mostly: what messages the client sends to the
103 server). Server and client communicate via files in the ./server/ directory
104 (generated when the server is first run). The ./server/in file is read by the
105 server for newline-delimited commands. The ./server/out file contains server
106 messages to be read by clients. The ./server/worldstate file contains a
107 serialized representation of the game world's data as it is to be visible to
108 the player / the player's client.