Jan Ciger wrote:
> > One has to ask
> > which scripting languages to go for - Lua and/or Python? Lua would be
> > the easiest to integrate in terms of being very self contained i.e.
> > which could stick the whole of the lua interpreter into the core OSG
> > distribution and one would hardly notice as its so tiny.
>
> That does not make really sense. There are actually two very different
> ways of integrating scripting:
>
> 1) Application is written in C/C++ and calls embedded scripts. This is
> fairly typical for game development - game is written in C/C++ and e.g.
> AI is scripted using a built-in scripting engine. Here Lua is great (it
> was written for it), because it is fairly easy to maintain separation
> between different scripts (exception/error in one script does not crash
> the whole thing). Furthermore, Lua is really tiny, with negligible
> overhead. Another contender is Javascript (e.g. VRML standard uses it
> for exactly this purpose). I wouldn't target this case, because it is
> very application-specific and there is little a generic scene graph
> binding could provide to it.
>
> 2) Application is written in a high level language and calls into C/C++
> code to run the performance critical stuff. I think that this is what
> you want ("... enable us to
> develop applications purely from scripting languages, so developers in
> this realm would just need the binaries to the OSG installed, and no
> need for C++ dev environment").
>
> In this case I would go for a full featured language with a rich set of
> libraries. Python trumps Lua very easily here with its huge collection
> of libraries and tools. Lua is a very minimalistic language designed for
> embedding, not for writing whole applications in. Soya3D 3D engine is
> written in this manner - programs are written in Python, calling C/C++
> libraries that provide the functionality on top of OpenGL.
>
> Moreover, the Python bindings (osgPython?) do exist already, even though
> probably unmaintained at the moment ...
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.
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.

Rizzen
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to