• Advertisement
Sign in to follow this  

Python as a game programming language

This topic is 2193 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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?

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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...

Share this post


Link to post
Share on other sites

[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.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement