Jump to content

  • Log In with Google      Sign In   
  • Create Account

We're offering banner ads on our site from just $5!

1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


Python as a game programming language


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
9 replies to this topic

#1 daedalus316   Members   -  Reputation: 119

Like
0Likes
Like

Posted 21 January 2012 - 05:39 AM

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

Sponsor:

#2 boogyman19946   Members   -  Reputation: 1072

Like
0Likes
Like

Posted 21 January 2012 - 08:47 AM

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.
"If highly skilled generalists are rare, though, then highly skilled innovators are priceless." - ApochPiQ

My personal links :)
- Khan Academy - For all your math needs
- Java API Documentation - For all your Java info needs :D
- C++ Standard Library Reference - For some of your C++ needs ^.^

#3 swiftcoder   Senior Moderators   -  Reputation: 10241

Like
3Likes
Like

Posted 21 January 2012 - 09:33 AM

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 - Software Engineer @Amazon - [swiftcoding]


#4 daedalus316   Members   -  Reputation: 119

Like
0Likes
Like

Posted 21 January 2012 - 11:22 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

#5 Ripiz   Members   -  Reputation: 529

Like
-2Likes
Like

Posted 21 January 2012 - 11:32 AM

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.

#6 swiftcoder   Senior Moderators   -  Reputation: 10241

Like
2Likes
Like

Posted 21 January 2012 - 04:43 PM

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 - Software Engineer @Amazon - [swiftcoding]


#7 nightcypher   Members   -  Reputation: 103

Like
2Likes
Like

Posted 21 January 2012 - 07:48 PM


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


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.

#8 daviangel   Members   -  Reputation: 600

Like
0Likes
Like

Posted 21 January 2012 - 11:10 PM

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 Posted Image
Pygame easy as Py
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

#9 daedalus316   Members   -  Reputation: 119

Like
0Likes
Like

Posted 22 January 2012 - 06:29 AM

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

#10 daedalus316   Members   -  Reputation: 119

Like
0Likes
Like

Posted 22 January 2012 - 07:37 AM

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




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS