๐ŸŒ
Python
wiki.python.org โ€บ moin โ€บ PythonGameLibraries
PythonGameLibraries - Python Wiki
Load images, sound, music and video in almost any format. pyglet can optionally use AVbin to play back audio formats such as MP3, OGG/Vorbis and WMA, and video formats such as DivX, MPEG-2, H.264, WMV and Xvid. ... Arcade is an easy-to-learn Python library for creating 2D video games.
๐ŸŒ
Pygame
pygame.org โ€บ tags โ€บ 2d
2d
It will allow you to make stand-alone python/pygame games by writing the code for you. All you have to do is design the game... Simple, Single Player, Free Computer Game. Figure out how to unlock the wormholes on your way home! A physics playground, somewhat like sodaplay. Drag around structures of masses and springs, make landscapes of lines, or goof around with the "character". openGL Accelerated 2D game library with emphasis on built-in game asset editors
Discussions

pygame - Making a 2d game in Python - which library should be used? - Stack Overflow
I'm looking to make a 2d side scrolling game in Python, however I'm not sure what library to use. I know of PyGame (Hasn't been updated in 3 years), Pyglet, and PyOpenGL. My problem is I can't find... More on stackoverflow.com
๐ŸŒ stackoverflow.com
Anyone know of a high-level 2D game engine for Python?
rabbyt. Maybe not exactly what you're looking for, but it's at least a step up from raw pygame. 2d on a 3d canvas, so it's hardware accelerated. More on reddit.com
๐ŸŒ r/Python
38
47
August 15, 2015
Well documented 2d game library/engine for Python 3?

I can't answer much in terms of actual python libraries, but if you'd like a full game engine with a language rather close to python in its syntax, check out godot:

https://godotengine.org/

More on reddit.com
๐ŸŒ r/Python
13
8
July 4, 2017
Python for 2D Game Dev?

I'm currently using pygame for my first major programming project (a bullet hell shooter), and it works pretty well. I recommend reading through the whole documentation and watching a tutorial series on it. I didn't bother doing that, and I ended up having to scrap my project and start over since I wasn't using some of pygame's features properly.

More on reddit.com
๐ŸŒ r/learnpython
19
55
October 26, 2016
๐ŸŒ
Opensource.com
opensource.com โ€บ article โ€บ 18 โ€บ 4 โ€บ easy-2d-game-creation-python-and-arcade
How to create a 2D game with Python and the Arcade library | Opensource.com
Python is an outstanding language for people learning to program, and perfect for anyone wanting to "get stuff done" and not spend heaps of time on boilerplate code. Arcade is a Python library for creating 2D video games that is easy to start ...
๐ŸŒ
Arcade Academy
api.arcade.academy
The Python Arcade Library โ€” Python Arcade 3.3.3
Arcade is an easy-to-learn Python library for creating 2D games and more. The friendly API caters to both beginners and experts alike. Do you want to craft craft your take on a 2D classic, or explore the full power of shaders?
๐ŸŒ
GitHub
github.com โ€บ wynand1004 โ€บ SimplePythonGameLibrary
GitHub - wynand1004/SimplePythonGameLibrary: SPGL is a simple Python game library / framework for creating 2D games. It is built on the Python Turtle module and is compatible with Python 2.x and 3.x. ยท GitHub
The purpose of the Simple Python Game Library is to give beginning Python coders a simple framework to make basic 2D games. It is intended as an alternative to Pygame. As it is built on the Turtle module, it has the same features and limitations ...
Starred by 23 users
Forked by 14 users
Languages ย  Python
๐ŸŒ
Medium
medium.com โ€บ @sahilsahilbhatia โ€บ build-2-d-game-in-python-f5b6e98530c5
Build 2-d games in Python. Creating a 2D game in Python involvesโ€ฆ | by Sahil Bhatia | Medium
September 14, 2023 - Creating a 2D game in Python involves ... and handling user input. One popular choice for 2D game development in Python is the Pygame library....
๐ŸŒ
GitHub
github.com โ€บ topics โ€บ 2d-game
2d-game ยท GitHub Topics ยท GitHub
game deep-learning pygame artificial-intelligence 2d-game python-game-development covid-19 covid-race-game ... SPGL is a simple Python game library / framework for creating 2D games.
Find elsewhere
Top answer
1 of 7
98
OpenGL hardware acceleration | Allows for easy debugging: It has a built-in Python interpreter that allows for easy debugging. | Greater performance than high level APIs: Cocos2d-x is C++ based engine and it has CPU advantages for most platforms because of that. It uses polygonal mesh methods for sprite rendering for using GPU advantages. (You also use quad methods for benefit CPU). | Good documentation: Documentation includes a programming guide, API reference, video tutorials and massive reference test code project showing all functions and giving working code to the user. ยท | Great script language support: It supports Lua and Javascript with full feature support. ยท Especially with Cocos2d-JS you can develop games cross web and native, and the native solution have great performance with JS Bindings, much better than hybrid solution. | A proven engine for mobile development: 25% of iPhone games are made using Cocos2d-x (A Cocos2d mobile variant.) ยท This means you will not be alone in development, and will have access to a large community. You'll know you are developing for an engine that works. | Supports 3D models with skeleton animation: A new feature since Cocos2d-x v3.1 is support for 3D models (in your 2D game), not only this but support for skeleton animations is included too! This awesome feature allows for impressive characters in your game along with easier, more fluid and realistic animations. | Poor documentation: Most existing documentation is out of date. API documentation sometimes exists, though is usually just a one-liner and more often than not is completely absent. New features and significant system rewrites often make it to a major release without a single line of documentation accompanying them. Cocos2d-x family is developed by Chinese mostly, so market outside of China is not their main priority. Some tools (like Cocos Studio) have China-specific services and markets. | Can seem very complex for a novice developer: There isn't much documentation or tutorials. | Modest functionality: Almost all free alternatives are more convenient, faster, and more functional. | Poor support and non-existent community: Up until 2013, this was one of the best engines around. However, since then it was bought by a Chinese company and began stagnating - it's virtually in a slow death. Most developers abandoned Cocos in favor of more modern solutions leaving the community weak and the forums with little or no traffic. Although the Cocos2d-x Forum seems to have a decent community going. | Messy documentation: Most existing documentation is out of date. API documentation sometimes exists, though is usually just a one-liner and more often than not is completely absent. New features and significant system rewrites often make it to a major release without a single line of documentation accompanying them. | As the first member in cocos2d family, cocos2d python shares the majority of the concepts with other cocos2d family members, like cocos2d-x, eg: scene, sprite, action... so learning game developing from cocos2d python will be a good start, it will make you learn other cocos2d variants easily.
2 of 7
18
A real-time entity framework for Kivy.A real-time entity framework for Kivy.Kivy: To actually use the engine you have to learn Kivy - the library the engine is mostly based on.
Top answer
1 of 3
7

Pygame is just a wrapper for SDL, so technically a lot of games have been made using it, most of the work is done C-side anyways. It's a little slow, though if you are doing a 2D game, it should be sufficient. Frets-on-Fire was written in pure python with PyGame, and FoFiX was written in python with C extensions, and those games are both pretty great, altough on slower computers FoFiX can have trouble running 4 player.

Pyglet is also pretty nice, though I've only used it for emulator development, drawing single layers, so I don't know how well it actually works for game development. I've found that it's much easier to use direct OpenGL with Pyglet than it is with SDL/PyGame, so if you are doing a 3D game, it's probably better than using SDL. Also, since it's written in python, it's very easy to extend classes to change how a function is handled. For instance, I was trying to load data into an openGL texture through the pyglet Texture class, but the class couldn't load the data in a format I wanted, so I extended that class and changed the function that got the texture type (comes from a string) to include the texture I wanted, quick and painless.

One library I don't see mentioned enough is SFML. The 2.0 API (currently in beta) is pretty stellar and simple to use, and, if I remember correctly, runs a little faster than SDL. It is also more "object oriented" than SDL, which is really nice if you are working in an OO language like Python. It has some nice Python bindings written by Bastien Leonard in Cython that are pretty easy to use (or you can use the old C bindings if you don't want to use the most up to date version). I used this a while back and it was quite an enjoyable experience.

The reason why there aren't a lot of shipped games using Python is pretty simple: You can't close Python source. Even if you "compile" python into an executable using Py2Exe or something, it really just packs up the interpreter and python source into an exe file, and the source can be got just by opening up the exe in a hex editor.

While I'm a supporter of the "write it in Python, write time critical parts in C", if you feel python is going to be too slow, I would probably suggest C or, preferably, C++ as the way to go, simply because you don't get that much of a usability advantage for writing in Java, and the C languages can be quite a bit faster running than Java, and Lua will just take away some of the usability of Python without giving you any noticeable performance enhancement. SFML and SDL can both be used straight from C(++).

Advice if you do decide to use python: Use it as it is supposed to be used, as a scripting language. Do not try to bit twiddle or load images in pure python, either use the interfaces available in the library you choose (they all have very good interfaces for those kinds of things) or write an extension module to do that for you. Use python for logic control and fetching data from your libraries. If you follow that simple rule, you really shouldn't run into any performance issues.

2 of 3
4

In my experience, the things that are really going to kill you aren't generally related to graphics at all. Sure, it's a challenge to get all your frame rendering done in less than 16 ms without techniques like dirty-rectangle updating, but that's not going to be the big thing you'll lose sleep over. The biggest performance considerations are going to come from much more elementary things - collision detection, spatial searching, and pathfinding are three of the big ones - that can easily send your logic frame rate into the floor if done inefficiently over even a few hundred objects. For problems like these, pure Python may not be the best choice, but it's not hard to offload these to C/C++ while retaining Python for higher-level logic. This is essentially what games like Civilization 4 and EVE Online (client and server!) do - offload performance-critical code to C++ while retaining the flexibility and simplicity of Python for 'everyday' tasks.

pygame is actively developed (they haven't had a stable release in a while, but the Mercurial repository is quite lively) and fairly popular. It also uses the well-regarded (C-based!) SDL library under the hood. pyglet is also actively developed and uses OpenGL for all of its rendering, making moving to 3D development easier if you're planning to go in that direction (since you'll already have most of the basics).

If you decide to go the not-Python route, you can use SDL directly with C/C++, along with addon libraries like SDL_gfx (for primitives), SDL_ttf (for text), and SDL_net (for basic networking). Another excellent and widely used alternative for C/C++ is Allegro. I've used both, and I will claim that it's largely a matter of taste which one you go with.

๐ŸŒ
GeeksforGeeks
geeksforgeeks.org โ€บ create-a-2d-game-with-python-and-the-arcade-library
Create a 2D Game with Python and the Arcade Library | GeeksforGeeks
July 11, 2024 - Prerequisite: Arcade Libraryร‚ The Arcade library is a modern Python Module used for developing 2D video games with enthralling graphics and sound. It is an object-oriented library. It can be installed like any other Python Package in your IDE.
๐ŸŒ
Reddit
reddit.com โ€บ r/python โ€บ anyone know of a high-level 2d game engine for python?
r/Python on Reddit: Anyone know of a high-level 2D game engine for Python?
August 15, 2015 -

Right now, all I can find is PyGame and pyglet - both libraries are pretty low-level as far as game development libraries go. I'm looking for something that's a bit higher level; something that preferably has a scene editor and that lets me concentrate on creating artwork and designing levels instead of messing with render order and the like. Anyone have any suggestions?

EDIT: I think I've narrowed everything down to two libraries. PyGame + rabbyt or kivy. With either one, I'd have to write code on top of them to get the features I want, but they're both a lot higher-level than what I was using. I promise to open-source the code I write implementing what I want (scene editor, etc...), so this niche will be filled soon. :)

๐ŸŒ
Pygame
pygame.org โ€บ tags โ€บ library
library
A library for creating NES and GameBoy style games. A 2D Library for PyGame and PyOpenGL. Python bindings for the OpenVG vector graphics standard (specifically ShivaVG's implementation).
๐ŸŒ
Reddit
reddit.com โ€บ r/python โ€บ well documented 2d game library/engine for python 3?
r/Python on Reddit: Well documented 2d game library/engine for Python 3?
July 4, 2017 -

Hi r/python, sorry if this is a noobish question.

I'm a pretty new programmer and I've been playing around with python and some 2d game libraries for a while. Trying out what I can do. Recently I've been using cocos2d and I've managed to play around with creating some custom actions with simple physics and player input. I like the way it does things, and when I get my head around a concept it is easy to use.

However I find the documentation pretty terrible. There is a short programming guide but it doesn't cover enough. The API reference I find very bare-bones. And most topics online are for another language. There are some user made tutorials which have been helpful but it isn't the same as a proper manual.

Perhaps if I were a more experienced programmer I would find it usable, but right now it isn't. Now I'm looking for something else but I'm having trouble finding anything better. So I need some help.

I've tried PyGame in the past but it felt too basic for me (I'm happy to be proven wrong about this). When searching around online I've seen pyglet suggested but from what I understand it isn't a game library as such and from what I've read, not very well documented with a small community. So I don't know if it's for me. Some other alternatives I've read about seem to share the problem of poor documentation.

So I am asking you here at r/python for some suggestions. Are there any well documented game libraries/engines for python that I could use? I'm getting the feeling that perhaps Python isn't the best language for making games and I've seen that expressed by others. So perhaps I should pick another language? If so, what language and libraries would you guys recommend? Any help is very much appreciated!

๐ŸŒ
Geekflare
geekflare.com โ€บ development โ€บ 9 best python game development libraries/frameworks [2026]
9 Best Python Game Development Libraries/Frameworks [2026]
March 11, 2026 - Kivy is a Python game development framework that lets you design, build, and publish GUI apps in Python, including 2D games. Kivyโ€™s features for game development include the following: Support for a variety of layouts, widgets, and animation ... Pygame is a game development library designed for developing video games in Python.
๐ŸŒ
LinkedIn
linkedin.com โ€บ pulse โ€บ how-i-built-my-first-2d-game-pure-python-moez-ben-rebah
How I built my first 2D game with pure python
November 4, 2020 - As a modern framework, the arcade library a bunch of sophisticated technologies such as OpenGL 3.3 and higher which is a free and cross-platform graphics library allows developers to create 2D and 3D applications. Also, GLIB 2.29 and higher (for Linux) in order to play sounds within the game, it supports Python 3 type hinting example:
๐ŸŒ
Real Python
realpython.com โ€บ platformer-python-arcade
Build a Platform Game in Python With Arcade โ€“ Real Python
May 7, 2022 - This basic structure provides almost everything you need to construct a 2D platformer game: Line 12 imports the arcade library.
๐ŸŒ
Codeboje
codeboje.de โ€บ 2d-game-engines-python
2D Game Engines for Python - codeboje
With Pycap you can start building pretty 2D games without installing a compiler or learning C++. PopCap Games Framework Licence, Windows only, for Linux or mac take a look at TuxCap Compilation of the PopCap Framework with embedded python. The mainloop is in native code and contains several ...
๐ŸŒ
Talk Python To Me
talkpython.fm โ€บ episodes โ€บ show โ€บ 223 โ€บ fun-and-easy-2d-games-with-python
Episode #223 - Fun and Easy 2D Games with Python | Talk Python To Me Podcast
July 30, 2019 - He noticed how creating simple games helped students better grasp loops, classes, and other programming fundamentals, so he set out to build his own 2D game framework for Python. Eventually, Paul wrote Arcade, a library that leverages OpenGL to create compelling 2D games while keeping the API accessible for newcomers and more advanced developers alike.