Scripting

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

Get Game Programming using Qt 5 Beginner's Guide - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.