Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
C++ Game Development By Example

You're reading from   C++ Game Development By Example Learn to build games and graphics with SFML, OpenGL, and Vulkan using C++ programming

Arrow left icon
Product type Paperback
Published in May 2019
Publisher Packt
ISBN-13 9781789535303
Length 420 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Siddharth Shekar Siddharth Shekar
Author Profile Icon Siddharth Shekar
Siddharth Shekar
Arrow right icon
View More author details
Toc

Table of Contents (18) Chapters Close

Preface 1. Section 1: Basic Concepts
2. C++ Concepts FREE CHAPTER 3. Mathematics and Graphics Concepts 4. Section 2: SFML 2D Game Development
5. Setting Up Your Game 6. Creating Your Game 7. Finalizing Your Game 8. Section 3: Modern OpenGL 3D Game Development
9. Getting Started with OpenGL 10. Building on the Game Objects 11. Enhancing Your Game with Collision, Loops, and Lighting 12. Section 4: Rendering 3D Objects with Vulkan
13. Getting Started with Vulkan 14. Preparing the Clear Screen 15. Creating Object Resources 16. Drawing Vulkan Objects 17. Other Books You May Enjoy

What this book covers

Chapter 1, C++ Concepts, covers the basics of C++ programming, which are essential to understand and code the chapters in this book. 

Chapter 2, Mathematics and Graphics Concepts, In this chapter we cover the basic topics of maths such as vector calculations and knowledge on matrices. These are essential for graphics programming and basic physics programming. We then move on to the basics of graphics programming, starting with how a bunch of vertices is sent to the graphics pipeline and how they are converted into shapes and rendered on the screen.

Chapter 3, Setting Up Your Game, introduces the SFML framework, its uses, and its limitations. It also covers creating a Visual Studio project and adding SFML to it, creating a basic window with the basic framework of the game to initialize, update, render, and close it. We will also learn how to draw different shapes and learn how to add a textured sprite to the scene and add keyboard input.

Chapter 4, Creating Your Game, covers the creation of the character class and adding functionality to a character to make them move and jump. We will also create the enemy class to populate enemies for the game. We will add a rockets class so the player can spawn rockets when they fire. Finally, we will add collision detection to detect collisions between two sprites.

Chapter 5, Finalizing Your Game, covers finishing the game and adding some polishing touches by adding scoring, text, and audio. We'll also add some animation to the player character to make the game more lively.

Chapter 6, Getting Started with OpenGL, looks at what OpenGL is, its advantages, and its shortcomings. We'll integrate OpenGL into the Visual Studio project and use GLFW to create a window. We'll create a basic game loop and render our first 3D object using Vertex and fragment shaders.

Chapter 7, Building on the Game Objects, covers adding textures to an object. We'll include the Bullet Physics library in the project to add physics to the scene. We will see how to integrate physics with our 3D OpenGL rendered object. Finally, we will create a basic level to test out the physics.

Chapter 8, Enhancing Your Game with Collision, Loop, and Lighting, covers adding a game-over condition and finishing the game loop. We will add some finishing touches to the game by adding some basic 3D lighting and text to display the score and game-over condition.

Chapter 9, Getting Started with Vulkan, looks at the need for Vulkan and how it is different from OpenGL. We'll look at the advantages and disadvantages of Vulkan, integrate it into the Visual Studio project, and add GLFW to create a window for the project. We will create an app and a Vulkan instance, and add validation layers to check whether Vulkan is running as required. We'll also get physical device properties and create a logical device.

Chapter 10, Preparing the Clear Screen, covers the creation of a window surface to which we can render the scene. We also need to create a swap chain so that we can ping-pong between the front buffer and back buffer, and create image views and frame buffers to which the views are attached. We will create the draw command buffer to record and submit graphics commands and create a renderpass clear screen. 

Chapter 11, Creating Object Resources, covers creating the resources required to draw the geometry. This includes adding a mesh class that has all the geometry information, including vertex and index data. We'll create object buffers to store the vertex, index, and uniform buffers. We'll also create DescriptorSetLayout and Descriptor Sets, and finally, we'll create shaders and convert them to SPIR-V binary format.

Chapter 12, Drawing Vulkan Objects, covers creating the graphics pipeline, in which we set the vertices and enable viewports, multisampling, and depth and stencil testing. We'll also create an object class, which will help create the object buffers, descriptor set, and graphics pipeline for the object. We will create a camera class to view the world through, and then finally render the object. At the end of the chapter, we will also see how to synchronize information being sent.

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image