I trying to figure out which options would be best to give a graphics to a UNIX based 2D game whose logical part was written in python. Which engine to use.

What is the difference between Pygames, Pyglet and Kivy and how each works in relating the logical part of the game with it's actual graphical display?

  • 1
    \$\begingroup\$ Those that closed the question really should learn some patience and how to read a question entirely. Thankfully, it was answered before. \$\endgroup\$ – Edu May 27 '17 at 19:00

The difference between the three frameworks/engines is the abstraction level.

Pyglet is low level compared to the other two and is based on SDL, a popular C++ multimedia library. You'll have to use pure OpenGL functions and constants to achieve the desired result, but it also has many built-in features, such as batches. This has pros and cons too, it's much harder to do anything with it, but it gives you a higher creative freedom.

Kivy is in the middle, it has Processing-esque built-in drawing functions, such as Ellipse, Rectangle, Text, Button, etc., but it has an OpenGL wrapper class.

Pygame is a bit higher level, it has many built-in constructs, such as the rectangle, circle, etc. If you want to achieve a higher level of creativity, then you can integrate it with PyOpenGL, though at which point you may just use Pyglet.

| improve this answer | |
  • \$\begingroup\$ Any recommended source where I can get OpenGL basic notions? I'm looking forwad to pyglet or coco2d python after some research. \$\endgroup\$ – Edu May 21 '17 at 13:53
  • \$\begingroup\$ @Edu I don't know to what extend does Pyglet support OpenGL, so I can't give sources \$\endgroup\$ – Bálint May 21 '17 at 13:59

Not the answer you're looking for? Browse other questions tagged or ask your own question.