Compiled versus scripting

For some game engines, the game engine itself is programmed in C++, but the game logic is entirely done in a scripting language, like most development for Unity, for example. This allows you to iterate on gameplay much faster, and allows technical designers and artists to modify behaviors without having to bother a programmer. Also, depending on the language, it can allow people to use a more appropriate language for the problem's domain (for example, AI may not be the easiest thing to implement in C++).

Different companies handle working with languages differently. When I was working at a AAA (pronounced triple-A) studio, we would have designers prototype ideas for mechanics and get it working in the best possible way making use of scripting languages. Upon approval from the leads as something to add to the project, if the script had performance issues, programmers would use the scripting language code as a base and then create a super-efficient version using C++ that would work in all levels. However, when I was working on an indie title, all of the code for the project was written in a scripting language (C#), since we didn't have access to the engine's source code (Unity). Also, if you are wanting to target devices that are limited in memory and processing power (such as the Nintendo 3DS), you are likely wanting to care about performance a lot more so it's more important to use more optimized code. It's a good idea to be familiar with both options and be comfortable working either way.

If you are interested in using a scripting language for your project, Lua is very widely used in the game industry because it's very easy to learn and fairly easy to incorporate into your engine. Lua started off as a configuration language. This has some nice quirks, in that it's great for creating and configuring things - which is what you want to do in a game. It's important to note, though, that it's not object-oriented but uses a small amount of memory.

A list of games that use Lua as a scripting language can be found here: https://en.wikipedia.org/wiki/Category%3aLua-scripted_video_games.

If you are interested in integrating Lua into your project or would like to see how it works, I highly suggest checking out http://www.lua.org/start.html.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.143.205.136