April 2018
Beginner
714 pages
18h 21m
English
Let's create a new Qt Widgets project and start making our game. Since the project will become more complex than our previous projects, we will not be giving you precise instructions for editing the code. If at any time you are unsure about the changes you make, you can look at the reference implementation provided with the book. It also contains the image files you can use to implement the game.
Let's now look at how we can mobilize Benjamin. First, we need a custom item class for him. We call the Player class and choose QGraphicsPixmapItem as the base class, because Benjamin is a PNG image. In the item's Player class, we further create a private field of integer type and call it m_direction ...
Read now
Unlock full access