diff --git a/tutorials/2d/2d_movement.rst b/tutorials/2d/2d_movement.rst index 1f5da929bec..e012e063bf3 100644 --- a/tutorials/2d/2d_movement.rst +++ b/tutorials/2d/2d_movement.rst @@ -34,7 +34,13 @@ In this scenario, you want the user to press the four directional keys (up/left/ or W/A/S/D) and move in the selected direction. The name "8-way movement" comes from the fact that the player can move diagonally by pressing two keys at the same time. -.. image:: img/movement_8way.gif +.. video:: video/movement_8way.webm + :alt: 8-way movement + :autoplay: + :loop: + :muted: + :align: default + :width: 100% Add a script to the character body and add the following code: @@ -98,7 +104,13 @@ This type of movement is sometimes called "Asteroids-style" because it resembles how that classic arcade game worked. Pressing left/right rotates the character, while up/down moves it forward or backward in whatever direction it's facing. -.. image:: img/movement_rotate1.gif +.. video:: video/movement_rotate_keyboard.webm + :alt: Rotation + movement + :autoplay: + :loop: + :muted: + :align: default + :width: 100% .. tabs:: .. code-tab:: gdscript GDScript @@ -160,7 +172,13 @@ This style of movement is a variation of the previous one. This time, the direct is set by the mouse position instead of the keyboard. The character will always "look at" the mouse pointer. The forward/back inputs remain the same, however. -.. image:: img/movement_rotate2.gif +.. video:: video/movement_rotate_mouse.webm + :alt: Rotation + movement (mouse) + :autoplay: + :loop: + :muted: + :align: default + :width: 100% .. tabs:: .. code-tab:: gdscript GDScript @@ -219,7 +237,13 @@ Click-and-move This last example uses only the mouse to control the character. Clicking on the screen will cause the player to move to the target location. -.. image:: img/movement_click.gif +.. video:: video/movement_click.webm + :alt: Click-and-move + :autoplay: + :loop: + :muted: + :align: default + :width: 100% .. tabs:: .. code-tab:: gdscript GDScript diff --git a/tutorials/2d/img/movement_8way.gif b/tutorials/2d/img/movement_8way.gif deleted file mode 100644 index b1c94455bc8..00000000000 Binary files a/tutorials/2d/img/movement_8way.gif and /dev/null differ diff --git a/tutorials/2d/img/movement_click.gif b/tutorials/2d/img/movement_click.gif deleted file mode 100644 index 6aa2a3cf04b..00000000000 Binary files a/tutorials/2d/img/movement_click.gif and /dev/null differ diff --git a/tutorials/2d/img/movement_rotate1.gif b/tutorials/2d/img/movement_rotate1.gif deleted file mode 100644 index 975cd335937..00000000000 Binary files a/tutorials/2d/img/movement_rotate1.gif and /dev/null differ diff --git a/tutorials/2d/img/movement_rotate2.gif b/tutorials/2d/img/movement_rotate2.gif deleted file mode 100644 index 376ff6a56d2..00000000000 Binary files a/tutorials/2d/img/movement_rotate2.gif and /dev/null differ diff --git a/tutorials/2d/video/movement_8way.webm b/tutorials/2d/video/movement_8way.webm new file mode 100644 index 00000000000..d88b3ea686f Binary files /dev/null and b/tutorials/2d/video/movement_8way.webm differ diff --git a/tutorials/2d/video/movement_click.webm b/tutorials/2d/video/movement_click.webm new file mode 100644 index 00000000000..a39adad4346 Binary files /dev/null and b/tutorials/2d/video/movement_click.webm differ diff --git a/tutorials/2d/video/movement_rotate_keyboard.webm b/tutorials/2d/video/movement_rotate_keyboard.webm new file mode 100644 index 00000000000..759cb0760d8 Binary files /dev/null and b/tutorials/2d/video/movement_rotate_keyboard.webm differ diff --git a/tutorials/2d/video/movement_rotate_mouse.webm b/tutorials/2d/video/movement_rotate_mouse.webm new file mode 100644 index 00000000000..f17ce4a3955 Binary files /dev/null and b/tutorials/2d/video/movement_rotate_mouse.webm differ