Replacing a custom scripting language #61
Replies: 4 comments 1 reply
-
I don't understand, why are you trying to replace working scripts? Do you know that Lua is slow and guys who used it tried to replace it:
English:
Stalker engine was available since April 2014, from that time at least 3 teams replace it:
English + links:
I helped to add Linux and ARM support to OpenXRay and you can join to it channel and ask directly about cons of using Lua: https://discord.gg/sjRMQwv |
Beta Was this translation helpful? Give feedback.
-
Scripting language could use API cleanup, sure. That said, I'm not in favor of replacing it entirely for several reasons. A small write-up of my thoughts is below. First, you will need to re-implement all the legacy API. Remember that, as an open and established game engine, we rely on the old stuff working exactly the way it used to, no less no more. Otherwise this could kill/split the modding community. Second, as the saying goes, if something's not broken, don't fix it. This engine has a lot of stuff that could use fixing or bringing up to date. Scripting language in the game right now has some parts that are broken, inconsistent or otherwise undesirable, yes. These should be addressed individually. But overall? It's doing its job as it has done for years. Instead, a focused effort should be done at providing a proper toolkit to support it: scripting language debugger and/or profiler, fixing old API, a new API (without breaking the old one!). On a more personal note, the Storm's engine runtime compiler was what fascinating me the most. It always felt to me like the magical part that made everything come together, it allowed the modding scene to... exist, and preserving that is something that feels the closest to my heart. Last, I feel that replacing things with new and shiny just for the sake of it is just wrong. Such an implementation will inevitably run into unexpected edge cases, complications, performance loss... you name it. As such, the project might be abandoned midway and the effort that could be used elsewhere would be wasted. I'm a strong opponent of the idea that just because a thing is new, it's better than the old one. There should be more to it. I already cited Jon Blow earlier, but engine devs in major AAA studios would say you the same. Jason Gregory says in his Game Engine Architecture book: "Just because a [cool new C++] feature exists doesn't mean your team needs to immediately start making use of it. At Naughty Dog, we tend to take a conservative approach to adopting new language features. [...] We have a list of those C++ features that are approved for use in our runtime code, and another somewhat more liberal list of language features that are allowed in [dev] tools code". So yeah, these are my 5 cents. I don't have years of experience in this or another language, but I like listening to other people and trying to understand their point of view. Gamedev is quite a beast, different from anything you might see elsewhere. |
Beta Was this translation helpful? Give feedback.
-
I know 0 A.D. uses JS VM for scripting. Here's an interesting read regarding their decision-making process for choosing it over lua. |
Beta Was this translation helpful? Give feedback.
-
There are the main points descending by significance:
But keep in mind that:
|
Beta Was this translation helpful? Give feedback.
-
Reasons to replace it:
Requirements for the successful transition:
Beta Was this translation helpful? Give feedback.
All reactions