home · contact · privacy
Make PtIG default game, add documentation.
[plomrogue] / README
1 plomrogue
2 =========
3
4 plomlompom tries to build his own roguelike engine. There is one game for it so
5 far, which is loaded by default: "Please the Island God". See ./README_PtIG for
6 details on it.
7
8 System requirements / installation / running the game
9 -----------------------------------------------------
10
11 The engine is expected to run:
12 - on Unix systems with a vt100-like terminal environment (xterm will do)
13 - that contain the ncurses library
14 - and Python3 (version >= 3.2.3).
15
16 To build it, this is furthermore necessary:
17 - gcc (version >= 4.7.2); some llvm masked as gcc was tested successfully on OSX
18 - libc library headers (libc6-dev?)
19
20 To build and start it with the default game, just run:
21
22 $ ./roguelike
23
24 ./roguelike is a shell script that executes a union of ./roguelike-server and
25 ./roguelike-client, with the server as a background job. You may ignore the
26 script and start either or both of the two by hand if you please.
27
28 Save files, replay game recording, starting over
29 ------------------------------------------------
30
31 Every move of yours re-writes a file "save" that describes the new state of the
32 world, if more than 15 seconds have passed since its last writing. Once you
33 re-start plomrogue, the game state is recreated from the "save" file. To start
34 over in a new world, simply delete this file and re-start the engine.
35
36 The save file is called ./save be default, but another file name to use can be
37 given with the -l option (i.e. start the game with "./roguelike -l
38 alternate_savefile"). The -l option can also be used to start over in a new
39 world whose state will be read and saved with the alternate file path, without
40 overwriting other games saved in other save files.
41
42 Once you start a new world, every game action of yours is appended to a file
43 called "record_" plus the save file name. Run "./roguelike -s" to watch the
44 current game's recording from the beginning. Hit any player action key to
45 increment turns (they will not trigger the actions usually mapped to them, only
46 repeat the actions done at that point in the game as defined in the record
47 file). Other keys do their usual thing.
48
49 Append a number to the -s option (like "-s100") to start the recording playback
50 at the respective turn number. (Don't forget to delete / empty a game's record
51 file when deleting its save file, or different game's moves will get mixed up in
52 one record file.)
53
54 Hacking / server internals and configuration
55 --------------------------------------------
56
57 The game world is set up and made subject to player commands by
58 ./roguelike-server. It's controlled by commands explained in the file
59 ./SERVER_COMMANDS. The server usually reads these from the files ./server_run/in
60 (written to by ./roguelike-client), ./confserver/world, ./record_save and
61 ./save.
62
63 The ./roguelike-server executable can be run with a -v option for possibly
64 helpful debugging info (mostly: what messages the client sends to the server).
65
66 Server and client communicate via files in the ./server_run/ directory
67 (generated when the server is first run). The ./server_run/in file is read by
68 the server for newline-delimited commands. The ./server_run/out file contains
69 server messages to be read by clients. The ./server/worldstate file contains a
70 serialized representation of the game world's data as it is to be visible to the
71 player / the player's client.