6 ms·
> "One thing I don't get with game engines: why do they feel the need to make a X-like scripting language..." They make it in "X" because they want a scripting
by SeanDav 11y ago
> "One thing I don't get with game engines: why do they feel the need to make a X-like scripting language..."
They make it in "X" because they want a scripting language that is familiar to a large number of users and they only want it "X-like" because they don't want to recreate the entire language, including edge cases and undefined behaviour.
- Cyph0n 11y agoSo in other words: make it like "X" to confuse people who already are fluent with "X", and remove the undefined behavior in "X" and introduce new undefined behavior, which will happen eventually as no language is immune to this. Sounds awesome.
- SeanDav 11y agoWhat is your one-size-fits-all-possible-use-cases scripting language they should all use instead? Lua? Counterpoint: https://julien.danjou.info/blog/2011/why-not-lua https://julien.danjou.info/blog/2011/why-not-lua Any scripting language will have issues. It is far easier to reason about and deal with issues created by your own DSL than some other 3rd party language that you have minimal or no control over.
- Cyph0n 11y agoWhy not extend an existing language? Python's meta programming capabilities are excellent. Keep the syntax the same, but introduce new features as you see fit. Wouldn't that work?
- chris_wot 11y agoThey already tried: Initially, Godot was designed to support multiple scripting languages (this ability still exists today). However, only GDScript is in use right now. There is a little history behind this. In the early days, the engine used the Lua scripting language. Lua is fast, but creating bindings to an object oriented system (by using fallbacks) was complex and slow and took an enormous amount of code. After some experiments with Python, it also proved difficult to embed. The last third party scripting language that was used for shipped games was Squirrel, but it was dropped as well. At that point, it became evident that Godot would work more optimally by using a built-in scripting language... http://docs.godotengine.org/en/latest/reference/gdscript.html?highlight=gdscript http://docs.godotengine.org/en/latest/reference/gdscript.htm...