Glenn Maynard 8b76b5eafd experimental: allow implementing effects in Lua.
The biggest risk here is performance; we rarely call Lua per-frame.  However,
there are lots of places where we can call Lua while rendering (any time we
call a command), and there's little difference between calling Lua once
every ten frames or once every frame; either way you're counting against the
per-frame time quota to hit vsync.  So, this probably isn't much of a stretch.

Usage is simple:

  OnCommand=luaeffect,Foo
  FooCommand=addx,math.random()*10

Actor commands run during the effect will only apply for that frame.  Don't
call tweening commands ("linear") or anything else that doesn't make sense
in this context; you're modifying m_TempState instead of the tweening queue.
This is hoped to replace some of the more esoteric stuff in the effect code.

For this to be of much use, Lua access to m_fSecsIntoEffect and probably
other stuff is needed.
2005-04-28 10:18:36 +00:00
S
Description
Languages
C++ 85.7%
Lua 4.3%
C 4.3%
Rich Text Format 2.3%
CMake 1.1%
Other 2%