Skip to main content
gamedev.net
🔒 Locked

python and pygame

Started by Mr Tyro 5 replies 1.2k views
Original Post
Mr Tyro
Mr Tyro
Hello I have a couple of questions 1.Is python powerfull enough to run a 3D game 2 what are the strengths and weaknesses of using python 3.would a python game run slow if it had lots of graphics or was big Thanks
:)/$/
-JetSirus-
-JetSirus-
Well python is a managed language, so that my slow it down, but large parts of EVE Online were coded in python. Your milage may vary.
------------------This is so stupid!
AnotherNinja
AnotherNinja
I've also considered making a 2d game in python with pygame. Python is supposed to be slower with 3d graphics and I don't think pygame was built to specifically use 3d graphics.

Panda3d and soya3d say they work for python in 3d (I haven't tried them yet) so that might be a faster/better choice.
Mr Tyro
Mr Tyro
what about pyorgre have any of you used it.
when you mean large parts of eve used it thats just the in game part right
not anything that would require speed like the engine it runs on
i'm going to look at panda3d and soya3d

thanks
:)/$/
Simian Man
Simian Man
In general, the more time your program spends in compiled code, the faster it will go. The reason games like EVE Online (and Baldur's Gate too I think) can run well is that the engine was coded in C or C++ and Python is used for scripting.

Most of the work is done by the engine and the scripts are used for handling triggers and setting attributes and such. Using Panda3D, PyOgre, or PyGame would be efficient enough for this reason. Writing your own Engine with PyOpenGL would probably not be a great idea.

Suerte
Mr Tyro
Mr Tyro
I was looking around pyogre and found this
http://psyco.sourceforge.net/

it says this is supposed to speed python a little bit and make your code go faster
and does py2exe make any difference in speed?

What do you think of visual python as a 3D engine
What does game scripting mean?
I get confused sometimes becuase you have a game written in C and have the game scripts in python. What does that mean?

Thanks for all the help
:)/$/
smr
smr
py2exe will not speed your program up at all. py2exe simply packages all of your source files, the python runtime, and any modules you reference up into one executable. It doesn't compile your python code. psyco does speed up python code quite a bit, but it's still no comparison to a natively compiled executable. However, you can still get good enough performance for most tasks with python. Python is also easily extensible in C using the ctypes module.

Ogre is a natively compiled library. pyogre is a python wrapper around the native Ogre library, which is very fast. The overhead is of the python wrapper is negligible.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.