Check config_file arguments for NULL
[neverball] / doc / MANUAL
1
2                             * Neverball *
3
4
5 Tilt the  floor to roll a  ball through an obstacle  course within the
6 given  time.  If  the  ball falls  or time  expires, a ball is lost.
7
8 Collect coins to unlock the exit  and earn extra balls.  Red coins are
9 worth 5.  Blue coins are worth 10.  A ball is awarded for 100 coins.
10
11
12 * INSTRUCTIONS
13
14 Click Play  to begin.   Mouse motion tilts  the floor.   Mouse buttons
15 rotate the viewpoint.  The following  keyboard controls are defined by
16 default; most  of them can  be changed  in a configuration  file.  See
17 below for details.
18
19     ESC    Pause and resume / Exit
20     SHIFT  Fast camera rotation
21
22     F1     Default Camera
23     F2     Lazy Camera
24     F3     Static Camera
25
26     F6     Hide HUD
27     F8     Toggle nice mode
28     F9     Toggle frame counter
29     F10    Snap a screenshot
30
31     UP     Tilt the floor forward
32     DOWN   Tilt the floor backward
33     LEFT   Tilt the floor left
34     RIGHT  Tilt the floor right
35
36     D      Rotate the view right
37     S      Rotate the view left
38
39     R      Restart the current level
40
41     TAB    Cycle through scores in high-score table
42
43
44 * LEVEL PROGRESSION
45
46 Neverball levels are grouped in  level sets.  All sets are immediately
47 accessible to the player, and track of progress is kept separately for
48 each set.  The player starts out  at the first level and must complete
49 each level in turn to unlock subsequent levels until all levels in the
50 set are completed.   A level is "unlocked" by  completing the previous
51 level in the  progression or if it  is the first level of  the set.  A
52 level  is "completed"  by collecing  the required  amount of  coins to
53 activate the goal in the level and reaching said goal.
54
55 There are  two game  modes or  ways of  progressing through  levels in
56 Neverball.  Each  mode is essentially  a subset  of the single  way of
57 playing present in Neverball 1.4.0.
58
59 In 1.4.0, the game keeps track of "lives" or balls, preventing a level
60 from being retried once the balls run out, however, unlocked/completed
61 levels remain accessible in the menu at all times.  As a special case,
62 1.4.0  also records  a set  high-score (see  below for  information on
63 high-scores)  when all  levels  of a  set are  played  through in  one
64 attempt, with  the condition  that no successfully-completed  level be
65 restarted during the run.
66
67 To  address  some of  the  problems  with  this  mode of  playing,  in
68 Neverball 1.5.0  it was  split into two  separate modes:  the "normal"
69 mode and the challenge mode.
70
71 In   the   normal  mode,   no   track   of   balls  is   kept.    Each
72 unlocked/completed level is immediately  accessible and can be retried
73 and restarted mid-game as often as desired.
74
75 In the challenge  mode, the player is given a  limited number of balls
76 and starts  out at the  first level of the  set with all  other levels
77 locked.  The game ends once the balls run out or all levels in the set
78 are completed.  A set score is  recorded for a successful run.  Levels
79 cannot be restarted, but can be retried.
80
81 In addition to regular  1.4.0-style levels, Neverball 1.5.0 introduces
82 bonus levels: extra levels awarded  for playing challenge mode.  Bonus
83 levels can only  be unlocked by completing all the  levels before them
84 in  challenge  mode,  however,  bonus levels  themselves  are  skipped
85 challenge mode; after  they have been unlocked, they can  be played in
86 the normal mode as any regular level.
87
88
89 * USER DATA FILES
90
91 Neverball  creates a  directory in  which it  stores user  data files.
92 These files include high scores, replays, and configurations.
93
94 Under Unix, Linux,  and OSX this directory is  called ".neverball" and
95 is created in  the user's home directory,  specifically, the directory
96 set in the HOME environment variable.
97
98 Under Windows  it is called "Neverball"  and is created in  the user's
99 application  data  directory the  location  of  which is  obtained  by
100 inspecting the  APPDATA environment variable.   An easy way  to access
101 this directory is by typing  %APPDATA% in the Windows Explorer address
102 bar.  If the location could not  be determined, it is assumed that the
103 user has permission to write to  the game data directory, and the user
104 data directory is created within.
105
106
107 * HIGH SCORES
108
109 The top  three fastest times  through each  level, the top  three coin
110 scores and the top three goal  unlock scores for each level are stored
111 in files named neverballhs-* in the user data directory.
112
113 The top  three fastest  times and  most coins scores  for each  set of
114 levels are also stored.  To achieve  a set score, the player must play
115 through all levels of a set in challenge mode.
116
117 The total set time will  include time spent during both successful and
118 unsuccesful level  plays, thus  time-outs and fall-outs  count against
119 the total time.
120
121 The  total  set  coin  count  will include  only  coins  collected  on
122 successful  level plays.   This  prevents unbounded  coin scores  from
123 being collected on levels with more than 100 coins.
124
125
126 * REPLAYS
127
128 Neverball  includes a  mechanism for  recording and  replaying levels.
129 The player may enter  a name for each replay at the  end of the level.
130 By default, the most recent unsaved  level will be saved to the replay
131 file named "Last.nbr".
132
133 Replay  files are  stored in  the user  data directory.   They  may be
134 copied freely.  To  view a replay you have  downloaded, simply move it
135 to  the user  data directory  and it  will appear  in the  Replay menu
136 in-game.
137
138
139 * CONFIGURATION
140
141 Game  settings are stored  in the  file neverballrc  in the  user data
142 directory.  This file is created  when the game exits.  It consists of
143 key /  value pairs.  Some of  these values are  configurable using the
144 in-game  options  screen.  Other  meaningful  keys  and their  default
145 values follow.
146
147     width  800
148     height 600
149
150         These keys determine the effective display resolution.  If for
151         any reason  the resolution you're looking  for isn't available
152         in the in-game settings, you can modify these values instead.
153
154     mouse_sense 300
155
156         This  key controls  mouse  sensitivity.  The  value gives  the
157         number of screen pixels the  mouse pointer must move to rotate
158         the floor  through its entire  range.  A smaller  number means
159         more sensitive.
160
161     mouse_invert 0
162
163         This key inverts the vertical mouse axis if set to 1.
164
165     key_camera_1 f1
166     key_camera_2 f2
167     key_camera_3 f3
168     key_camera_l d
169     key_camera_r s
170
171         These keys  define keyboard mappings for  camera selection and
172         rotation.   Key  names  are specified  using  SDL's  canonical
173         key  naming   convention  (for   a  mostly-complete   list  of
174         non-single-letter  key  names,  see  share/keynames.c  in  the
175         source archive).  The three camera behaviors are as follows:
176
177         1 - Strict  camera stays behind the ball by  cueing off of the
178         velocity of the  ball.  It is very  responsive,  but sometimes
179         confusing.
180
181         2 - Lazy  camera chases a point a set  distance from the ball.
182         It is seldom  surprising, but at times it  is not sufficiently
183         responsive.
184
185         3 - Locked camera  does not rotate  except by  player command.
186
187     key_forward  up
188     key_backward down
189     key_left     left
190     key_right    right
191
192         These keys define keyboard mappings for tilt control.
193
194     key_pause escape
195
196         This  key defines  a  keyboard mapping  for pause  activation.
197         Before version 1.5.0, this mapping was hard-coded to the space
198         bar and Escape key was used  to immediately exit the game.  To
199         restore  this behaviour,  set  key_pause  to "space"  (without
200         quotes).
201
202     key_restart r
203
204         This key defines a keyboard  mapping for a mid-game restart of
205         the  current  level.   Handy  when  trying  to  record  a  new
206         high-score, this function isn't available in challenge mode.
207
208     key_score_next tab
209
210         This key defines  a keyboard mapping for  cycling through Most
211         Coins / Best Times / Unlock  Goal score tabs in the high-score
212         board.
213
214     view_fov 50
215     view_dp  75
216     view_dc  25
217     view_dz  200
218
219         These keys  define the view of the ball.  They give  the field
220         of view in degrees,  the height of the view point,  the height
221         of the view center,  and the horizontal distance from the ball
222         in centimeters, respectively.  (The ball is  50 centimeters in
223         diameter in most levels.)
224
225         The default values  for these keys changed with version 1.2.6.
226         Some players may be interested in using the  old values.  They
227         were as follows:
228
229             view_fov 40
230             view_dp  400
231             view_dc  0
232             view_dz  600
233
234     rotate_fast 200
235     rotate_slow 100
236
237         These keys control the rate of camera rotation.  Roughly, they
238         give  the rate  of lateral  camera motion  in  centimeters per
239         seconds,  so the  actual rotation  rate depends  upon view_dz,
240         above.  The fast rate is used when the Shift key is held down.
241
242     fps 0
243
244         This key enables an on-screen frames-per-second counter. Press
245         F9 to toggle this flag in-game.
246
247     nice 0
248
249         This  key  enables  a  delay  function  after  each  frame  is
250         rendered, forcing a context  switch and ensuring that the game
251         does not utilize 100% of the CPU.  0 is off, 1 is on.
252
253         If the  frame rate is not  fast enough for you,  or you simply
254         want to  test the  performance of the  game on  your hardware,
255         disable it.
256
257         Press F8 to toggle this flag in-game.
258
259     ball_file ball/basic-ball/basic-ball
260
261         This key determines the model used for the ball.
262
263     replay_name %s-%l
264
265         This  key specifies  the  format of  the  default replay  name
266         generated when saving replays.
267
268         The value  of replay_name  can include regular  characters and
269         special  character sequences  which act  as place-holders  for
270         certain "dynamic" text.  These sequences are recognised:
271
272             %s  current set identifier (such as "easy" or "mym")
273             %l  current level identifier (such as "03" or "IV")
274             %%  single percentage sign
275
276         Any  other sequence  starting with  % will  be reported  as an
277         error and skipped.
278
279         The resulting  replay name is  also suffixed by  an underscore
280         and  a unique  2-digit number  to avoid  name collisions  with
281         existing replays.
282
283     stats 0
284
285         This  key enables  print-out (to  standard output)  of running
286         statistics of  the current  frame time  and frames-per-second,
287         averaged over 250 milliseconds.  Most people won't need this.
288
289     uniform 0
290
291         This  key controls  the  frequency of  graphical updates  with
292         respect to physics updates.
293
294         When  uniform is  N, then  there  will be  exactly N  physical
295         updates per graphics update, regardless of the passage of real
296         time.  So for example, if uniform is 1 then you will see every
297         physics update  rendered exactly once.   The default is  0 and
298         the option is disabled.
299
300         A further functionality  is built atop the  uniform option: if
301         the  uniform value  is  negative  then the  game  will take  a
302         screenshot  at  each  frame.   This  may  be  used  to  record
303         high-quality movies of replays.  Set uniform to -3 and start a
304         replay using  the --replay command  line option, and  you will
305         find a 30FPS movie written as a series of PNGs.
306
307         On an unfortunate note: audio is handled in a separate thread,
308         and there is no support for outputting audio synchronized with
309         a movie created in this fashion.
310
311     screenshot 0
312
313         This key holds  the current screen-shot index.   The number is
314         incremented every time a new screen-shot is taken (by pressing
315         F10 or in  uniform mode) and it is appended  to the image file
316         name.
317
318     stereo 0
319
320         This key  enables quad-buffered stereo viewing  for those with
321         the hardware to support it.  It gives an angle in degrees that
322         determines the  interocular distance.  0  is normal non-stereo
323         viewing.  2 gives  a  good  stereo effect.   If  the eyes  are
324         swapped, give a negative value, like -2.
325
326     vsync 1
327
328         This key controls vertical  blanking synchronization.  1 is on
329         (and is the default), 0 is off.
330
331     multisample 0
332
333         This key enables multisample full-screen antialiasing.  Values
334         can be 2,  4, 8, etc., and can be  overspecified; in such case
335         the game  will search for  the highest level  of multisampling
336         supported by  your hardware.  (The best  value eventually gets
337         written to the config file.)
338
339     mipmap 0
340     aniso  0
341
342         These  keys  control  mipmapping  and  anisotropic  filtering,
343         respectively.
344
345         With mipmapping, smaller versions of  each texture are kept in
346         video  memory, and  are referenced  when a  texture is  viewed
347         from  a distance.   This  improves video  cache coherence  and
348         eliminates texture  "swimming" on detailed textures  when seen
349         from afar.  To enable mipmapping, set mipmap to 1.
350
351         Related to mipmapping is anisotropic filtering.  "Anisotropic"
352         basically means "not the same from all directions".  It refers
353         to  cases where  a texture  might need  to be  compressed more
354         vertically than  horizontally.  For  example, if a  texture is
355         applied  to a  flat surface  and seen  from far  away then  it
356         appears  much wider  than high.   Anisotropic filtering  takes
357         care of  this.  To enable  it, set aniso  to a small  power of
358         two.   If  you  have  weak hardware,  this  feature  won't  do
359         anything.
360
361     joystick 0
362
363         This key  enables joystick control.  0  is off, 1  is on.  The
364         game may still be controlled with the mouse even while gamepad
365         control  is enabled.   However,  random noise  from an  analog
366         controller at rest can disrupt normal mouse input.
367
368     joystick_device 0
369
370         This  number selects  which joystick  to use if  more than one
371         joystick is  found. 0 is the first  joystick, 1 is the  second
372         and so on.
373
374     joystick_axis_x 0
375
376         Joystick horizontal axis number
377
378     joystick_axis_y 1
379
380         Joystick vertical axis number
381
382     joystick_button_a 0
383
384         Joystick menu select button
385
386     joystick_button_b 1
387
388         Joystick menu cancel button
389
390     joystick_button_r 2
391
392         Joystick counter-clockwise camera rotation button
393
394     joystick_button_l 3
395
396         Joystick clockwise camera rotation button
397
398     joystick_button_exit 4
399
400         Joystick exit button
401
402     wiimote_addr
403
404         This key  specifies the address  of your Nintendo  Wii Remote.
405         For more  information, see the  section on using  Wiimote with
406         Neverball.
407
408
409 * WIIMOTE SUPPORT
410
411 For information  on how to build  the game with Wiimote  support under
412 Linux, see instructions in the file INSTALL in the source archive.
413
414 To use it, first make sure you've set up all the Bluetooth mumbo-jumbo
415 in your kernel  and what-not.  Once this is done,  you'll need to find
416 out your Wiimote's address like this:
417
418     $ hcitool scan
419     Scanning ...
420             00:1B:7A:3E:45:7F       Nintendo RVL-CNT-01
421
422 This  hexadecimal   string  must  go   in  the  neverballrc   file  as
423 "wiimote_addr 00:1B:7A:3E:45:7F" so that the game knows that there's a
424 Wiimote to be used.
425
426 Now, when  you start the game  everything will proceed normally  but a
427 background thread  will place your Bluetooth  device into discoverable
428 mode.  You've got about  15 seconds to press 1 and  2 on your wiimote.
429 The Wiimote's LEDs will flash, and once the game makes friends with it
430 the Player 1 LED will be lit.  If you don't activate your Wiimote then
431 the  game  will  behave  normally and  the  Bluetooth  discovery  will
432 eventually time out.
433
434 From  there,  the  Wiimote  digital  pad works  like  a  joystick  for
435 navigating menus.  A and  B buttons are the A and  B buttons.  Home is
436 Pause.  Plus and  Minus are camera rotation controls.   Also, the tilt
437 sensor controls the floor.
438
439 The  Wiimote tilt  sensor is  a  surprisingly noisy  device, so  heavy
440 filtering is applied to the input.   For this reason, the controls may
441 feel sluggish.  This might improve with  an IR sensor bar, but has not
442 been tested.
443
444
445 Web: <http://neverball.org/>