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

A complete guide to designing and building fun games with Qt and Qt Quick using associated toolsets
Preview in Mapt

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

Pavel Strakhov, Witold Wysota, Lorenz Haas
New Release!

A complete guide to designing and building fun games with Qt and Qt Quick using associated toolsets
Mapt Subscription
FREE
$29.99/m after trial
eBook
$28.00
RRP $39.99
Save 29%
Print + eBook
$49.99
RRP $49.99
What do I get with a Mapt Pro subscription?
  • Unlimited access to all Packt’s 5,000+ eBooks and Videos
  • Early Access content, Progress Tracking, and Assessments
  • 1 Free eBook or Video to download and keep every month after trial
What do I get with an eBook?
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with Print & eBook?
  • Get a paperback copy of the book delivered to you
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with a Video?
  • Download this Video course in MP4 format
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
$0.00
$28.00
$49.99
$29.99 p/m after trial
RRP $39.99
RRP $49.99
Subscription
eBook
Print + eBook
Start 14 Day Trial

Frequently bought together


Game Programming using Qt 5 Beginner's Guide - Second Edition Book Cover
Game Programming using Qt 5 Beginner's Guide - Second Edition
$ 39.99
$ 28.00
Learn QT 5 Book Cover
Learn QT 5
$ 35.99
$ 25.20
Buy 2 for $35.00
Save $40.98
Add to Cart

Book Details

ISBN 139781788399999
Paperback704 pages

Book Description

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

Chapter 1: Introduction to Qt
A journey through time
The cross-platform programming
Qt versions
Structure of Qt framework
Choosing the right license
Summary
Chapter 2: Installation
Installing the Qt SDK
Qt Creator
Summary
Chapter 3: Qt GUI Programming
Creating GUI in Qt
Layouts
Signals and slots
Creating a widget for the tic-tac-toe board
Advanced form editor usage
Polishing the application
Pop quiz
Summary
Chapter 4: Custom 2D Graphics with Graphics View
Graphics View architecture
Coordinate systems
Overview of functionality
Custom items
Widgets inside Graphics View
Optimization
Pop quiz
Summary
Chapter 5: Animations in Graphics View
The jumping elephant or how to animate the scene
The Animation framework
Property animations
Adding gamepad support
Item collision detection
Finishing the game
Pop quiz
Summary
Chapter 6: Qt Core Essentials
Text handling
Containers
Data storage
Pop quiz
Summary
Chapter 7: Networking
QNetworkAccessManager
Connecting to Google, Facebook, Twitter, and co.
Controlling the connectivity state
Communicating between games
Using UDP
Pop quiz
Summary
Chapter 8: Custom Widgets
Raster and vector graphics
Raster painting
Creating a custom widget
Working with images
Painting text
Optimizing widget painting
Implementing a chess game
Pop quiz
Summary
Chapter 9: OpenGL and Vulkan in Qt applications
Introduction to OpenGL with Qt
Using OpenGL in immediate mode
Modern OpenGL with Qt
Vulkan in Qt applications
Combining OpenGL or Vulkan with Qt Widgets
Pop quiz
Summary
Chapter 10: Scripting
Why script?
Evaluating JavaScript expressions
Exposing C++ objects and functions to JavaScript code
Creating a JavaScript scripting game
Python scripting
Pop quiz
Summary
Chapter 11: Introduction to Qt Quick
Declarative UI programming
Overview of QML types provided by Qt
Qt Quick Designer
Qt Quick and C++
Bringing life into static user interfaces
Pop quiz
Summary
Chapter 12: Customization in Qt Quick
Creating a custom QML component
Event handlers
Creating advanced QML components
Dynamic and lazy loading of QML objects
Imperative painting on Canvas using JavaScript
Using C++ classes as QML components
Pop quiz
Summary
Chapter 13: Animations in Qt Quick Games
Animation framework in Qt Quick
Quick game programming
Pop quiz
Summary
Chapter 14: Advanced Visual Effects in Qt Quick
Making the game more attractive
Custom OpenGL-based Qt Quick items
Using QPainter interface in Qt Quick
Pop quiz
Summary
Chapter 15: 3D Graphics with Qt
Qt 3D overview
Rendering 3D objects
Handling user input
Performing animations
Integration with 3D modeling software
Working with Qt 3D using C++
Integration with Qt Widgets and Qt Quick
Pop quiz
Summary

What You Will Learn

  • Install the latest version of Qt on your system
  • Understand the basic concepts of every Qt game and application
  • Develop 2D object-oriented graphics using Qt Graphics View
  • Build multiplayer games or add a chat function to your games with Qt Network module
  • Script your game with Qt QML
  • Explore the Qt Gamepad module in order to integrate gamepad support in C++ and QML applications
  • Program resolution-independent and fluid UIs using QML and Qt Quick
  • Control your game flow in line with mobile device sensors
  • Test and debug your game easily with Qt Creator and Qt Test

Authors

Table of Contents

Chapter 1: Introduction to Qt
A journey through time
The cross-platform programming
Qt versions
Structure of Qt framework
Choosing the right license
Summary
Chapter 2: Installation
Installing the Qt SDK
Qt Creator
Summary
Chapter 3: Qt GUI Programming
Creating GUI in Qt
Layouts
Signals and slots
Creating a widget for the tic-tac-toe board
Advanced form editor usage
Polishing the application
Pop quiz
Summary
Chapter 4: Custom 2D Graphics with Graphics View
Graphics View architecture
Coordinate systems
Overview of functionality
Custom items
Widgets inside Graphics View
Optimization
Pop quiz
Summary
Chapter 5: Animations in Graphics View
The jumping elephant or how to animate the scene
The Animation framework
Property animations
Adding gamepad support
Item collision detection
Finishing the game
Pop quiz
Summary
Chapter 6: Qt Core Essentials
Text handling
Containers
Data storage
Pop quiz
Summary
Chapter 7: Networking
QNetworkAccessManager
Connecting to Google, Facebook, Twitter, and co.
Controlling the connectivity state
Communicating between games
Using UDP
Pop quiz
Summary
Chapter 8: Custom Widgets
Raster and vector graphics
Raster painting
Creating a custom widget
Working with images
Painting text
Optimizing widget painting
Implementing a chess game
Pop quiz
Summary
Chapter 9: OpenGL and Vulkan in Qt applications
Introduction to OpenGL with Qt
Using OpenGL in immediate mode
Modern OpenGL with Qt
Vulkan in Qt applications
Combining OpenGL or Vulkan with Qt Widgets
Pop quiz
Summary
Chapter 10: Scripting
Why script?
Evaluating JavaScript expressions
Exposing C++ objects and functions to JavaScript code
Creating a JavaScript scripting game
Python scripting
Pop quiz
Summary
Chapter 11: Introduction to Qt Quick
Declarative UI programming
Overview of QML types provided by Qt
Qt Quick Designer
Qt Quick and C++
Bringing life into static user interfaces
Pop quiz
Summary
Chapter 12: Customization in Qt Quick
Creating a custom QML component
Event handlers
Creating advanced QML components
Dynamic and lazy loading of QML objects
Imperative painting on Canvas using JavaScript
Using C++ classes as QML components
Pop quiz
Summary
Chapter 13: Animations in Qt Quick Games
Animation framework in Qt Quick
Quick game programming
Pop quiz
Summary
Chapter 14: Advanced Visual Effects in Qt Quick
Making the game more attractive
Custom OpenGL-based Qt Quick items
Using QPainter interface in Qt Quick
Pop quiz
Summary
Chapter 15: 3D Graphics with Qt
Qt 3D overview
Rendering 3D objects
Handling user input
Performing animations
Integration with 3D modeling software
Working with Qt 3D using C++
Integration with Qt Widgets and Qt Quick
Pop quiz
Summary

Book Details

ISBN 139781788399999
Paperback704 pages
Read More

Read More Reviews

Recommended for You

Learn QT 5 Book Cover
Learn QT 5
$ 35.99
$ 25.20
Computer Vision with OpenCV 3 and Qt5 Book Cover
Computer Vision with OpenCV 3 and Qt5
$ 39.99
$ 28.00
Mastering Android Development with Kotlin Book Cover
Mastering Android Development with Kotlin
$ 35.99
$ 25.20
Unity 2017 2D Game Development - Beginners Guide [Video] Book Cover
Unity 2017 2D Game Development - Beginners Guide [Video]
$ 124.99
$ 106.25
Mastering pfSense - Second Edition Book Cover
Mastering pfSense - Second Edition
$ 39.99
$ 28.00
Hands-On GUI Programming with C++ and Qt5 Book Cover
Hands-On GUI Programming with C++ and Qt5
$ 35.99
$ 25.20