Skip to content

Asynchronious scipting in sphere #11

@lintax

Description

@lintax

We want to support advanced scripting, especially multi-threaded.

PROBLEM.

  1. 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).
  2. 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.
  3. Scripting language not bad but hand-crafted so it usually takes a quite a bunch of time to get with it right.

SOLUTION:

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions