Skip to content

Commit ffce2b4

Browse files
committed
Minor fixes of configuration and pygame-ce doc
* `configuration.md` fix grammar ("For these set the config attribute method" -> "For these use the config attribute method") * `pygame-ce.md` Removed "Our usage of `clock.tick()` and `dt` in the earlier code" which referenced removed code that existed earlier.
1 parent f74cba5 commit ffce2b4

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

docs/user-guide/configuration.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ _single_ `<py-config>` or `<mpy-config>` tag in your HTML document:
7878
these tags on the page per interpreter**.
7979

8080
Additionally, `<py-config>` only works for `py`/`mpy` type scripts and is not used
81-
with [`py-game`](../pygame-ce) or [`py-editor`](../editor). For these set the config
81+
with [`py-game`](../pygame-ce) or [`py-editor`](../editor). For these use the config
8282
attribute method.
8383

8484
## Options

docs/user-guide/pygame-ce.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -200,9 +200,7 @@ except RuntimeError:
200200
While the `await asyncio.sleep(1/60)` is a quick way to approximate 60 FPS,
201201
like all sleep-based timing methods in games this is not precise. Generating
202202
the frame itself takes time, so sleeping 1/60th of a second means total frame
203-
time is longer and actual FPS will be less than 60. Our usage of `clock.tick()`
204-
and `dt` in the earlier code ensures the ball will move at the correct rate,
205-
but performance will not be ideal.
203+
time is longer and actual FPS will be less than 60.
206204

207205
A better way is to do this is to run your game at the same frame rate as the
208206
display (usually 60, but can be 75, 100, 144, or higher on some displays). When
@@ -223,7 +221,7 @@ has displayed the frame. In the web version, the `vsync=1` will do nothing,
223221
each time the display updates.
224222

225223
Additionally, since frame lengths will be different on each machine, we need to
226-
account for this by creating and using a `dt` variable by using a
224+
account for this by creating and using a `dt` (delta time) variable by using a
227225
`pygame.time.Clock`. We update the speed to be in pixels per second and multiply
228226
by `dt` (in seconds) to get the number of pixels to move.
229227

0 commit comments

Comments
 (0)