# Python game development libraries

Python game development libraries open a window, read keyboard and mouse input, draw sprites or scenes, and play sound from Python code. A game framework runs a loop that handles input, updates the game state, and draws a new frame many times a second. These libraries let developers build prototypes, teaching projects, and small games without a full commercial engine.

## Popularity

| Library | Monthly downloads | Stars | Last release | License |
| --- | --- | --- | --- | --- |
| [pygame](#pygame) | 2.7M | 9.0K | Sep 2024 | LGPL |
| [pyglet](#pyglet) | 2.3M | 2.2K | Oct 2026 | BSD |
| [pygame-ce](#pygame-ce) | 776.6K | Not on GitHub | Aug 2026 | LGPL-2.1 |
| [Panda3D](#panda-d) | 210.5K | 5.3K | Dec 2025 | BSD-3-Clause |
| [Ursina](#ursina) | 71.7K | Not on GitHub | Dec 2025 | MIT |
| [Arcade](#arcade) | 21.6K | 2.1K | Oct 2025 | MIT |
| [Pyxel](#pyxel) | 20.2K | Not on GitHub | Nov 2026 | MIT |

Downloads: pypi, last thirty days. Stars and releases: GitHub. Amber: no release in over a year.

[pygame](#pygame) has the most monthly downloads in this comparison, at 2.7M.

## Capabilities

| Library | Spatial entity hierarchy | Native tilemap assets |
| --- | --- | --- |
| [pygame](#pygame) | No | No |
| [pyglet](#pyglet) | No | Undocumented |
| [pygame-ce](#pygame-ce) | No | No |
| [Panda3D](#panda-d) | Yes | No |
| [Ursina](#ursina) | Yes | Yes |
| [Arcade](#arcade) | No | Yes |
| [Pyxel](#pyxel) | No | Yes |

## Libraries

### pygame

[GitHub](https://github.com/pygame/pygame) · [pypi](https://pypi.org/project/pygame) · [Docs](https://www.pygame.org/docs/)

Provides game-loop, drawing, input, audio, and sprite tools for Python.

- Downloads / mo: 2.7M
- Stars: 9.0K
- Last release: 2.6.1
- License: LGPL
- Capabilities: [From the pygame docs](https://www.pygame.org/docs/)

**Strengths**

- **Gives direct game-loop control.** Choose when to process input, update state, and draw each frame.
- **Checks pixel-mask sprite collisions.** Use collide_mask to test overlap between sprite collision masks.

**Watch out for**

- **Events need servicing every frame.** Process the event queue regularly to keep the window responsive.
- **Rotated sprites need fresh masks.** Recreate the collision mask when the sprite image changes.

```sh
python -m pip install pygame==2.6.1
```

**patrickloeber/snake-ai-pytorch** (745 stars)

[patrickloeber/snake-ai-pytorch](https://github.com/patrickloeber/snake-ai-pytorch) 

```python
def _update_ui(self):
    self.display.fill(BLACK)

    for pt in self.snake:
        pygame.draw.rect(self.display, BLUE1, pygame.Rect(pt.x, pt.y, BLOCK_SIZE, BLOCK_SIZE))
        pygame.draw.rect(self.display, BLUE2, pygame.Rect(pt.x+4, pt.y+4, 12, 12))

    pygame.draw.rect(self.display, RED, pygame.Rect(self.food.x, self.food.y, BLOCK_SIZE, BLOCK_SIZE))

    text = font.render("Score: " + str(self.score), True, WHITE)
    self.display.blit(text, [0, 0])
    pygame.display.flip()
```

[game.py](https://github.com/patrickloeber/snake-ai-pytorch/blob/7ea69e6b79c59db731d8befc9ec174b075efc808/game.py#L112-L123) · [More projects using pygame →](https://dashboard.exa.ai/playground/search?q=Projects%20using%20pygame%20for%20game%20rendering%20and%20simulation&filters=%7B%22type%22%3A%20%22auto%22%2C%20%22numResults%22%3A%2010%2C%20%22includeDomains%22%3A%20%5B%22github.com%22%5D%7D)

**Quickstart**

```python
import pygame

pygame.init()
screen = pygame.display.set_mode((640, 480))
running = True
while running:
    for event in pygame.event.get():
        if event.type == pygame.QUIT:
            running = False
    screen.fill("black")
    pygame.display.flip()
pygame.quit()

```

From [docs.md](https://www.pygame.org/docs/)

### pyglet

[GitHub](https://github.com/pyglet/pyglet) · [pypi](https://pypi.org/project/pyglet) · [Docs](https://docs.pyglet.org/en/latest/programming_guide/quickstart.html)

Provides native windows, input, OpenGL graphics, and media playback for Python applications.

- Downloads / mo: 2.3M
- Stars: 2.2K
- Last release: 2.1.19
- License: BSD
- Capabilities: [From the pyglet docs](https://docs.pyglet.org/en/latest/programming_guide/quickstart.html)

**Strengths**

- **Exposes native OpenGL rendering.** Use pyglet.gl directly or build on higher-level graphics abstractions.
- **Manages multiple native windows.** Create separate windows across a multi-monitor desktop.

**Watch out for**

- **Legacy batching needs migration.** Replace Batch.add with ShaderProgram vertex-list APIs in newer pyglet.
- **Video playback needs FFmpeg.** Install FFmpeg before playing video.

```sh
python -m pip install pyglet==2.1.19
```

**moderngl/moderngl-window** (280 stars)

[moderngl/moderngl-window](https://github.com/moderngl/moderngl-window) 

```python
def __init__(self, **kwargs: Any):
    super().__init__(**kwargs)

    config = pyglet.gl.Config(
        major_version=self.gl_version[0],
        minor_version=self.gl_version[1],
        forward_compatible=True,
        red_size=8,
        green_size=8,
        blue_size=8,
        alpha_size=8,
        stencil_size=8,
        depth_size=24,
        double_buffer=True,
        sample_buffers=1 if self.samples > 1 else 0,
        samples=self.samples,
    )

    if self.fullscreen:
        if hasattr(pyglet, 'canvas'):
            display = pyglet.canvas.get_display()
        else:
            display = pyglet.display.get_display()
        screen = display.get_default_screen()
        self._width, self._height = screen.width, screen.height

    self._window = PygletWrapper(
        width=self._width,
        height=self._height,
        caption=self._title,
        resizable=self._resizable,
        visible=self._visible,
        vsync=self._vsync,
        fullscreen=self._fullscreen,
        config=config,
        file_drops=True and platform.system() != "Darwin",
    )

    self.cursor = self._cursor

    self._window.event(self.on_key_press)
    self._window.event(self.on_key_release)
    self._window.event(self.on_mouse_motion)
    self._window.event(self.on_mouse_drag)
    self._window.event(self.on_resize)
    self._window.event(self.on_close)
    self._window.event(self.on_mouse_press)
    self._window.event(self.on_mouse_release)
    self._window.event(self.on_mouse_scroll)
    self._window.event(self.on_text)
    self._window.event(self.on_show)
    self._window.event(self.on_hide)
    self._window.event(self.on_file_drop)

    self.init_mgl_context()
    self._buffer_width, self._buffer_height = self._window.get_framebuffer_size()
    self.set_default_viewport()
```

[moderngl_window/context/pyglet/window.py](https://github.com/moderngl/moderngl-window/blob/aabbe827fc224bdc4d343de90d3f2b400b0e586d/moderngl_window/context/pyglet/window.py#L35-L91) · [More projects using pyglet →](https://dashboard.exa.ai/playground/search?q=Projects%20using%20pyglet%20for%20game%20rendering%20and%20simulation&filters=%7B%22type%22%3A%20%22auto%22%2C%20%22numResults%22%3A%2010%2C%20%22includeDomains%22%3A%20%5B%22github.com%22%5D%7D)

**Quickstart**

```python
import pyglet

window = pyglet.window.Window()

@window.event
def on_draw():
    window.clear()

pyglet.app.run()

```

From [hello_world.py](https://docs.pyglet.org/en/latest/programming_guide/quickstart.html)

### pygame-ce

[GitHub](https://github.com/pygame-community/pygame-ce) · [pypi](https://pypi.org/project/pygame-ce) · [Docs](https://pyga.me/docs/ref/surface.html)

Develops games in Python through a community fork of pygame.

- Downloads / mo: 776.6K
- Last release: 2.5.8
- License: LGPL-2.1
- Capabilities: [From the pygame-ce docs](https://pyga.me/docs/ref/surface.html)

```sh
python -m pip install pygame-ce==2.5.8
```

**Farama-Foundation/Gymnasium** (12.8K stars)

[Farama-Foundation/Gymnasium](https://github.com/Farama-Foundation/Gymnasium) 

```python
def render(self):
    if self.render_mode is None:
        assert self.spec is not None
        gym.logger.warn(
            "You are calling render method without specifying any render mode. "
            "You can specify the render_mode at initialization, "
            f'e.g. gym.make("{self.spec.id}", render_mode="rgb_array")'
        )
        return

    try:
        import pygame
        from pygame import gfxdraw
    except ImportError as e:
        raise DependencyNotInstalled(
            'pygame is not installed, run `pip install "gymnasium[classic-control]"`'
        ) from e

    if self.screen is None:
        pygame.display.init()
        if self.render_mode == "human":
            self.screen = pygame.display.set_mode(
                (self.screen_width, self.screen_height)
            )
        else:  # mode == "rgb_array"
            self.screen = pygame.Surface((self.screen_width, self.screen_height))
    if self.clock is None:
        self.clock = pygame.time.Clock()

    world_width = self.x_threshold * 2
    scale = self.screen_width / world_width
    polewidth = 10.0
    polelen = scale * (2 * self.length)
    cartwidth = 50.0
    cartheight = 30.0

    if self.state is None:
        return None

    x = self.state

    self.surf = pygame.Surface((self.screen_width, self.screen_height))
    self.surf.fill((255, 255, 255))

    l, r, t, b = -cartwidth / 2, cartwidth / 2, cartheight / 2, -cartheight / 2
    axleoffset = cartheight / 4.0
    cartx = x[0] * scale + self.screen_width / 2.0  # MIDDLE OF CART
    carty = 100  # TOP OF CART
    cart_coords = [(l, b), (l, t), (r, t), (r, b)]
    cart_coords = [(c[0] + cartx, c[1] + carty) for c in cart_coords]
    gfxdraw.aapolygon(self.surf, cart_coords, (0, 0, 0))
    gfxdraw.filled_polygon(self.surf, cart_coords, (0, 0, 0))

    l, r, t, b = (
        -polewidth / 2,
        polewidth / 2,
        polelen - polewidth / 2,
        -polewidth / 2,
    )

    pole_coords = []
    for coord in [(l, b), (l, t), (r, t), (r, b)]:
        coord = pygame.math.Vector2(coord).rotate_rad(-x[2])
        coord = (coord[0] + cartx, coord[1] + carty + axleoffset)
        pole_coords.append(coord)
    gfxdraw.aapolygon(self.surf, pole_coords, (202, 152, 101))
    gfxdraw.filled_polygon(self.surf, pole_coords, (202, 152, 101))

    gfxdraw.aacircle(
        self.surf,
        int(cartx),
        int(carty + axleoffset),
        int(polewidth / 2),
        (129, 132, 203),
    )
    gfxdraw.filled_circle(
        self.surf,
        int(cartx),
        int(carty + axleoffset),
        int(polewidth / 2),
        (129, 132, 203),
    )

    gfxdraw.hline(self.surf, 0, self.screen_width, carty, (0, 0, 0))

    self.surf = pygame.transform.flip(self.surf, False, True)
    self.screen.blit(self.surf, (0, 0))
    if self.render_mode == "human":
        pygame.event.pump()
        self.clock.tick(self.metadata["render_fps"])
        pygame.display.flip()

    elif self.render_mode == "rgb_array":
        return np.transpose(
            np.array(pygame.surfarray.pixels3d(self.screen)), axes=(1, 0, 2)
        )
```

[gymnasium/envs/classic_control/cartpole.py](https://github.com/Farama-Foundation/Gymnasium/blob/68c3f95def1b9d91922db5363a28dc1d4a83a960/gymnasium/envs/classic_control/cartpole.py#L251-L346) · [More projects using pygame-ce →](https://dashboard.exa.ai/playground/search?q=pygame-ce%20GitHub%20projects)

**MyreMylar/pygame_gui** (816 stars)

[MyreMylar/pygame_gui](https://github.com/MyreMylar/pygame_gui) 

```python
def apply_colour_to_surface(
    colour: pygame.Color,
    shape_surface: pygame.surface.Surface,
    rect: Union[pygame.Rect, None] = None,
):
    """
    Apply a colour to a shape surface by multiplication blend. This works best when the shape
    surface is predominantly white.

    :param colour: The colour to apply.
    :param shape_surface: The shape surface to apply the colour to.
    :param rect: A rectangle to apply the colour inside.

    """
    if rect is not None:
        colour_surface = pygame.surface.Surface(
            rect.size, flags=pygame.SRCALPHA, depth=32
        )
        colour_surface.fill(colour)
        shape_surface.blit(colour_surface, rect, special_flags=pygame.BLEND_RGBA_MULT)
    else:
        colour_surface = pygame.surface.Surface(
            shape_surface.get_size(), flags=pygame.SRCALPHA, depth=32
        )
        colour_surface.fill(colour)
        shape_surface.blit(colour_surface, (0, 0), special_flags=pygame.BLEND_RGBA_MULT)
```

[pygame_gui/core/utility.py](https://github.com/MyreMylar/pygame_gui/blob/9c12c28111a979dea6b192d2bc1baf7c7c37e7e5/pygame_gui/core/utility.py#L341-L366) · [More projects using pygame-ce →](https://dashboard.exa.ai/playground/search?q=pygame-ce%20GitHub%20projects)

**Quickstart**

```python
import pygame

surface = pygame.Surface((640, 480))
surface.fill("black")

```

From [surface.html](https://pyga.me/docs/ref/surface.html)

### Panda3D

[GitHub](https://github.com/panda3d/panda3d) · [pypi](https://pypi.org/project/panda3d) · [Docs](https://docs.panda3d.org/1.10/python/introduction/tutorial/starting-panda3d)

Provides a three-dimensional scene engine with Python bindings, collisions, and audio systems.

- Downloads / mo: 210.5K
- Stars: 5.3K
- Last release: 1.10.16
- License: BSD-3-Clause
- Capabilities: [From the Panda3D docs](https://docs.panda3d.org/1.10/python/introduction/tutorial/starting-panda3d)

**Strengths**

- **Includes a complete scene engine.** Use Python to control a scene-oriented game and rendering engine.
- **Integrates Bullet physics.** Use Bullet bodies for rigid-body dynamics and collision detection.

**Watch out for**

- **Collision systems stay separate.** Bullet bodies do not collide with ODE bodies or native CollisionNodes.

```sh
python -m pip install panda3d==1.10.16
```

**pokepetter/ursina** (2.6K stars)

[pokepetter/ursina](https://github.com/pokepetter/ursina) 

```python
def generate(self): # Must be called after a mesh's values has been updated in order to update visually
    self._generated_vertices = None

    if hasattr(self, 'geomNode'):
        self.geomNode.removeAllGeoms()
    else:
        self.geomNode = p3d.GeomNode('mesh_geom')
        self.attachNewNode(self.geomNode)

    if len(self.vertices) == 0 and self.vertex_buffer is None:
        return

    static_mode = p3d.Geom.UHStatic if self.static else p3d.Geom.UHDynamic
    vertex_format = p3d.GeomVertexFormat()

    color_attribute_index = -1
    uv_attribute_index = -1
    normal_attribute_index = -1

    if self.vertex_buffer is not None:
        vertex_array_format = p3d.GeomVertexArrayFormat()
        attributes = self.vertex_buffer_format.split(",")
        for attribute in attributes:
            attribute_type = attribute[0]
            attribute_type_name = attribute[0]
            if attribute_type == "p":
                attribute_type = p3d.Geom.C_point
                attribute_type_name = "vertex"
            elif attribute_type == "c":
                attribute_type = p3d.Geom.C_color
                attribute_type_name = "color"
            elif attribute_type == "t":
                attribute_type = p3d.Geom.C_texcoord
                attribute_type_name = "texcoord"
            elif attribute_type == "n":
                attribute_type = p3d.Geom.C_normal
                attribute_type_name = "normal"
            else:
                raise Exception("Invalid vertex buffer format attribute type: {}.".format(attribute_type))
            attribute_count = int(attribute[1:-1])
            attribute_dtype = attribute[-1]
            if attribute_dtype == "f":
                attribute_dtype = p3d.Geom.NT_float32
            elif attribute_dtype == "I":
                attribute_dtype = p3d.Geom.NT_uint32
            else:
                raise Exception("Invalid vertex buffer format attribute data type: {}.".format(attribute_dtype))
            vertex_array_format.addColumn(attribute_type_name, attribute_count, attribute_dtype, attribute_type)
        vertex_format.addArray(vertex_array_format)

    else:
        vertex_format = p3d.GeomVertexFormat()
        vertex_format.add_array(p3d.GeomVertexFormat.getV3().arrays[0])
        attribute_count = 1
        if self.colors is not None and len(self.colors) > 0:
            vertex_format.add_array(p3d.GeomVertexArrayFormat('color', 4, p3d.Geom.NT_float32, p3d.Geom.C_color))
            color_attribute_index = attribute_count
            attribute_count += 1
        if self.uvs is not None and len(self.uvs) > 0 and self.mode not in ['line', 'point']:
            vertex_format.add_array(p3d.GeomVertexArrayFormat('texcoord', 2, p3d.Geom.NT_float32, p3d.Geom.C_texcoord))
            uv_attribute_index = attribute_count
            attribute_count += 1
        if self.normals is not None and len(self.normals) > 0 and self.mode not in ['line', 'point']:
            vertex_format.add_array(p3d.GeomVertexArrayFormat('normal', 3, p3d.Geom.NT_float32, p3d.Geom.C_normal))
            normal_attribute_index = attribute_count
            attribute_count += 1

    vertex_format = p3d.GeomVertexFormat.register_format(vertex_format)
    vdata = p3d.GeomVertexData('vertex_data', vertex_format, static_mode)

    if self.vertex_buffer is not None:
        m = memoryview(self.vertex_buffer).cast('B')
        vdata.unclean_set_num_rows(self.vertex_buffer_length)
        array_handle = vdata.modify_array(0)
        vmem = memoryview(array_handle).cast('B')
        vmem[:] = m

    else:
        if isinstance(self.vertices[0], numbers.Real):
            vdata.unclean_set_num_rows(len(self.vertices) // 3)
        else:
            vdata.unclean_set_num_rows(len(self.vertices))

        self._set_array_data(vdata.modify_array(0), self._ravel(self.vertices), 'f')

        if self.colors is not None and len(self.colors) > 0:
            self._set_array_data(vdata.modify_array(color_attribute_index), self._ravel(self.colors), 'f')

        if self.uvs is not None and len(self.uvs) > 0 and self.mode not in ['line', 'point']:
            self._set_array_data(vdata.modify_array(uv_attribute_index), self._ravel(self.uvs), 'f')

        if self.normals is not None and len(self.normals) > 0 and self.mode not in ['line', 'point']:
            self._set_array_data(vdata.modify_array(normal_attribute_index), self._ravel(self.normals), 'f')

    geom = p3d.Geom(vdata)
    self.geom = geom

    if len(self.triangles) == 0:    # no triangles provided, so just add them in order
        prim = Mesh._modes[self.mode](static_mode)
        prim.set_index_type(p3d.GeomEnums.NT_uint32)

        parray = prim.modify_vertices()
        n = len(self.vertices)
        if isinstance(self.vertices[0], numbers.Real):
            n = n // 3
        triangles = [i for i in range(n)]
        parray.unclean_set_num_rows(n)
        self._set_array_data(parray, triangles, 'I')

        prim.close_primitive()
        geom.addPrimitive(prim)

    else:
        if not isinstance(self.triangles[0], numbers.Real): # triangles provided as [(0,1,2), (3,4,5,6), ...] etc., so unpack them
            line_segments = []
            indices = self.indices
            for tup in self.triangles:
                if len(tup) == 2:
                    line_segments.append(tup)


            for line_segment in line_segments:
                prim = Mesh._modes['line'](static_mode)
                prim.set_index_type(p3d.GeomEnums.NT_uint32)
                parray = prim.modify_vertices()
                parray.unclean_set_num_rows(len(line_segment))
                self._set_array_data(parray, line_segment, 'I')
                prim.close_primitive()
                geom.addPrimitive(prim)

            if len(indices) > 0:
                prim = Mesh._modes[self.mode](static_mode)
                prim.set_index_type(p3d.GeomEnums.NT_uint32)
                parray = prim.modify_vertices()
                parray.unclean_set_num_rows(len(indices))
                self._set_array_data(parray, indices, 'I')
                prim.close_primitive()
                geom.addPrimitive(prim)

        else:   # got triangles as [0,1,2,3,4,5], ie. flat
            prim = Mesh._modes[self.mode](static_mode)
            prim.set_index_type(p3d.GeomEnums.NT_uint32)

            parray = prim.modify_vertices()

            parray.unclean_set_num_rows(len(self.triangles))
            self._set_array_data(parray, self._ravel(self.triangles), 'I')

            prim.close_primitive()
            geom.addPrimitive(prim)

    self.geomNode.addGeom(geom)

    if self.mode == 'point':
        self.setTexGen(p3d.TextureStage.getDefault(), p3d.TexGenAttrib.MPointSprite)
```

[ursina/mesh.py](https://github.com/pokepetter/ursina/blob/41d036e20cfc3a873996ed98328d7073316714c2/ursina/mesh.py#L101-L255) · [More projects using Panda3D →](https://dashboard.exa.ai/playground/search?q=Projects%20using%20panda3d%20for%20game%20rendering%20and%20simulation&filters=%7B%22type%22%3A%20%22auto%22%2C%20%22numResults%22%3A%2010%2C%20%22includeDomains%22%3A%20%5B%22github.com%22%5D%7D)

**Quickstart**

```python
from direct.showbase.ShowBase import ShowBase

app = ShowBase()
app.run()

```

From [README.md](https://docs.panda3d.org/1.10/python/introduction/tutorial/starting-panda3d)

### Ursina

[GitHub](https://github.com/pokepetter/ursina) · [pypi](https://pypi.org/project/ursina) · [Docs](https://api.github.com/repos/pokepetter/ursina/readme)

Provides a game engine and framework for Python.

- Downloads / mo: 71.7K
- Last release: 8.3.0
- License: MIT
- Capabilities: [From the Ursina docs](https://api.github.com/repos/pokepetter/ursina/readme)

```sh
python -m pip install ursina==8.3.0
```

**Quickstart**

```python
from ursina import Ursina, Entity

app = Ursina()
cube = Entity(model="cube")
app.run()

```

From [README.md](https://api.github.com/repos/pokepetter/ursina/readme) · [Find projects using Ursina →](https://dashboard.exa.ai/playground/search?q=ursina%20GitHub%20projects)

### Arcade

[GitHub](https://github.com/pythonarcade/arcade) · [pypi](https://pypi.org/project/arcade) · [Docs](https://api.arcade.academy/en/stable/api_docs/api/window.html)

Provides a Python framework for two-dimensional games with sprites and collision tools.

- Downloads / mo: 21.6K
- Stars: 2.1K
- Last release: 3.3.3
- License: MIT
- Capabilities: [From the Arcade docs](https://api.arcade.academy/en/stable/api_docs/api/window.html)

**Strengths**

- **Batches sprite drawing.** Draw SpriteList collections together through the graphics processor.
- **Hashes static sprite collisions.** Enable spatial hashing for collision checks against non-moving sprite lists.

**Watch out for**

- **Targets desktop graphics hardware.** Web and mobile are currently unsupported.
- **Moving sprites weaken spatial hashing.** Reserve spatial hashing for sprite lists that mostly stay still.

```sh
python -m pip install arcade==3.3.3
```

**realpython/materials** (5.2K stars)

[realpython/materials](https://github.com/realpython/materials) 

```python
def on_update(self, delta_time: float):
    """Update all the game objects

    Arguments:
        delta_time {float} -- How many seconds since the last frame?
    """

    # Check if you've picked up a coin
    coins_hit = arcade.check_for_collision_with_list(
        sprite=self.player, sprite_list=self.coins
    )

    for coin in coins_hit:
        # Add the coin score to your score
        self.score += COIN_VALUE

        # Play the coin sound
        arcade.play_sound(self.coin_pickup_sound)

        # Remove the coin
        coin.remove_from_sprite_lists()

    # Are there more coins than allowed on the screen?
    if len(self.coins) > COIN_COUNT:
        # Stop adding coins
        arcade.unschedule(function_pointer=self.add_coin)

        # Show the mouse cursor
        self.set_mouse_visible(True)

        # Print the final score and exit the game
        print(f"Game over! Final score: {self.score}")
        exit()
```

[top-python-game-engines/arcade/arcade_game.py](https://github.com/realpython/materials/blob/639729466ecb2b88c2b4bf3fa37cc9454c72f941/top-python-game-engines/arcade/arcade_game.py#L137-L169) · [More projects using Arcade →](https://dashboard.exa.ai/playground/search?q=Projects%20using%20arcade%20for%20game%20rendering%20and%20simulation&filters=%7B%22type%22%3A%20%22auto%22%2C%20%22numResults%22%3A%2010%2C%20%22includeDomains%22%3A%20%5B%22github.com%22%5D%7D)

**Quickstart**

```python
import arcade

window = arcade.Window(640, 480, "Example")

@window.event
def on_draw():
    window.clear()

arcade.run()

```

From [sprite_minimal.py](https://api.arcade.academy/en/stable/api_docs/api/window.html)

### Pyxel

[GitHub](https://github.com/kitao/pyxel) · [pypi](https://pypi.org/project/pyxel) · [Docs](https://api.github.com/repos/kitao/pyxel/readme)

Provides a retro game engine for Python.

- Downloads / mo: 20.2K
- Last release: 3.0.2
- License: MIT
- Capabilities: [From the Pyxel docs](https://api.github.com/repos/kitao/pyxel/readme)

```sh
python -m pip install pyxel==3.0.2
```

**Quickstart**

```python
import pyxel

def update():
    if pyxel.btnp(pyxel.KEY_Q):
        pyxel.quit()

def draw():
    pyxel.cls(0)
    pyxel.text(5, 5, "Hello", 7)

pyxel.init(160, 120)
pyxel.run(update, draw)

```

From [README.md](https://api.github.com/repos/kitao/pyxel/readme) · [Find projects using Pyxel →](https://dashboard.exa.ai/playground/search?q=pyxel%20GitHub%20projects)

## FAQ

### Which Python game development library should I use?

[pygame](#pygame) suits two-dimensional games with a hand-written event and draw loop. [Arcade](#arcade) suits two-dimensional games built around sprite lists, views, and callbacks. [Panda3D](#panda-d) and [Ursina](#ursina) suit three-dimensional games with a scene graph.

### What is the best Python game engine?

[Panda3D](#panda-d) is a full game engine with a live scene graph, model loading, collisions, and audio. [Ursina](#ursina) builds an entity and prefab framework on top of it for faster setup. [Pyxel](#pyxel) is a retro engine with its own pixel graphics, sound, and asset editor.

### Pygame vs pygame-ce: which should I use?

[pygame-ce](#pygame-ce) is a separately published community fork that exposes the same pygame import and game APIs. A project installs one of the two distributions, and its dependency manifest names which one.

### What is pyglet?

[pyglet](#pyglet) provides native windows, input, OpenGL graphics, and media playback for Python applications. It also loads sprites and models.

## How this page was built

Data checked Nov 20, 2026.

Reproduce it with the Exa API:

```json
{
  "endpoint": "/search",
  "body": {
    "query": "Best Python game development libraries pygame Arcade pyglet Panda3D code examples",
    "numResults": 5
  }
}
```

Docs: https://exa.ai/docs/reference/search
