Monday, 25 November 2013

GED Blog #7 - Scripting

Scripting is a high-level programming language that is very efficient as it lets another program to process it at run time rather than complied by the computer's program. It also helps the end users to program some behaviours in the system without getting very deep into it. For example, if programmers want the system to do certain things using scripting, it is like writing a note to co-worker when you expect him/her to perform certain tasks instead of going into his/her desk and figure out how to do it.

Scripting is a big part of many software as well as in game development. Game programmers can use scripting to give more accessibility to designers, allowing them to use it to design games easier. In one of the lectures, we watched a presentation presented by Moonshot game studio on they deal with the LUA scripting and AI.


Scripting and AI, presented by Damian Isla

In the presentation, they found the most important A.I. technology is as the following:

if < X > then < Y > else < Z >

This logic helps to handle all decision making and they can easily find out why things are happening and why not. However, it is more important for the designers to know how to write it. The best way to do this is by scripting, where they can write down what they desire to do in the program and the script will understand it and do it in code when the program executes. And there they listed the architecture of LUA and what they were focusing on.



LUA, as a scripting language, offers more flexibility to the development team.  It implements many functions as mentioned above. Highly embeddable, for example, is very useful when the users can send raw data to script, allow it to parse it, do some logical thinking, and return the result in raw data to users. I have similar experience with it when the programmer on the team wants to export the data from Maya to the program, he can write a script using the embedded scripting language, Python, to export the data he needs from Maya. Furthermore, LUA has the function of Dynamic typing where it does not restrict to a specific type when associating with the values; it depends on how the users attempt to use it and assign the correct type at run time. These functions provides more accessibility for designer to design, however, they could lower the performance of the system at the same time. Programmers always have to choose one over another when dealing with the engine, performance-sensitivity or designer expressivity.

They soon explained further about their strategy on how to use scripting with the engine. They break down the game into many components, and use scripting on some of them, and strictly code on some of them.



As the development processes, some components can be split into script and code depending on their roles and relationships in game.



For example, the animation control is scripted but then it can be broke down into animation scripting where designers can write some specific behaviours on animation and have code handles all the locomotion controls that are involved.

Scripting helps designers to make the good use of a system. As programmers makes something functional in code, then designers can make sure it performs well for the game and report it back to the programmers to improve it further. This process repeats until the game is eventually finished.

By understanding the use of scripting in gaming, it opens more room for programmers and designers to communicate in order to make more great games.

No comments:

Post a Comment