Summary
In this chapter, you deepened your knowledge about items, about the scene, and about the view. While developing the game, you became familiar with different approaches of how to animate items, and you were taught how to detect collisions. As an advanced topic, you were introduced to parallax scrolling.
After having completed the two chapters describing Graphics View, you should now know almost everything about it. You are able to create complete custom items, you can alter or extend standard items, and with the information about the level of detail, you even have the power to alter an item's appearance, depending on its zoom level. You can transform items and the scene, and you can animate items and thus the entire scene.
Furthermore, as you saw while developing the game, your skills are good enough to develop a jump-and-run game with parallax scrolling, as it is used in highly professional games. We also learned how to add gamepad support to our game. To keep it fluid and highly responsive, finally we saw some tricks on how to get the most out of Graphics View.
When we worked with widgets and the Graphics View framework, we had to use some general purpose Qt types, such as QString or QVector. In simple cases, their API is pretty obvious. However, these and many other classes provided by Qt Core module are very powerful, and you will greatly benefit from deeper knowledge of them. When you develop a serious project, it's very important to understand how these basic types work and what dangers they may pose when used incorrectly. In the next chapter, we will turn our attention to this topic. You will learn how you can work with text in Qt, which containers you should use in different cases, and how to manipulate various kind of data and implement a persistent storage. This is essential for any game that is more complicated than our simple examples.