Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion arcade/application.py
Original file line number Diff line number Diff line change
Expand Up @@ -875,7 +875,7 @@ def set_mouse_cursor_visible(self, visible: bool = True) -> None:
arrows by using features :class:``~arcade.Window`` inherits
from the underlying pyglet window class. See the
`pyglet overview on cursors
<https://pyglet.readthedocs.io/en/master/programming_guide/mouse.html#changing-the-mouse-cursor>`_
<https://pyglet.readthedocs.io/en/development/programming_guide/mouse.html#changing-the-mouse-cursor>`_
for more information.

Args:
Expand Down
2 changes: 1 addition & 1 deletion arcade/math.py
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@ def quaternion_rotation(axis: Point3, vector: Point3, angle: float) -> tuple[flo

This method of vector rotation is immune to rotation-lock, however it takes a little
more effort to find the axis of rotation rather than 3 angles of rotation.
Ref: https://danceswithcode.net/engineeringnotes/quaternions/quaternions.html.
Ref: https://web.archive.org/web/20240207004539/https://danceswithcode.net/engineeringnotes/quaternions/quaternions.html

Args:
axis (tuple[float, float, float]): The unit length vector that will be rotated around
Expand Down
2 changes: 1 addition & 1 deletion arcade/pymunk_physics_engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class PymunkPhysicsEngine:
.. note:: Arcade would welcome assistance with improving it.

If you are interested, please see Arcade's
`CONTRIBUTING.md <CONTRIBUTING.md: https://github.com/pythonarcade/arcade/blob/development/CONTRIBUTING.md>`_
`CONTRIBUTING.md <https://github.com/pythonarcade/arcade/blob/development/CONTRIBUTING.md>`_

Args:
gravity:
Expand Down
2 changes: 1 addition & 1 deletion doc/_includes/resources_Video.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ examples below may require installing both :ref:`guide-supportedmedia-ffmpeg` an

The links above use the unstable development branch of Arcade to gain access to the latest pyglet
and Arcade features. If you have questions or want to help develop these examples further, we'd love to hear
from you. The Arcade `Discord server <Arcade Discord>`_ and `GitHub repository <Arcade GitHub>`_ always welcome
from you. The Arcade `Discord server <Arcade Discord_>`_ and `GitHub repository <Arcade GitHub_>`_ always welcome
new community members.
11 changes: 7 additions & 4 deletions doc/about/for_academia.rst
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ To learn more about using this template, please consult the following:

Version Considerations
----------------------
Most users will be best served by `Arcade's latest release from PyPI <PyPI>`_
Most users will be best served by `Arcade's latest release from PyPI <PyPI_>`_

For new games, the features and improved efficiency of Arcade 3 make it the
best choice. Upgrading existing games is also worthwhile.
Expand All @@ -47,10 +47,10 @@ companion :ref:`academia_arcade_book` covered in depth below.
Arcade Textbook
^^^^^^^^^^^^^^^

The creator of Arcade wrote an `Arcade Textbook <Arcade book>`_ which covers Python basics
The creator of Arcade wrote an `Arcade Textbook <Arcade book_>`_ which covers Python basics
n greater depth than the main Arcade documentation.

It may be a while before the `Arcade Textbook <Arcade book>`_ is updated for Arcade 3.0. This
It may be a while before the `Arcade Textbook <Arcade book_>`_ is updated for Arcade 3.0. This
is a large undertaking due to the number and scale of changes since Arcade 2.6.


Expand All @@ -71,7 +71,10 @@ in a traditional chapter and curriculum structure:

#. Embedded videos covering concepts and past student projects
#. Lab exercises to help apply chapter material through practice
#. Translations in `Swedish / Svenska <book_sv>`_ and `German / Deutsche <book_de>`_
#. Translations in `Swedish / Svenska <book_sv_>`_ and `German / Deutsche <book_de_>`_

.. _book_sv: https://learn.arcade.academy/sv/latest/
.. _book_de: https://learn.arcade.academy/de/latest/

It also offers gentle, beginner-friendly introductions to topics which can intimidate
even the graduates of college-level computer science programs:
Expand Down
2 changes: 1 addition & 1 deletion doc/about/permissive_licensing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Yes, You Can Make Commercial Games!

There is already a commercially available game made with Arcade.

`Spelly Cat`_ is a puzzle game available via Valve Software's `Steam marketplace <Steam>`_.
`Spelly Cat`_ is a puzzle game available via Valve Software's `Steam marketplace <Steam_>`_.
It is currently available for Windows and Linux.

.. important:: Arcade is currently a desktop-focused framework.
Expand Down
4 changes: 1 addition & 3 deletions doc/community/games/sample_games.rst
Original file line number Diff line number Diff line change
Expand Up @@ -261,9 +261,7 @@ A space-themed typing game by thecodeah.
.. image:: /images/community/games/space_typer.png
:width: 75%

`GitHub repo for Space Typer`_

.. _GitHub repo for Space Typer: https://github.com/thecodeah/space-typer
The source code is no longer online.


FlapPy Bird
Expand Down
4 changes: 2 additions & 2 deletions doc/community/how_to_get_help.rst
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ half of each line may change to reflect your Arcade version, hardware,
and operating system.

You can copy and paste the output into Discord or GitHub using the
`markdown formatting for terminal output <help-sharing-code-with-markdown-terminal>`_
:ref:`markdown formatting for terminal output <help-sharing-with-markdown-terminal>`
described earlier.

Output like the example below means that something is wrong:
Expand All @@ -225,7 +225,7 @@ Output like the example below means that something is wrong:

bash: arcade: command not found

You should still `include the output <help-sharing-with-markdown-terminal>`_
You should still :ref:`include the output <help-sharing-with-markdown-terminal>`
as part of a request for help.

If you want to try fixing the problem yourself before getting help,
Expand Down
6 changes: 3 additions & 3 deletions doc/contributing/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ documentation.
It doesn't matter whether you've started :ref:`the platformer tutorial <platformer_tutorial>`
or just happen to be looking around. Let us know if anything looks off.

The best ways to report it are via `Discord <Arcade Discord>`_
The best ways to report it are via `Discord <Arcade Discord_>`_
or the `Arcade GitHub`_ repository, but we also have other
:ref:`community-locations`.

Expand Down Expand Up @@ -69,7 +69,7 @@ Report Bugs

If you see something weird, let the devs know!

Whether it's via `GitHub <GitHub Issue List>`_ or the `Arcade Discord`_,
Whether it's via `GitHub <GitHub Issue List_>`_ or the `Arcade Discord`_,
even a simple screenshot or video capture can help us make Arcade better.
This includes:

Expand Down Expand Up @@ -101,5 +101,5 @@ the source of the problem.
* If not, post a new one

Don't worry too much about posting duplicates. We can always cross-reference
issues if it's a duplicate. If you're unsure, you can always ask on `Discord <Arcade Discord>`_.
issues if it's a duplicate. If you're unsure, you can always ask on `Discord <Arcade Discord_>`_.

12 changes: 6 additions & 6 deletions doc/programming_guide/gles_raspi_and_sbc.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ you may want to skip to :ref:`requirements_gles` below.
OpenGL ES
---------

`OpenGL ES <gles_def>`_ ("embeddedable subset") is a special
`OpenGL ES <gles_def_>`_ ("embeddedable subset") is a special
variant of OpenGL tailored for mobile and embedded devices.

Like the standard OpenGL API, it has both feature versions
Expand All @@ -27,10 +27,10 @@ Supported Raspberry Pi Configurations
As of October 2024, the Arcade and `pyglet`_ teams verified the following to
work:

* `Raspberry Pi 4 <rpi_4>`_ running `Raspberry Pi OS`_
* `Raspberry Pi 5 <rpi_5>`_ running `Raspberry Pi OS`_
* `Raspberry Pi 4 <rpi_4_>`_ running `Raspberry Pi OS`_
* `Raspberry Pi 5 <rpi_5_>`_ running `Raspberry Pi OS`_

Although the `Raspberry Pi 400 <rpi_400>`_ has never been tested, it
Although the `Raspberry Pi 400 <rpi_400_>`_ has never been tested, it
*may* work. It uses Raspberry Pi 4 hardware inside a keyboard form factor.

Operating Systems
Expand Down Expand Up @@ -86,7 +86,7 @@ The table below lists these newer incompatible Raspberry Pi devices.
* - Device
- Type

* - `Pi Pico`_ (and W version) / `RP2040 <wiki_pi2040>`_
* - `Pi Pico`_ (and W version) / `RP2040 <wiki_pi2040_>`_
- Microcontroller

* - `Pi Pico 2`_ (and W version) / `RP2350`_
Expand Down Expand Up @@ -129,7 +129,7 @@ Both Arcade and `pyglet`_ can run via OpenGL ES on devices with either:
* OpenGL ES 3.2 or higher
* OpenGL ES 3.1 with certain extensions

To learn more, please see the `pyglet manual page on OpenGL ES <pyglet-opengles>`_.
To learn more, please see the `pyglet manual page on OpenGL ES <pyglet-opengles_>`_.

.. pending: post-3.0 cleanup # Faster and more reliable than getting the external ref syntax to work
.. _pyglet-opengles: https://pyglet.readthedocs.io/en/development/programming_guide/opengles.html
Expand Down
2 changes: 1 addition & 1 deletion doc/programming_guide/sound.rst
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ There is no stop method. Instead, call

.. rubric:: Stopping Permanently

.. _garbage collection: https://devguide.python.org/internals/garbage-collector/
.. _garbage collection: https://github.com/python/cpython/blob/main/InternalDocs/garbage_collector.md

After you've paused a player, you can stop playback permanently as follows:

Expand Down
20 changes: 10 additions & 10 deletions doc/tutorials/compiling_with_nuitka/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,13 @@ For this tutorial, we will use the code from :ref:`platformer_tutorial`.

pip install nuitka

We will be using the code from `this file <https://github.com/pythonarcade/arcade/blob/development/arcade/examples/platform_tutorial/17_views.py>`_.
We will be using the code from `this file <https://github.com/pythonarcade/arcade/blob/development/arcade/examples/platform_tutorial/20_views.py>`_.

Converting that code to a standalone executable is as easy as:

.. code-block:: bash

python -m nuitka 17_views.py --standalone --enable-plugin=numpy
python -m nuitka 20_views.py --standalone --enable-plugin=numpy

.. note::

Expand All @@ -67,9 +67,9 @@ Converting that code to a standalone executable is as easy as:

Now sit back and relax. Might as well go and grab a cup of coffee since compilation
takes time, sometimes maybe up to 2 hours, depending on your machine's specs.
After the process is finished, two new folders named ``17_views.py.dist`` and
``17_views.py.build`` will popup. You can safely ignore the build folder for now.
Just go to the dis folder and run ``17_views.exe`` file , present in there. If there are no
After the process is finished, two new folders named ``20_views.py.dist`` and
``20_views.py.build`` will popup. You can safely ignore the build folder for now.
Just go to the dis folder and run ``20_views.exe`` file , present in there. If there are no
errors, then the application should work perfectly.

Congratulations! You have successfully compiled your Python code to a standalone executable!
Expand All @@ -87,15 +87,15 @@ etc... In order to bundle them with the application, just use the ``include-data

.. code-block:: bash

python -m nuitka 17_views.py --standalone --enable-plugin=numpy --include-data-file=C:/Users/Hunter/Desktop/my_game/my_image.png=.
python -m nuitka 20_views.py --standalone --enable-plugin=numpy --include-data-file=C:/Users/Hunter/Desktop/my_game/my_image.png=.

This will copy the file named ``my_image.png`` at the specified location to the root of the executable.

To bundle a whole folder:

.. code-block:: bash

python -m nuitka 17_views.py --standalone --enable-plugin=numpy --include-data-dir=C:/Users/Hunter/Desktop/my_game/assets=.
python -m nuitka 20_views.py --standalone --enable-plugin=numpy --include-data-dir=C:/Users/Hunter/Desktop/my_game/assets=.

This will copy the whole folder named ``assets`` at the specified location to the root of the executable.

Expand All @@ -113,7 +113,7 @@ this is also possible:

.. code-block:: bash

python -m nuitka 17_views.py --standalone --windows-force-stderr-spec=%PROGRAM%logs.txt --windows-force-stdout-spec=%PROGRAM%output.txt
python -m nuitka 20_views.py --standalone --windows-force-stderr-spec=%PROGRAM%logs.txt --windows-force-stdout-spec=%PROGRAM%output.txt

This will automatically create two files, viz ``logs.txt`` and ``output.txt`` in the executable directory which will
contain the stderr and stdout output respectively!
Expand All @@ -128,13 +128,13 @@ The first flag takes a ``.png`` or a ``.ico`` file and sets it as the app icon:

.. code-block:: bash

python -m nuitka 17_views.py --standalone --windows-icon-from-ico=icon.png
python -m nuitka 20_views.py --standalone --windows-icon-from-ico=icon.png

This will set the app icon to icon.png

.. code-block:: bash

python -m nuitka 17_views.py --standalone --windows-icon-from-exe=C:\Users\Hunter\AppData\Local\Programs\Python\Python310/python.exe
python -m nuitka 20_views.py --standalone --windows-icon-from-exe=C:\Users\Hunter\AppData\Local\Programs\Python\Python310/python.exe

This will set the app icon to Python's icon 😉

Expand Down
2 changes: 1 addition & 1 deletion doc/tutorials/pymunk_platformer/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ Next, we create a ``Player`` class that is a child to :py:class:`~arcade.Sprite`
class will update the player animation.

The ``__init__`` method loads all of the textures. Here we use Kenney.nl's
`Toon Characters 1 <https://www.kenney.nl/assets/toon-characters-1>`_ pack.
`Toon Characters 1 <https://kenney.nl/assets/toon-characters>`_ pack.
It has six different characters you can choose from with the same layout, so
it makes changing as simple as changing which line is enabled. There are
eight textures for walking, and textures for idle, jumping, and falling.
Expand Down
12 changes: 9 additions & 3 deletions util/create_resources_listing.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,15 @@ def announce_templating(var_name):
announce_templating("FMT_URL_REF_EMBED")


def src_kludge(strpath): # pending: post-3.0 cleanup: # evil evil evil evil
"""We inject what RTD says the canonical domain is up top + the version"""
return f"{RTD_EVIL}{strpath}"
def src_kludge(strpath):
"""Make a /_static/ path relative to the resources page.

It's at api_docs/resources.html, so relative paths work both on
Read the Docs and in local builds.
"""
if not strpath.startswith("/"):
return strpath # Already a full URL
return "../" + strpath.lstrip("/")

MODULE_DIR = Path(__file__).parent.resolve()
ARCADE_ROOT = MODULE_DIR.parent
Expand Down
Loading