MSRevive / MasterSwordRebirth

Continuation of Master Sword Classic/Continued.
https://msrebirth.net/
Other
9 stars 7 forks source link

Rewrite the script langauge system #19

Closed SaintWish closed 1 year ago

SaintWish commented 2 years ago

Rewrite the script language parser to be faster and to make it easier to add new features to the language. Probably create it similar other script languages aka have a tokenizer and such.

To maintain backwards comparability for the current scripts the script languages rules will remain the same.

SaintWish commented 2 years ago

We could embed Lua, but that means rewriting all the scripts to Lua which would take quite a bit of work, but it might be easier then writing our own script engine to be just as fast...

Note: https://github.com/jairomer/embedded-lua-cpp

BenjaBobs commented 2 years ago

If you're moving away from msscripting, there are a whole a lot lf options, and this person organized some of them: https://github.com/dbohdan/embedded-scripting-languages

SaintWish commented 2 years ago

If you're moving away from msscripting, there are a whole a lot lf options, and this person organized some of them: https://github.com/dbohdan/embedded-scripting-languages

Neat, yeah we were thinking somewhere down the road to switch from msscript to either Lua or Angelscript.

BenjaBobs commented 2 years ago

Yeah, I can definitely understand why. I think Lua has the largest and most active community, meaning easier access to tutorials and such.

I think the Quirrel language also looks quite interesting. Looking forward to seeing what your decision will be, I think basically all options are exciting!

SaintWish commented 2 years ago

Yeah, I can definitely understand why. I think Lua has the largest and most active community, meaning easier access to tutorials and such.

I think the Quirrel language also looks quite interesting. Looking forward to seeing what your decision will be, I think basically all options are exciting!

That language does look interesting we'll have to keep it in mind.

SaintWish commented 2 years ago

Could also use Squirrel or Quirrel since it has a C++ like syntax and classes.

Note to self: Neat library to make embedding squirrel simpler. https://github.com/matusnovak/simplesquirrel

PHILLIPGATLIN commented 2 years ago

If the scripting language for MS is changed to another language you could write a translator program to parse mscript code and translate that code into the target language such as Lua. This may be faster than rewriting all of the scripts from scratch, although the quality of code the translator generates would be an issue. Something to think about.

PHILLIPGATLIN commented 2 years ago

If the scripting language for MS is changed to another language you could write a translator program to parse mscript code and translate that code into the target language such as Lua. This may be faster than rewriting all of the scripts from scratch, although the quality of code the translator generates would be an issue. Something to think about.

Windows tells me there are 2 929 script files in the scripts directory excluding directory files, do you really want to rewrite almost 3 000 code files in another language?? I don't. Maybe a translator program isn't such a bad idea considering how many files would need to be rewritten.

SaintWish commented 1 year ago

Closed in favour of this issue https://github.com/MSRevive/MasterSwordRebirth/issues/127