O'Reilly logo

Game Programming using Qt 5 Beginner's Guide - Second Edition by Lorenz Haas, Witold Wysota, Pavel Strakhov

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Time for action – creating a 3D scene

In this chapter, we will create an implementation of the famous Tower of Hanoi game. This puzzle game contains three rods and multiple disks of different sizes. The disks can slide onto the rods, but a disk cannot be placed on top of a smaller disk. At the starting position, all the rods are placed on one of the disks. The goal is to move them all to another rod. The player can only move one disk at a time.

As usual, you will find the complete project in the resources that come with the book.

Create a new Qt Quick Application - Empty project and call it hanoi. While we will use some Qt Quick utilities, our project will not really be based on Qt Quick. Qt 3D will do most of the work. Nevertheless, the ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required