Library to use

Hi Everyone!

I'm excited to be participating in my first PyWeek challenge.

Is everyone mostly planning on using pygame or pyglet? It seems like there are quite a good deal of low-level options (SFML, OpenGL, SDL..) and a bunch of wrappers for these (PySDL2, PySDL2_cffi, pysfml, pyglet, pygame, pygame_cffi, kivy...). In addition, it seems like most people historically have used Python 2 instead of Python 3.

I'm thinking of using PySDL2 with PyPy, but i'm worried it could be a mistake since people could have a hard time getting the correct dependencies installed if using less commonly used libraries. I don't have a lot of experience distributing python applications. Anyone think it's a bad idea to stray from pygame or pyglet for pyweek?

Cheers and good luck!

(log in to comment)

Comments

As long as your README has clear instructions even the most obscure libraries are perfectly acceptable. As for me, I generally use the vanilla libraries (just PyGame) and write my code in a common subset of python 2 and 3 so it runs on both. I'm kind of a stickler for universality when it comes to my own code, but even so, when I play other games I always read the README and make sure I use whatever the developer intended for an optimal experience.
Thanks for the advice. I've decided to just use pygame on python3.4 for this time and look into more modern libraries later
Thousands of libraries including PySDL2 can be installed with pip. "pip install PySDL2". However some libraries also require that you download and install the native SDL2 libraries separately, a task that varies by platform. You can create a basic setup.py for your project or just list the requirements in a pip-format requires.txt, and pip can automatically install all of your dependencies. Though for a game sometimes it is nicer to your users if you just bundle everything.
I use pysdl, and have my code running on both python 2.7 and 3.4. I wouldn't use pypy with pysdl2 because pysdl2 uses ctypes internally, and ctypes is slow on pypy.
I wrote pysdl2-cffi specifically because ctypes is very slow in pypy.