-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Rizzen wrote:

> Good points Jan, though maybe we should have a compromise here. Thus OSG
> supports two scripting languages, the best one for each scenario.
> Scenario 1: Have Lua for embedded scripting via osgLua, which would go
> well for the gaming environment where processing speed is important.

However, this is extremely application specific - you typically want to
manipulate the game objects at a higher level from this type of scripts,
such as reduce hitpoints on missile impact or make a path-finding/AI
decision when your character sees a target. There is little need to
access the scene graph directly from such code. That is easier (and a
lot faster) to do from the C/C++ side. Think Quake C or Unreal script here.

I am not sure how can you make this generic enough to be actually useful
- - almost everybody would need to add their own bindings to the engine in
order to explicitly expose the application-specific objects and the bulk
of the OSG-related code will go unused. The only exception would be to
make a another VRML where the scripting is used to drive/animate the
scene graph objects themselves, but that has a fairly limited use if you
do not expose additional functionality.

> Scenario 2: While have Python for high level language dev environment
> via osgPython, where speed is not important for idea testing, or
> business or scientific applications where maximum speed is not
> important, but ease of development is important.

Actually, this has nothing at all to do with execution speed. The
perception "Python large = slow" and "Lua small = fast" is first
incorrect and second irrelevant here.

In this case the performance-critical code (rendering and such) would be
written in C/C++ (e.g. core OSG code) and only controlled from Python or
another language. Basically, if the code is properly written, it should
make no difference whether you write your application in C/C++ only or
in Python - the performance bottlenecks will be always in the C/C++
code, not in Python. However, you do gain the advantage of very fast
development with Python. The Python code handles things like GUI, user
input and perhaps some business logic/reasoning and for that Python is
plenty fast. Have a look either at Soya3D
(http://home.gna.org/oomadness/en/soya3d/index.html) or PyOpenGL
(http://pyopengl.sourceforge.net/) in order to get a taste of
development in this style.

Regards,

Jan


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Using GnuPG with Mandriva - http://enigmail.mozdev.org

iD8DBQFHXC6Qn11XseNj94gRAjS/AJ4vj+1dJlxsdT82c+dkBRXwofoZKgCg2eqk
x2FgMhQriTt3m7q+HIYOv4k=
=By0b
-----END PGP SIGNATURE-----
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to