Re: I just don't get it (Was: Scripting Systems)

Brian Hook <[email protected]>
Newsgroups gmane.games.devel.general
Message-ID <2004130214149.407606@GATEWAY>
> Please enlighten my heathen mind: Why not simply compile your
> "scripts" into C/C++ .DLLs?  

The sheer number of them can be daunting.  In a lot of cases you're 
talking about several hundred if not several thousand scripts if you 
want to be able to dynamically load/reload chunks of code.

I actually posed the same question not too long ago (look for the 
thread "DLLs as game objects").

But other considerations:

- scripts now requires real programming, whereas a language like Lua 
or Python is (in theory) a bit friendlier when doing basic scripting 
like behaviour, triggers, etc.

- security problems since you can't sandbox C++ particularly well

> Um, really?  Is Lua any easier to write than C?

Yes, since there aren't any pointers.  Remove memory management, and 
probably 50% of newbie C mistakes are gone.  Get rid of arcane syntax 
like the whole & vs. * thing, and you get rid of another good chunk.  
Get rid of "stack" vs "heap" and hey, more problems go away. 

> 3. The security of a sandbox.
>
>
> Ok, you've got me there, if your primary goal in scripting is to
> allow your fanbase to create new content without exposing other
> users to a variety of security scenarios, then I suppose you've
> found your holy grail.  

That's a pretty major one, IMO.  Not just that, but sandboxing 
protects your own designers from inadvertently trashing something if 
they're trying to make an edit on a live world (e.g. in an MMOG).

> All that aside, I do believe there are some C-syntax scripting

> ideas, Battlefield 1942 uses a "scripting" language that is really
> more along the lines of a gameplay balancing dataset.  

Well, there's the whole data-driven vs. procedural argument, but I 
don't think we have time to get into THAT one again here...

> I'm just not significantly compelled to go beyond dynamic library-
> based extendability for the time being.  

I felt the same way, but for the particular problem domain I'm working 
in, I specifically need reloadable code, sandboxing and ease of use.

Brian




-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
Gamedevlists-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gamedevlists-general
Archives:
http://sourceforge.net/mailarchive/forum.php?forum_idU7
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.