[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [glob2-devel] scripting language
From: |
Stephane Magnenat |
Subject: |
Re: [glob2-devel] scripting language |
Date: |
Tue, 24 May 2005 15:03:19 +0200 |
User-agent: |
KMail/1.8 |
On Tuesday 24 May 2005 14.10, Bo Lorentsen wrote:
> address@hidden wrote:
> >That can be handled by only exposing functions and no direct pointer to
> > glob2 internal structures.
>
> Ok, so all game states are found in the script contexts, and not in
> glob2 itself ?
Actually, glob2's scripts load/save are not handeled properly. Source code is
loaded, script is compiled, and then always run from beginning, even if a
saved game is reloaded.
SGSL does not have any variable except areas and flags, which are stored in
std::map and indexed by strings. Areas are square on map that can be used in
conditions. Flags are the normal glob2 flags. Both are global and shared by
threads. There is pointer to glob2's internal structure for flags, but as the
script is recompiled on each reload that's ok,
Now we all agree that this is bad. So in the idea of a better script, we have
to fix those issues, but that also means that changing the script engine
doesn't break map format excepted that the old scripts will not compile.
There is no much old scripts :-) Only the tutorial, turretDefenseForTwo and
the campaign are using it.
Just once requirement. A script for glob2 should have function overloading. It
is very usefull for things like show("blabla") and show ("blabla", fr). Do
you think it will be difficult to add to tea?
SGSL.h gives a quick overview. Story is a thread and Mapscript the script
interpreter. Mapscript::parseScript is the parser and token compiler.
Mapscript::syncStep does execute the threads by calling Story::syncStep.
Steph
--
http://nct.ysagoon.com
Re: [glob2-devel] scripting language, Bo Lorentsen, 2005/05/24
Re: [glob2-devel] scripting language, martin . voelkle, 2005/05/24
Re: [glob2-devel] scripting language, Bo Lorentsen, 2005/05/24
Re: [glob2-devel] scripting language, martin . voelkle, 2005/05/24
Re: [glob2-devel] scripting language, Bo Lorentsen, 2005/05/25
Re: [glob2-devel] scripting language, Martin Nyffenegger, 2005/05/25
Re: [glob2-devel] scripting language, Bo Lorentsen, 2005/05/25
Re: [glob2-devel] scripting language, Stephane Magnenat, 2005/05/25
Re: [glob2-devel] scripting language, Bo Lorentsen, 2005/05/25
Re: [glob2-devel] scripting language, martin . voelkle, 2005/05/25