GetStarted

From PyWiki

Jump to: navigation, search

Python-Ogre is a Python wrapper for the Ogre3D library and many Ogre modules. You can use Python, a high-level, easy to learn, and powerful programming language, to write high quality 3D applications. No more malloc / pointers / compiling / headers etc :)

[edit] Advantages

  • A lot less code required than with C++
  • Less code -> less bugs
  • More portable
  • No compile step required
  • Don't have to worry about memory allocation, long std::xyz instructions
  • Code is more readable
  • You can easily use an in-game python console to access any function/variable in your code
  • Easily use event registration in CEGUI layout files -> bound directly to a python function

[edit] Disadvantages

  • Heavy computations - Pure python is not very fast at strait number crunching(but it may be fast enough).
  • Multithreading - Threads in python only execute one at a time, and thus do not take advantage of multiple cores or processors.
    • As of python 2.6: There is a standard library, multiprocessing, which will leverage multiple cores at the cost of an expanded memory footprint, and it is fairly easy to use.
  • Memory footprint - Python and Python-Ogre do take a bit of memory, a few dozen megabytes. Not a big deal with modern machines, though

[edit] In-Between

  • Fast code - if you need a lot of computation, (eg. for advanced pathfinding) you can make a C/C++ library and call its functions from within python


Personal tools