Python for Scripting.
I am learning Python in order to use it for scripting purposes.Can you manipulate 3d graphics or built new ones with Python?Is it the right language?
quote:Original post by Stranger
Can you manipulate 3d graphics or built new ones with Python?
Sure. Take a look at PyOpenGl[1].
quote:
Is it the right language?
Python is (almost) always the right language .
[1]http://pyopengl.sourceforge.net/
For those who believe in God, most of the big questions are answered. But for those of us who can''t readily accept the God formula, the big answers don''t remain stone- written. We adjust to new conditions and discoveries. We are pliable. Love need not be a command or faith a dictum. I am my own God. We are here to unlearn the teachings of the church, state, and our educational system. We are here to drink beer. We are here to kill war. We are here to laugh at the odds and live our lives so well that Death will tremble to take us -- Charles Bukowski
I would just like to a few comment based on our company''s experience with Python. Python is a good language to script in - our scripters like it and integrating it with the engine was quite easy - except when we ported it to the Playstation 2 - that was quite hard and I think there are still bugs in it.
The big problem is with performance. Normally you woudn''t care much about performance for a scripting language since it runs only a small percentage of the total CPU time - but python is actually so slow that it for quite some time has been the real performance bottle neck in our game. For that reason we are currently in the process of writing our own Python-like scripting language where we have pulled out most of the slow stuff (such as weak type checking) and adding support for compilation to C code. That way we hope to get the benefits of Python wihtout its disadvantages.
Jacob Marner, M.Sc.
Console Programmer, R&D
Deadline Games
The big problem is with performance. Normally you woudn''t care much about performance for a scripting language since it runs only a small percentage of the total CPU time - but python is actually so slow that it for quite some time has been the real performance bottle neck in our game. For that reason we are currently in the process of writing our own Python-like scripting language where we have pulled out most of the slow stuff (such as weak type checking) and adding support for compilation to C code. That way we hope to get the benefits of Python wihtout its disadvantages.
Jacob Marner, M.Sc.
Console Programmer, R&D
Deadline Games
quote:Original post by Stranger
Does Python has pointers,references?
In Python, everything is a reference. There is no need for pointers .
Documents [ GDNet | MSDN | STL | OpenGL | Formats | RTFM | Asking Smart Questions ]
C++ Stuff [ MinGW | Loki | SDL | Boost. | STLport | FLTK | ACCU Recommended Books ]
Do you think that Java is a better solution for a scripting language or should I stick with Python?
I''m no expert but if you are going to use pyth with c/c++ have a look at SWIG. Those of you that know your stuff, I would definately like to hear what your opinion on SWIG is.
Does Python has memory management,constructors,destructors,
forced deletion of objects?Do you have to get involved with memory allocation with Python or it easier?Is it like Java that has nothing of the above?
In what way Python or any other scripting engine allows you to manipulate an editor like Dedit form Lithtech as an example?It allows you to manipulate even the graphics api used or it gives you ready made classes in order to build new effects and graphics without touching the low level stuff?
[edited by - Stranger on November 28, 2002 7:38:18 AM]
forced deletion of objects?Do you have to get involved with memory allocation with Python or it easier?Is it like Java that has nothing of the above?
In what way Python or any other scripting engine allows you to manipulate an editor like Dedit form Lithtech as an example?It allows you to manipulate even the graphics api used or it gives you ready made classes in order to build new effects and graphics without touching the low level stuff?
[edited by - Stranger on November 28, 2002 7:38:18 AM]
quote:Original post by Stranger
Does Python has memory management,constructors,destructors,
forced deletion of objects?
No. Well, it lets you define a class method called __init__, which is conceptually pretty close to a constructor.
quote:
Do you have to get involved with memory allocation with Python or it easier?Is it like Java that has nothing of the above?
Pretty much like Java in that regard from a programmer POV. All Python objects are reference counted, with some special handling to deal with cycles.
For those who believe in God, most of the big questions are answered. But for those of us who can''t readily accept the God formula, the big answers don''t remain stone- written. We adjust to new conditions and discoveries. We are pliable. Love need not be a command or faith a dictum. I am my own God. We are here to unlearn the teachings of the church, state, and our educational system. We are here to drink beer. We are here to kill war. We are here to laugh at the odds and live our lives so well that Death will tremble to take us -- Charles Bukowski
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement