Python Arcade Library

3.3.2 · active · verified Thu Apr 16

Arcade is an easy-to-learn Python library for creating 2D video games, designed for both beginning programmers and those seeking a straightforward framework. It is built on top of the Pyglet multimedia library and OpenGL for modern graphics and sound. The library is actively maintained and frequently updated, with recent major versions introducing significant API changes and performance enhancements.

Common errors

Warnings

Install

Imports

Quickstart

This quickstart code initializes an Arcade window with a specified size and title, sets a background color, and then draws a red filled circle in the `on_draw` method. The `arcade.run()` call starts the game loop.

import arcade

SCREEN_WIDTH = 800
SCREEN_HEIGHT = 600
SCREEN_TITLE = "My Arcade Game"

class MyGame(arcade.Window):
    def __init__(self):
        super().__init__(SCREEN_WIDTH, SCREEN_HEIGHT, SCREEN_TITLE)
        arcade.set_background_color(arcade.color.AMAZON)

    def on_draw(self):
        self.clear()
        arcade.draw_circle_filled(100, 100, 50, arcade.color.RED)

def main():
    game = MyGame()
    arcade.run()

if __name__ == "__main__":
    main()

view raw JSON →