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

Re: Scripting in games.



>But if we give the script the power to set the absolute positions of
>things (so they integrate velocities themselves, etc) - then the application
>won't have good data for doing collision detection.
>
>It's this tangling of levels that confuses me.   Seems like it would
>be hard to maintain a clean system if I allowed access at all of these
>levels at once.

I think it makes a big difference who your scripting engine is intended for:
Developers or users. Scripts that are to be used by developers to set up
situations for debugging or testing should give access to absolute
positions, generally allowing all possible operations without regards
breaking stuff. Scripts that can be added by users of the finished game must
obviously be very different, and only allow legal operations on the objects
they own.

I've been very impressed with the scripting of the game "Creatures", which
allows users to add new objects with their own behaviors to the game. You
install the game, and then download your own favourite user-created scripts
from the web, drop them in, and every game object interacts smoothly with
the user-added objects. Super cool! My thinking is that this will work best
when you have defined the set of all possible messages in advance.
Obviously, that set will be game-specific.

As for the Sims, I remember reading that the trick of the game is that all
objects affect the space around them, like with a gravitational field. Thus,
the game is played on an information-rich map, which saves a lot of message
passing and processing.

As for checking out code, there is the Nebula Device, a commercial
open-source engine that is used to develop the Nomads game, and that has a
scripting engine at its very core.

Peter Henningsen
alifegames.com