In this chapter, you will learn how to bring scripting facilities to your programs. You will gain knowledge of how to use JavaScript to implement the logic and details of your game, without having to rebuild the main game engine. These skills will also be useful in the last part of the book when we work with Qt Quick. Although the environment we will focus on blends best with Qt applications, there are other options if you don't like JavaScript. We will also show how you can use Python to make your games scriptable.
The main topics covered in this chapter are as listed:
- Executing JavaScript code
- Interaction between C++ and JavaScript
- Implementing a scripting game
- Integrating the Python interpreter