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

Re: Scripting



Jorrit Tyberghein wrote:
> 
> Steve Baker wrote:
> 
> > I'd object to the idea that development is easier in Python/whatever than
> > C++ - and once you take away that, why write slow code when for the same
> > effort or less, you can have fast code?  I know a lot of Python/whatever
> > enthusiasts are going to object to that view - but for me personally, it's
> > CERTAINLY true.
> 
> That depends on the kind of game though. I know networked games that
> plan to send game entity data over the network. And that INCLUDES
> their behaviour (i.e. scripts). This is hard to do with C or C++ code.

Yes - I agree.  For things like behavior scripting there are a lot of
things to favor doing it in an interpreted language...in the section of
my reply that you quoted, I was responding to the suggestion that the
main body of the game be written in a scripting language - which I don't
agree with.

> A script is a lot easier to send because it is interpreted. So if you don't know
> in advance what scripts you are going to need in a game then C or C++
> is out of the question since you need a compiler to do run those scripts.
> And who is going to include a C++ compiler in their game?

Indeed - although for a purely Linux game, it's a really safe bet to assume
it's already installed.

> I would also only use scripting for the following:
>     - AI (but with a lot of help from a fast C++ library)
>     - Behaviour of entities (this is closely related to AI but not always)
>       Like: what happens if someone opens this chest.
>     - Scenariou setup.

Yes - exactly.
 
> Things like physics, rendering, and so on should be done in the native
> language (i.e. C++).

Yep.  That seems to be the prevailing view across the industry.
 
----------------------------- Steve Baker -------------------------------
Mail : <sjbaker1@airmail.net>   WorkMail: <sjbaker@link.com>
URLs : http://www.sjbaker.org
       http://plib.sf.net http://tuxaqfh.sf.net http://tuxkart.sf.net
       http://prettypoly.sf.net http://freeglut.sf.net
       http://toobular.sf.net   http://lodestone.sf.net