3 ms·
OT but why do you need a separate language for scripting? Why not just use the same language as you use for the rest of your game?
by Kiro 7y ago
OT but why do you need a separate language for scripting? Why not just use the same language as you use for the rest of your game?
- jackrabbit_ 7y agoGood question actually! I knew and I know that making a scripting fast enough to make video games is really tough, so I wasn't expecting to be able to make a language able to make games on its own (understand: not as a scripting language, but for the whole project as you suggested) ; also even if I want to throw away a few things from C++, I can't leave static typing and effeciency of C++: I think mixing the pros of C++ and the pros of my language was a good catch, the core in C++ (strong, fast, using optimizations I can't make in ArkScript), the scripting of actors, entities and all in ArkScript (dynamic language, easier to script entites behavior with).
- littlestymaar 7y agoSince language engines are usually in C++, it takes tons of time to compile (and link!) when you made the simplest change. It could be really annoying really fast if you need to recompile everything every time you change a mob's HP pool or anything. The second reason is modding: World of Warcraft is scripted using Lua (like many games) and players can overwrite a lot of things via addons themselves being written in Lua.
- mhh__ 7y agoGame logic can then be implemented in a safe, "clean" language where game designers can't break the underlying game engine. It's also partly due to C++ being the Lingua Franca of game development - if it were a slightly less complicated/difficult to deploy language you could use both (I have built a toy GUI app that live compiles D code into an object file, and calls an entry point with a nice OOP interface into a made up data structure, it worked pretty well but I don't know much about games so I don't have much use for it). C++ is also ridiculously slow to compile (at it's beautiful worst) so having AI logic (say) in the main codebase is a bit of an issue for designers.
- k__ 7y agoI also saw a Rust game engine using a scriping language that leans heavily on Rust concepts. I think the scripting language was called Dyon.
- dilap 7y agoAnother reason besides those mentioned is it lets you deliver new content w/o having to deliver a new binary. This is especially important if you're targeting iOS, since there's no good way to force users to update (the best you can do is put up a dialog saying, "please update to continue").
- bullen 7y agoYou can script in C: https://www.youtube.com/watch?v=WMSBRk5WG58 https://www.youtube.com/watch?v=WMSBRk5WG58