1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
|
.\" $NetBSD: huntd.6,v 1.3 1998/01/09 08:03:42 perry Exp $
.\" $OpenBSD: huntd.6,v 1.21 2008/10/02 22:58:22 jmc Exp $
.\"
.\" Hunt
.\" Copyright (c) 1985 Conrad C. Huang, Gregory S. Couch, Kenneth C.R.C. Arnold
.\" San Francisco, California
.\"
.\" Copyright (c) 1985 Regents of the University of California.
.\" All rights reserved. The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\"
.Dd $Mdocdate: October 2 2008 $
.Dt HUNTD 6
.Os
.Sh NAME
.Nm huntd
.Nd hunt daemon, back-end for hunt game
.Sh SYNOPSIS
.Nm huntd
.Op Fl bs
.Op Fl a Ar addr
.Sm off
.Oo
.Fl D Ar var No = Ar value \ \&...
.Oc
.Sm on
.Op Fl p Ar port
.Sh DESCRIPTION
.Nm
controls the multi-player
.Xr hunt 6
game.
.Pp
The
.Fl a Ar addr
option is used to cause the server to listen only on a
specific interface address.
The
.Ar addr
argument must be given as an IP address.
.Pp
If the
.Fl b
option is specified,
.Nm
will fork and go into the background.
In this mode, errors will be logged via
.Va syslog
instead of to
.Va stderr .
.Pp
Options given with
.Fl D
override those read from configuration files
.Po
see
.Sx CONFIGURATION ,
below
.Pc .
.Pp
The
.Fl p Ar port
option changes the UDP port number used to rendezvous with the player
process and thus allows for private games of
.Xr hunt 6 .
.Pp
The
.Fl s
option is for running
.Nm
forever
.Pq server mode .
This is similar to running it under the control of
.Xr inetd 8
.Pq see below ,
but it consumes a process table entry when no one is playing,
and monitor clients are not disconnected.
.Ss INETD
To run
.Nm
from
.Xr inetd 8 ,
you'll need to
add this line to
.Pa /etc/inetd.conf :
.Pp
.Dl hunt dgram udp wait nobody /usr/games/huntd HUNT
.Pp
Do not use any of the command line options \(em if you want
.Xr inetd 8
to start up
.Nm huntd
on a private port, change the port listed in
.Pa /etc/services .
.Ss "NETWORK RENDEZVOUS"
When
.Xr hunt 6
starts up, it broadcasts on attached networks,
using the broadcast or point-to-point destination address for each interface,
to find a
.Nm hunt
game in progress.
If a
.Nm huntd
hears the request, it sends back the port number for the
.Nm hunt
process to connect to.
.Pp
Regardless of how
.Nm
is started, it always checks incoming connections with
.Xr hosts_access 5 ,
using a service name of
.Sq huntd .
.Ss "CONFIGURATION"
When
.Nm
starts, it looks for configuration files that determine
game parameters.
Each line of a configuration file is of the form
.Ar var No = Ar value .
Comments start with a hash sign
.Pq Sq # .
The configuration files loaded in order
.Pq if they exist
are:
.Pa /etc/hunt.conf ,
.Pa "$HOME/.hunt.conf" ,
and
.Pa ./.hunt.conf .
.Pp
Many of these variables require intimate knowledge of the
driver source code.
The complete list of configurable variables is as follows.
.Pp
.Bl -tag -width pdroneabsorb -compact
.It Va random
enable dispersion doors
.Pq default 1
.It Va reflect
enable generation of reflection walls
.Pq default 1
.It Va monitor
enable monitors
.Pq default 1
.It Va ooze
enable slime shots
.Pq default 1
.It Va fly
enable flight
.Pq default 1
.It Va volcano
enable volcanoes
.Pq default 1
.It Va drone
enable drone
.Pq default 1
.It Va boots
enable boots
.Pq default 1
.It Va scan
enable scanning
.Pq default 1
.It Va cloak
enable cloaking
.Pq default 1
.It Va logerr
errors to stderr
.Pq default 1
.It Va syslog
errors to
.Xr syslogd 8
.Pq default 0
.It Va scoredecay
nr deaths before nr kills begins to decay
.Pq default 15
.It Va maxremove
Maximum number of holes in the maze wall
.Pq default 40
.It Va linger
Seconds to keep game open with no players. \&-1 means forever
.Pq default 90
.It Va flytime
max time flying
.Pq default 20
.It Va flystep
max displacement each flying time unit
.Pq default 5
.It Va volcano_max
max size of volcano
.Pq default 50
.It Va ptrip_face
percentage chance of tripping a grenade on pickup
.Pq default 2
.It Va ptrip_back
percentage chance of same when backing onto it
.Pq default 95
.It Va ptrip_side
percentage chance of same when walking sideways into it
.Pq default 50
.It Va prandom
percentage of time dispersion doors appear
.Pq default 1
.It Va preflect
percentage of time reflection walls appear
.Pq default 1
.It Va pshot_coll
percentage chance of shots colliding
.Pq default 5
.It Va pgren_coll
percentage chance of grenades colliding
.Pq default 10
.It Va pgren_catch
facing player chance of catching grenade
.Pq default 10
.It Va pmiss
percentage chance of bullet missing player
.Pq default 5
.It Va pdroneabsorb
percentage chance of absorbing a drone
.Pq default 1
.It Va fall_frac
divisor of damage used for fall damage
.Pq default 5
.It Va bulspd
speed of bullets
.Pq default 5
.It Va ishots
initial ammo for player
.Pq default 15
.It Va nshots
ammo boost for all when new player joins
.Pq default 5
.It Va maxncshot
max number of simultaneous shots per player
.Pq default 2
.It Va maxdam
the initial shield for each player
.Pq default 10
.It Va mindam
minimum damage from one unit of ammo
.Pq default 5
.It Va stabdam
damage from stabbing
.Pq default 2
.It Va killgain
shield gained from killing someone
.Pq default 2
.It Va slimefactor
charge multiplier for slime
.Pq default 3
.It Va slimespeed
speed of slime
.Pq default 5
.It Va lavaspeed
speed of volcano lava
.Pq default 1
.It Va cloaklen
duration of a cloak
.Pq default 20
.It Va scanlen
duration of a scan
.Pq default 20
.It Va mindshot
minimum shot class needed to make a drone
.Pq default 2
.It Va simstep
maximum simulation step in microseconds.
Zero means traditional blocking behaviour.
Try 55000 for something reasonable
.Pq default 0
.El
.Sh "FILES"
.Bl -tag -width Pa -compact
.It Pa /etc/hunt.conf
.It Pa "$HOME/.hunt.conf"
.It Pa ./.hunt.conf
.El
.Sh SEE ALSO
.Xr hosts_options 5 ,
.Xr hunt 6 ,
.Xr inetd 8
.Sh AUTHORS
Conrad Huang, Ken Arnold, and Greg Couch;
.br
University of California, San Francisco, Computer Graphics Lab
.Pp
David Leonard tidied up, and added the configuration file.
.\"Sh BUGS
|