Skip to content

Commit 743d4d7

Browse files
authored
Fix visual artifacts (#10722)
* Replace GIFs with WEBM videos in 2D movement tutorial * Update video references in 2D movement tutorial to use WEBM format
1 parent b12476f commit 743d4d7

9 files changed

+28
-4
lines changed

tutorials/2d/2d_movement.rst

Lines changed: 28 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,13 @@ In this scenario, you want the user to press the four directional keys (up/left/
3434
or W/A/S/D) and move in the selected direction. The name "8-way movement" comes from the
3535
fact that the player can move diagonally by pressing two keys at the same time.
3636

37-
.. image:: img/movement_8way.gif
37+
.. video:: video/movement_8way.webm
38+
:alt: 8-way movement
39+
:autoplay:
40+
:loop:
41+
:muted:
42+
:align: default
43+
:width: 100%
3844

3945
Add a script to the character body and add the following code:
4046

@@ -98,7 +104,13 @@ This type of movement is sometimes called "Asteroids-style" because it resembles
98104
how that classic arcade game worked. Pressing left/right rotates the character,
99105
while up/down moves it forward or backward in whatever direction it's facing.
100106

101-
.. image:: img/movement_rotate1.gif
107+
.. video:: video/movement_rotate_keyboard.webm
108+
:alt: Rotation + movement
109+
:autoplay:
110+
:loop:
111+
:muted:
112+
:align: default
113+
:width: 100%
102114

103115
.. tabs::
104116
.. code-tab:: gdscript GDScript
@@ -160,7 +172,13 @@ This style of movement is a variation of the previous one. This time, the direct
160172
is set by the mouse position instead of the keyboard. The character will always
161173
"look at" the mouse pointer. The forward/back inputs remain the same, however.
162174

163-
.. image:: img/movement_rotate2.gif
175+
.. video:: video/movement_rotate_mouse.webm
176+
:alt: Rotation + movement (mouse)
177+
:autoplay:
178+
:loop:
179+
:muted:
180+
:align: default
181+
:width: 100%
164182

165183
.. tabs::
166184
.. code-tab:: gdscript GDScript
@@ -219,7 +237,13 @@ Click-and-move
219237
This last example uses only the mouse to control the character. Clicking
220238
on the screen will cause the player to move to the target location.
221239

222-
.. image:: img/movement_click.gif
240+
.. video:: video/movement_click.webm
241+
:alt: Click-and-move
242+
:autoplay:
243+
:loop:
244+
:muted:
245+
:align: default
246+
:width: 100%
223247

224248
.. tabs::
225249
.. code-tab:: gdscript GDScript

tutorials/2d/img/movement_8way.gif

-92 KB
Binary file not shown.

tutorials/2d/img/movement_click.gif

-122 KB
Binary file not shown.

tutorials/2d/img/movement_rotate1.gif

-134 KB
Binary file not shown.

tutorials/2d/img/movement_rotate2.gif

-125 KB
Binary file not shown.

tutorials/2d/video/movement_8way.webm

82.1 KB
Binary file not shown.
59.2 KB
Binary file not shown.
Binary file not shown.
195 KB
Binary file not shown.

0 commit comments

Comments
 (0)