Skip to content

Commit

Permalink
Added docs for new config options.
Browse files Browse the repository at this point in the history
  • Loading branch information
dsrw committed Sep 20, 2023
1 parent b596f56 commit a242489
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 12 deletions.
48 changes: 38 additions & 10 deletions docs/book/intro/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,36 +14,57 @@ a few configurable options:
default, this will be the `base_name` plus `-` and a number. Set to
`tutorial-1` by default.

- `show_stats`: Show FPS and other stats.
- `show_stats`: Show FPS and other stats. `false` by default.

- `god_mode`: Makes hidden units slightly visible, and allows editing locked
units.
units. `false` by default.

- `mega_pixels`: The render resolution, in mega pixels. Increase for more
detail. Decrease for better performance.
detail. Decrease for better performance. `2.0` by default.

- `start_full_screen`: Whether to start Enu full screen, or in a window.
- `start_full_screen`: Whether to start Enu full screen, or in a window. `true`
by default.

- `semicolon_as_colon`: Both `;` and `:` will be interpreted as `:`, allowing
`:` to be typed without shift. Sometimes useful for new typists.
`:` to be typed without shift. Sometimes useful for new typists. `false` by
default.

- `world_prefix`: The base name that Enu will use when creating or loading
a new level. Set to `tutorial` by default.

- `listen_address`: Set this to something reasonable, like `0.0.0.0`, to be a
server. Optionally you can add a `:` and a port number. Defaults to port 9632.
server. Optionally you can add a `:` and a port number. Empty by default. Will
use port `9632` if none is specified.

- `server_address`: Set this to an IP or host name to connect to a server.
Optionally you can add a `:` and a port number. Defaults to port 9632.
Optionally you can add a `:` and a port number. Empty by default. Will use
port `9632` if none is specified.

- `player_color`: The color of your avatar when in multiplayer. Set to a hex
color (like `#ffffff`) or one of Enu's built in colors (`blue`, `red`,
`green`, `black`, `white`, and `brown`). Defaults to a random color.
`green`, `black`, `white`, and `brown`). Defaults to a random hex color.

- `channel_size`: A debug option to configure the size of the channel between
the worker and the view. 5000 by default. Increasing this may improve
the worker and the view. `5000` by default. Increasing this may improve
performance at the cost of latency and memory usage. This option will probably
go away in the future.

- `walk_speed`: Normal ground movement speed. `500` by default.

- `fly_speed`: Normal flying speed. `1500` by default

- `alt_walk_speed`: Ground movement speed while `Shift`/`L3` is held or toggled.
`1000` by default.

- `alt_fly_speed`: Flying speed while `Shift`/`L3` is held or toggled. `250` by
default.

- `mouse_sensitivity`: Aim/look sensitivity while the mouse is captured. `5.0`
by default.

- `gamepad_sensitivity`: Gamepad aim/look sensitivity. `2.5` by default.

- `invert_gamepad_y_axis`: You know who you are. `false` by default.

## Example

Expand All @@ -61,6 +82,13 @@ a few configurable options:
"listen_address": "",
"server_address": "",
"player_color": "#6495ED",
"channel_size": 5000
"channel_size": 5000,
"walk_speed": 500,
"fly_speed": 1500,
"alt_walk_speed": 1000,
"alt_fly_speed": 250,
"mouse_sensitivity": 5.0,
"gamepad_sensitivity": 2.5,
"invert_gamepad_y_axis": false
}
```
2 changes: 0 additions & 2 deletions src/game.nim
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,6 @@ world: {state.world_name}
else:
get_screen_dpi(-1).float / 96.0

echo "Screen size: ", get_screen_size(-1), " scale ", screen_scale

var initial_user_config = self.load_user_config()

var chan_size = initial_user_config.channel_size || 5000
Expand Down

0 comments on commit a242489

Please sign in to comment.