Python as a game programming language

Started by
8 comments, last by daedalus316 12 years, 2 months ago
I was just wondering, how effective is python as a game programming language? I personally love the simplicity of python, and it's user friendliness. I have also experimented in pygame and pyglet. They both seem very effective but as I haven't used any other 2d libraries I don't really know how python and these libraries compare to others. Basically I want to know wether to make a simple 2d game such as a asteroids and then maybe a top down dungeon game, python is efficient?
www.worldofuniverse.wordpress.com
Advertisement
Python should be more than enough for games. I guess the most convincing example is EVE Online which is an MMO written in Python. Personally I'm not a fan of Python syntax, but that may be because I'm more used to seeing brackets and semi-colons that I don't feel too comfortable leaving them behind XD For the games you're planning, Python can do.

Yo dawg, don't even trip.

Python is pretty good for games. I wrote a variety a while back, all the way from Pong to a component/entity-based space shooter and a planet renderer (although the latter has a significant implemented in C, for performance).

I'm very fond of python, but it's not all roses:

  • Pyglet is not really under active development these days, and PyGame doesn't seem to have support for OpenGL 3+ (though I may be missing something).
  • Python's performance can really chug in places, though PyPy seems to be solving that problem (but, PyPy doesn't work with pyglet).
  • Distributing Python applications is not entirely straightforward, and I have run into compatibility problems in the past.

Tristam MacDonald. Ex-BigTech Software Engineer. Future farmer. [https://trist.am]

Thanks, I took a look at your blog swiftcoder and was surprised and amused to see that i had already visited it in search of python game help. Do you know of any additional libraries that might be useful for game design in python and also do you know any good pyglet tutorials. Are you sure pyglet is not under active development because if it is i would probably be better of sticking with pygame wouldn't i? As for large scale games, is python a viable option?
www.worldofuniverse.wordpress.com

Python should be more than enough for games. I guess the most convincing example is EVE Online which is an MMO written in Python.


Actually only UI and small bits are. However UI is extremely slow.

Actually only UI and small bits are. However UI is extremely slow.

"Python enabled us to create EVE Online, a massive multiplayer game, in record time. The EVE Online server cluster runs over 50,000 simultaneous players in a shared space simulation, most of which is created in Python." -- Hilmar Veigar Petursson, of CCP Games.

Please do your research before making sweeping statements...

Tristam MacDonald. Ex-BigTech Software Engineer. Future farmer. [https://trist.am]


[quote name='Ripiz' timestamp='1327167174' post='4904878']
Actually only UI and small bits are. However UI is extremely slow.

"Python enabled us to create EVE Online, a massive multiplayer game, in record time. The EVE Online server cluster runs over 50,000 simultaneous players in a shared space simulation, most of which is created in Python." -- Hilmar Veigar Petursson, of CCP Games.

Please do your research before making sweeping statements...
[/quote]

It's worth pointing out here that while large quantities of EVE may have been developed in Python it is definitely not all in Python, and the version of Python used is not your standard CPython due to the problem I outline below. If you're interested, have a read of http://www.eveonline.com/devblog.asp?a=blog&bid=786.

Python's biggest problem going forward using modern hardware is the Global Interpreter Lock, which means that Python effectively forces you to be single-threaded unless you use the multiprocessing package, which can make life a lot more complicated. This is more of an issue for games like EVE where you're trying to eke every last bit of performance out of the hardware. For basic game development like what you're talking about Python should be absolutely fine assuming a PC that's not ancient.

Basically I want to know wether to make a simple 2d game such as a asteroids and then maybe a top down dungeon game, python is efficient?
It's fast enough using just Pygame for this. It was fast enough years ago when I first did it mellow.png
Pygame easy as Py
[size="2"]Don't talk about writing games, don't write design docs, don't spend your time on web boards. Sit in your house write 20 games when you complete them you will either want to do it the rest of your life or not * Andre Lamothe
Ok I checked out your tutorial and they seem pretty good. Only thing that could be better is using code block(don't know if thats what it's called) and breaking up the code so it's easier to understand.
www.worldofuniverse.wordpress.com
Also has anyone used PGU or Directicus in that past? If you have are they worth using and do you have any good tutorials. ASLo are then any other libraries that extend pygame?
www.worldofuniverse.wordpress.com

This topic is closed to new replies.

Advertisement