RE: Scripting Systems

"Richard" <[email protected]>
Newsgroups gmane.games.devel.general
Message-ID <[email protected]>
> From: [email protected]
> [mailto:[email protected]]On Behalf Of
> Brian Hook
> 
> Do other languages handle this any better?  JavaScript suffers from 
> the same problems since it is also prototype-based (a la SELF et. 
> al.).  

We use Python which is not any better.

Like yourself and Brett, we can also update things on the fly
to make things easier although we don't pause the game
under a debugger to do it although I can see how being able
to freeze the game state and modify the logic without the state
changing in the meantime would make it even easier to 
rearrange the code to take advantage of the state.

If there is an error in one of our scripts I can usually change
the script and save it.  The game hooks into the Windows and
catches the file event and reloads the script replacing the
designated elements in the script in their relevant namespaces.

If the script was a service that ran and was called on by other
game logic, all the objects that call on it would use the new
version automatically.

If the script was a class that was used by some logic or other,
sometimes it is easier to kill the game and to restart it.
For the most part however, I can generally just cause a new
instance to be created and test that.  Depending on what it is
an instance of, if use of the functionality related to it in-game
creates a new instance everytime, then its pretty straightforward.
If not, then some selected statements in the console or the
relevant web page can force it to be used and/or can ascertain
that the new version no longer has the old problems.

If the class changed is used by sub-classes of which there are
instances of, it may error when these instances try to use
methods on their inherited class (not 100% since it doesn't
happen that often).

Its a very nice environment to work in.  But when I think of
it, its not that different from the environment I used to use
when I programmed in LPC under MudOS, the only real difference
is that we didn't have scripts reloading automatically when
the file was changed and that MudOS had no problems (that I
remember) with instances that inherited classes which had
since been replaced with changed versions.

Richard.


-------------------------------------------------------
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.