Pygame Comparison#
Both Pygame and Arcade are Python libraries for making it easy to create 2D games. Pygame is raster-graphics based. It is very fast at manipulating individual pixels and can run on almost anything. Arcade uses OpenGL. It is very fast at drawing sprites and off-loads functions such as rotation and transparency to the graphics card.
Here are some comparisons between Arcade 2.6 and Pygame 2.0.1:
Feature |
Arcade |
Pygame |
---|---|---|
Website |
||
API Docs |
||
Example code |
||
License |
||
Back-end graphics engine |
OpenGL 3.3+ and Pyglet |
|
Back-end audio engine |
ffmpeg via Pyglet |
|
Example Projects |
Feature |
Arcade |
Pygame |
---|---|---|
Drawing primitives support rotation |
Yes |
No [1] |
Sprites support rotation |
Yes |
No [1] |
Sprites support scaling |
Yes |
No [1] |
Sprite image caching [2] |
Yes |
No |
Type Hints |
Yes |
No |
Transparency support |
Yes |
Must specify transparent colorkey |
Camera support |
No |
|
Android support |
No |
Yes |
Raspberry Pi support |
No |
Yes |
Batch drawing |
Via GPU |
Via Surface [3] |
Default Hitbox |
||
Tiled Map Support |
No |
|
Physics engines |
Simple, platformer, and PyMunk |
None |
Event Management |
Pyglet-based, write functions to handle events |
Write your own event loop. Can get around this by add-ons like Pygame Zero) |
View Support |
No |
|
Light Support |
No |
|
GUI Support |
No (or add pygame-gui) |
|
GPU Shader Support |
No |
|
Built-in Resources |
No |
Feature |
Arcade |
Pygame |
---|---|---|
Draw 50,000 stationary sprites |
0.001 seconds |
0.425 seconds |
Move 5,000 sprites |
0.010 seconds |
0.003 seconds |
# sprites program can move + draw before FPS drops below 55 |
8500 |
2000 |
Collision detection 50,000 sprites |
0.044 seconds no spatial hashing [5]
0.005 seconds with spatial hashing
|
0.004 seconds [6] |
Draw 5,000 plain rectangles [7] |
0.081 seconds |
0.008 seconds |
Draw 5,000 rotated rectangles [8] |
0.081 seconds |
0.029 seconds |