We want to support advanced scripting, especially multi-threaded.
PROBLEM.
- Current script engine is not bad, but event-driven and synchronous, so while processing a script event server is waiting the result, causing potential lags on heavy operations in a common places (like HitTry, etc).
- Moreover, complex AI (especially monster groups AI) requires complicated scripting being heavy on execution. Same does with several 'clever' spells admin would like to implement.
- Scripting language not bad but hand-crafted so it usually takes a quite a bunch of time to get with it right.
SOLUTION:
- Add a script processor no way connected to the current script engine with configurable amount of threads and execution queries. Expose Sphere objects to the script using usertypes.
- Use an game industry scripting standard - LUA that is a very high performance, standard and easy to learn language.
This still leaves several questions, for example if async script will decide to execute "damage(victim, 10)" it should probably pass through the normal operational cycle including SCP event Damage to be triggered.
We want to support advanced scripting, especially multi-threaded.
PROBLEM.
SOLUTION:
This still leaves several questions, for example if async script will decide to execute "damage(victim, 10)" it should probably pass through the normal operational cycle including SCP event Damage to be triggered.