Slashdot Mirror


Python Used as Modding Language for Battlefield 2

Dutch Dopey writes "In an interview with Lars Gustavsson of DICE, it was mentioned that Battlefield 2's modding tools are going to be delivered with the game, and that the tools are the same ones used to develop the game. The modding language in use is Python, and will support all aspects of the language.

3 of 41 comments (clear)

  1. Python's too slow for gaming by MentalMooMan · · Score: 1, Insightful

    For mods, it's OK, but it's simply too high a level code for the main game. Battlefield already runs too slowly on my computer (UT2k4 works 10x better). I don't want it going even slower!

    --
    43rd Law of Computing:
    Anything that can go wr
    fortune: Segmentation violation -- Core Dumped
    1. Re:Python's too slow for gaming by sholden · · Score: 4, Insightful

      That hasn't stopped Troika Games using it for Greyhawk or Irrational using it for Freedom Force. Not for the entire game engine but as the level scripting engine. The bit that actually matters in the game, the bit which makes the *fun* stuff rather than the pretty stuff.

      And of course there's BaseGolf which is completely implemented in python.

      The problem I see with using python as a modding language is that it makes it very difficult to enforce safety in mods. It'd be nice if the modding language was sandboxed so that you could download a mod and know it won't format your hard drive.

      But it makes sense to use an existing language engine instead of creating yet another scripting language for the level designers to use. And python is much easier for non-programmers to write in than lua, in my opinion anyway...

  2. Re:so.. by Jerf · · Score: 4, Insightful

    Ok... Is it safe to assume that the _whole_ game is coded in Python then?

    Not in the slightest. Python integrates well with C and C++. (Some other languages do it without somewhat less boilerplate in the integration code, but Python is one of the languages that basically integrates 100% feasibly.)

    In fact, quite the opposite; it's safe to assume only the high level is in Python. That's Standard Operating Procedure for high-performance code in the Python world.