General Discussions

Python in Popular Comercial games – CPUFreak91



Posts: 2337
Registered: 02-01-2005
I acidentally found on Google that Python is used in the following Popular Games:

Battlefield 2

Battlefield 2 uses python to implement core elements of the gameplay such as score keeping and team balancing. Check out the [WWW] BF2 Tech Wiki for sample BF2 Python scripts and information about API.

[WWW] Crystal Space

The Crystal Space 3D Engine uses python for scripting through a plug-in mechanism. Python scripts can be dynamically invoked from within the engine depending on game specific actions. Python can also be used to program the main game core. It has full access to the C++ Crystal Space API.

[WWW] Star Trek Bridge Commander

The game "Star Trek Bridge Commander" by [WWW] Totally Games uses Python both as the mission scripting language and also for a ton of other features.

[WWW] The Temple of Elemental Evil and [WWW] Vampire: The Masquerade: Bloodlines

"Greyhawk: The Temple of Elemental Evil" and "Vampire: The Masquerade: Bloodlines" use Python extensively for pretty much everything except the rendering engines - game logic, interface, etc. Both games have strong modding communities.

There is a short [WWW] interview with Steve Moret from Troika Games about using Python in ToEE (and looking forwards to Bloodlines).

[WWW] Civilization 4

The new addition to the legendary strategy game series has all its inner logic, including AI, implemented in Python. The interface is exposed, so the modding community can easily take advantage of it.

[WWW] Quark (Quake Army Knife)

Quark is a level-editor for Quake, Quake II and Half-Life written mostly in Python. One can also write plug-ins for it in Python.

Other commercial games that have used Python include:


Severance: Blade of Darkness

Freedom Force


I got this from: and from 690a7acfd955257b30a54c

It seems that EA likes Python

All Your Base Are Belong To Us!!! chown -r us ./base
"After three days without programming, life becomes meaningless.'' -- Tao of Programming Book 2

[This message has been edited by CPUFreak91 (edited May 18, 2006).]



Posts: 2220
From: New Albany, Indiana, U.S.
Registered: 10-08-2004
yah i saw that too... pretty cool huh?

In the stock market, you must buy high and sell low...Wait! That's not right!
Yes, I can be intelligent at times!!



Posts: 484
From: Queensland, Australia
Registered: 03-16-2006
yeah, games now-days have moved into being more 'data-driven', hence the need for a scripting language. I first heard about 'data-driven' games when I was listening to a powerpoint on Age of Empires 3. Data-driven games allow for the content to be created rather rapidly once the core engine is created. The engine takes in the data and thats what drives the game (hench data-driven).

Common choices are Lua, Python, XML, or just custom script. Most games can just use a pre-existing scripting language so that they don't have to spend time developing the scripting language.

Most game engines/makers now-days use a scripting language to run the game.

"But it is God who judges: He brings one down, he exalts another." - Psalm 75:7



Posts: 1345
From: Maesteg, Wales
Registered: 07-21-2001
I had to use Python for modding Battlefield 2 scripts. Due to the fact that you can bind it with most languages makes it a very appealing tool for game developers.

I know of a few commercial games written entirely in Python, but game companies mainly use it for the mod scripting side.

"One World. One Web. One Program." -Microsoft promotional advertisement
"Ein Volk, ein Reich, ein Fuhrer!" -Adolf Hitler