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

Re: Scripting in games.



Steve Baker wrote:
>> Collision detection should happen in your C code (too slow for
>> scripts, and script writers don't want to be bothered).
> 
> 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.

IMHO, setting an absolute position is a special case. You just
"warp" the object to the new location and either clear it's
velocity or leave it alone. If the object ends up inside the
other object, the subsequent collision detection should handle
it, or else it's just a logic bug that needs to be fixed.


>> It has been my experience that the *best* way to this stuff is via
>> a plugin/component system. No matter how much stuff you give the
>> scripters, there will always be something you didn't think of.
> 
> Wasn't that the idea of doing scripts in the first place?   The
> scripts *are* the plugins.

I meant a plugin system for the C code, but it seems like you've
got the mechanics of this covered already, and it's up to the
PLIB-based application to decide how it should work (and not
PLIB itself).

Jason
379