/[cvs]/wurmi/README
ViewVC logotype

Contents of /wurmi/README

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.4 - (show annotations)
Mon Sep 10 18:19:42 2007 UTC (11 years, 1 month ago) by riso
Branch: MAIN
CVS Tags: HEAD
Changes since 1.3: +5 -6 lines
Very final version

1 Wurmi
2 =====
3
4 This code was written for ETH Studienwoche 10.-14. September 2007,
5 (c) Rastislav Kralovic, Richard Kralovic.
6
7 Introduction
8 ------------
9
10 The goal of the player is to control one worm in the classic game Wurmi.
11 The worm can move one tile forward, left or right in each move. If it eats
12 food, it grows by one tile. If it hits the wall, another worm, or itself, it
13 dies instantly. The goal is to grow as large as possible.
14
15 The program controlling each worm is run as separate process, communicating
16 with the arbiter (i.e. the control program) through standard input/output.
17
18 Dependencies
19 ------------
20
21 - libSDL
22
23 Architecture
24 ------------
25
26 arbiter --- tcp/ip ---> streamer ---- tcp/ip ---> viewer
27 / | ... \ \--- tcp/ip ---> viewer
28 / | \ (stdio) ...
29 / | \ \--- tcp/ip ---> viewer
30 player1 player2 playerN
31
32
33 arbiter.c: The main game control program. Usage:
34 arbiter <streamer port> <width> <height> <food> <moves> <timeout> <games each> <players> <player_dir>
35 <streamer port> - master port of the streamer multiplexer
36 <width> <height> - size of the playing board
37 <food> - amount of food generated
38 <timeout> - timeout for 1 move of 1 player in ms
39 <games each> - if -1, <players> players are selected randomly from <player_dir>
40 (only filenames *.plr are considered; they should be executables)
41 - if positive, a tournament is played where each player plays
42 <games each> games.
43 Player with file xyz.plr is named as "xyz", unless the file xyz.name
44 exists. In that case, its name is read from that file.
45
46 streamer.c: A simple multiplexer. Usage:
47 streamer master-port client-port [-single]
48 Listens on <master-port>. Everything that is written here is sent verbatim
49 to all clients connected to <client-port>. If -single, it ends after the
50 <master-port> connection is closed.
51
52 viewer.c: A graphical viewer of the game. Usage:
53 -?, --help : print this help page
54 -v : verbose debug messages (default off)
55 -f : fullscreen (default off)
56 -hw : use video memory (default no)
57 -w <width> : force width (default none)
58 -h <height>: force height (default none)
59 -b <bpp> : depth (default 32)
60 -sc <width> : width of right-hand scores table
61 -d <delay> : frame delay in microsec. (default 10000)
62 -s <ip address> : address of the streaming server
63 -p <port> : port of the streaming server
64 -single : single game. If specified, ends after the first game is over.
65 Otherwise runs until closed by pressing escape.
66
67 run.local: run the whole architecture locally. Player binaries are taken
68 from directory ./players.
69
70 players/Random.c - an example player (completely random)
71 players/Random.pas - an example player (freepascal version)
72 players/DeMent.c - an example player (slightly better)
73
74 License
75 -------
76
77 Everything except font.ttf is GPL (see License)
78 font.ttf: License.font.ttf
79

CVS Admin">CVS Admin
ViewVC Help
Powered by ViewVC 1.1.26