[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Game Logic

Jan Ekholm wrote:

> >I never tried Python (I hear it is also very good), so I can't speak for
> >or against it, but I know Perl and it's a shame seeing such a good tool
> >not get used where it would make such a perfect fit!
> Yep, it's also very nice.

I read some good things on Lua, which is used in several commercial
games (but is freely available I think). I know Grim Fandango uses Lua
for its scripting.

> But this seems to get a bit out of hand. We don't really need
> any big debate over whether Perl is good/optimized/whatever and
> can be used as the logic of a game.

No, I agree with you. I just wanted to speak my mind of something that
was annoying me recently, as I am seeing more and more scripting
languages embedded in games, even performance sensitive FPS like Quake3,
and many of them using the known to be slower (by scientists) virtual
machine approach of simulating a hardware machine with software, where
the approach of directed graph of "chunky" execution nodes is much
faster. Just look at how fast Perl is compared to Java (even the recent
JIT compilers can only get so close to Perl).

I don't even know if Python or Lua uses the pseudo-machine or the
execution nodes approach, just that I think that if we want to keep game
running nicely on lower-end machine, we should take some attention to
the implementation technology of the scripting engine (whether you write
it yourself or embed a popular engine like Perl or Python).

> But I would be interested in hearing opinions from people who do have
> *working* scripting in their game or application. What did you choose and
> why? Would you choose the same language again? Why or why not? I'm
> thinking of embedding Python as scripting into a fairly large C++ thing,
> but all alternatives or comments are welcome.

My stuff regarding scripting is not working yet, sorrily. I'm trying to
make the thing pretty flexible, and as far as I can see at the moment,
it seems that mapping types from C/C++ to the scripting language is one
of the hardest parts (you want these to be efficient and usable).

> I think scriptable games are the future. It is just so much work to code
> all loogic in a low level language such as C or C++, compared to an easy
> scripting language.

100% agreeing on this. I hear some people did Perl and Python bindings
for libraries like SDL and OpenGL. I wonder if at some point, we'll just
write whole games in a scripting language, then profile and convert to C
only the slower parts...

"The use of COBOL cripples the mind; its teaching should, therefore, be
regarded as a criminal offence." -- Edsger W. Dijkstra

To unsubscribe, e-mail: linuxgames-unsubscribe@sunsite.auc.dk
For additional commands, e-mail: linuxgames-help@sunsite.auc.dk