Book Image

Game Programming using Qt 5 Beginner's Guide - Second Edition

Book Image

Game Programming using Qt 5 Beginner's Guide - Second Edition

Overview of this book

Qt is the leading cross-platform toolkit for all significant desktop, mobile, and embedded platforms and is becoming popular by the day, especially on mobile and embedded devices. It's a powerful tool that perfectly fits the needs of game developers. This book will help you learn the basics of Qt and will equip you with the necessary toolsets to build apps and games. The book begins by how to create an application and prepare a working environment for both desktop and mobile platforms. You will learn how to use built-in Qt widgets and Form Editor to create a GUI application and then learn the basics of creating graphical interfaces and Qt's core concepts. Further, you'll learn to enrich your games by implementing network connectivity and employing scripting. You will learn about Qt's capabilities for handling strings and files, data storage, and serialization. Moving on, you will learn about the new Qt Gamepad module and how to add it in your game and then delve into OpenGL and Vulcan, and how it can be used in Qt applications to implement hardware-accelerated 2D and 3D graphics. You will then explore various facets of Qt Quick: how it can be used in games to add game logic, add game physics, and build astonishing UIs for your games. By the end of this book, you will have developed the skillset to develop interesting games with Qt.
Table of Contents (18 chapters)
16
Pop quiz answers

What this book covers

Chapter 1, Introduction to Qt, familiarizes you with the standard behavior that is required when creating cross-platform applications and shows you a bit of history of Qt and how it evolved over time with an emphasis on the most recent architectural changes in Qt.

Chapter 2, Installation, guides you through the process of installing a Qt binary release for desktop platforms, setting up the bundled IDE, and looks at various configuration options related to cross-platform programming.

Chapter 3, Qt GUI Programming, shows you how to create classic user interfaces with the Qt Widgets module. It also familiarizes you with the process of compiling applications using Qt.

Chapter 4, Custom 2D Graphics with Graphics View, familiarizes you with 2D object-oriented graphics in Qt. You will learn how to use built-in items to compose the final results as well as create your own items supplementing what is already available.

Chapter 5, Animations in Graphics View, describes the Qt Animation framework, the property system, and shows you how to implement animations in Graphics View. It will guide you through the process of creating a game featuring 2D graphics and animations.

Chapter 6, Qt Core Essentials, covers the concepts related to data processing and display in Qt—file handling in different formats, Unicode text handling and displaying user-visible strings in different languages, and regular expression matching.

Chapter 7, Networking, demonstrates the IP networking technologies that are available in Qt. It will teach you how to connect to TCP servers, implement a TCP server, and implement fast communication via UDP.

Chapter 8, Custom Widgets, describes the whole mechanism related to 2D software rendering in Qt, and teaches you how to create your own widget classes with unique functionalities.

Chapter 9, OpenGL and Vulkan in Qt applications, discusses Qt capabilities related to accelerated 3D graphics. You will learn how to perform fast 3D drawing using OpenGL and Vulkan APIs and use the convenient wrappers Qt provides for them.

Chapter 10, Scripting, covers the benefits of scripting in applications. It will teach you how to employ a scripting engine for a game by using JavaScript or Python.

Chapter 11, Introduction to Qt Quick, teaches you how to program resolution-independent fluid user interfaces using a QML declarative engine and Qt Quick scene graph environment.

Chapter 12, Customization in Qt Quick, focuses on how to implement new graphical items in Qt Quick and implement custom event handling.

Chapter 13, Animations in Qt Quick Games, familiarizes you with the ways to perform animations in Qt Quick and give more hints for implementing games in Qt Quick.

Chapter 14, Advanced Visual Effects in Qt Quick, goes through some advanced concepts that will allow you to perform truly unique graphical effects in Qt Quick.

Chapter 15, 3D Graphics with Qt, outlines using Qt's high-level API for 3D graphics and show you how to implement an animated 3D game.

Chapter 16, Miscellaneous and Advanced Concepts, demonstrates the important aspects of Qt programming that didn't make it into the other chapters but may be important for game programming. This chapter is available online at https://www.packtpub.com/sites/default/files/downloads/MiscellaneousandAdvancedConcepts.pdf.