[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.python

python for game programming

t3chn0n3rd

2/3/2008 2:06:00 PM

Is Python program language popular for game programming?

4 Answers

Diez B. Roggisch

2/3/2008 2:09:00 PM

0

t3chn0n3rd schrieb:
> Is Python program language popular for game programming?
>
Yes. For starters, google

pygame
pyglet


And python is used as scripting language in quite a few commercial
products, such as eve online.

Diez

miller.paul.w

2/3/2008 6:54:00 PM

0

On Feb 3, 9:05 am, t3chn0n3rd <darrin_al...@japan.com> wrote:
> Is Python program language popular for game programming?

Well, Python is at the center of my favorite game, Sid Meier's
Civilization 4. :-)

Another poster mentioned the pygame and pyglet libraries. I'd suggest
you look into them if you want to code a game in Python. Also keep in
mind the "alternate hard and soft layers" design pattern (as much as I
hate the phrase "design pattern," there's no better way to describe
this particular one.)

The essence of "alternate hard and soft layers" is to design your
application in one of two ways:

* Most of your code is in Python, with C or C++ extensions for
performance-critical areas, or
* Your main app is in C, C++, or some other language that can embed a
Python interpreter. The embedded Python interpreter provides a
scripting interface that can be used by level/scenario designers or
end users to customize the game. The scripting interface can be as
simple as a wrapper around functions in the main code, so you can
choose how much functionality you want to expose.

These two patterns are basically equivalent, but I prefer to use the
first, because it lets me write more Python and less C. In the second
approach, you end up writing most of the game in C and exposing a few
of those C functions to Python.

If you only want to expose a subset of game functionality to Python
(for example, AI or level generation), I'd guess the second way is the
way to go.

Steve Holden

2/3/2008 8:38:00 PM

0

t3chn0n3rd wrote:
> Is Python program language popular for game programming?
>
Python is a core technology for CCP, the producers of EVE Online, which
is I believe the largest single-sharded multi-player game currently
running, and which has supported over 40,000 simultaneously logged-in
users on a 200+-CPU cluster if I'm not mistaken.

regards
Steve
--
Steve Holden +1 571 484 6266 +1 800 494 3119
Holden Web LLC http://www.hold...

Richard Jones

2/3/2008 9:22:00 PM

0

t3chn0n3rd wrote:
> Is Python program language popular for game programming?

http://www.p...


Richard