Skip to content

Commit

Permalink
fix README and Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
sauerbraten committed Jan 9, 2021
1 parent 8fab6d3 commit f495639
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ apply-patches:
$(PATCH) < patches/execfile.patch
$(PATCH) < patches/include_p1xbraten_menus.patch
$(PATCH) < patches/tex_commands.patch
$(PATCH) < patches/decouple_input.patch
$(PATCH) < patches/decouple_framedrawing.patch
unix2dos src/vcpp/sauerbraten.vcxproj

gzip-menus:
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,11 +118,11 @@ You can easily configure the hud frag messages using the [improved menu](#menu)
### [decouple_framedrawing.patch](./patches/decouple_framedrawing.patch)

- removes fps-induced limiting of the main loop (for example, input & network processing were affected by `maxfps`)
- introduce `maxtps` var to limit the main loop independently from `maxfps` (for example to save power): 0 to disable limiting, 1..1000 to set how many ticks per second are allowed; `maxfps` overrides `maxtps` if `maxfps < maxtps`
- introduce `tickrate` var to limit the main loop independently from `maxfps` (for example to save power): 0 to disable limiting, 1..1000 to set how many ticks per second are allowed; `maxfps` overrides `tickrate` if `maxfps < tickrate`

This patch allows using `maxfps` without compromising on the frequency of input polling and network event processing. In vanilla Sauerbraten, `maxfps` limits the whole game's main loop. This patch removes the main loop limit and instead skips frame drawing until a new frame is needed, but still processes network events and player input on every iteration.

While vanilla Sauerbraten is truly unlimited after `/maxfps 0`, p1xbraten sets `/maxtps 1000` by default to play nice with the OS. Setting `maxfps` to any value other than 0 also forces a maximum tick rate of 1000 (but respects lower settings), even if `maxtps` is 0, so that p1xbraten can prioritise frame draw timing. Set both `maxfps` and `maxtps` to 0 to get vanilla's unlimited behavior back.
While vanilla Sauerbraten is truly unlimited after `/maxfps 0`, p1xbraten sets `/tickrate 1000` by default to play nice with the OS. Setting `maxfps` to any value other than 0 also forces a maximum tick rate of 1000 (but respects lower settings), even if `tickrate` is 0, so that p1xbraten can prioritise frame draw timing. Set both `maxfps` and `tickrate` to 0 to get vanilla's unlimited behavior back.

## Installation

Expand Down

0 comments on commit f495639

Please sign in to comment.