/CPP-Game-Development-By-Example

C++ Game Development By Example, published by Packt

Primary LanguageHTMLMIT LicenseMIT

CPP-Game-Development-By-Example

CPP-Game-Development-By-Example

This is the code repository for CPP-Game-Development-By-Example, published by Packt.

Learn to build games and graphics with SFML, OpenGL, and Vulkan using C++ programming

What is this book about?

  • Understand shaders and how to write a basic vertex and fragment shader
  • Build a Visual Studio project and add SFML to it
  • Discover how to create sprite animations and a game character class
  • Add sound effects and background music to your game
  • Grasp how to integrate Vulkan into Visual Studio

This book covers the following exciting features:

If you feel this book is for you, get your copy today!

https://www.packtpub.com/

Instructions and Navigations

All of the code is organized into folders. For example, Chapter02.

The code will look like the following:

#include <iostream>
// Program prints out "Hello, World" to screen
int main()
{
std::cout<< "Hello, World."<<std::endl;
return 0;
}

Following is what you need for this book: If you’re a developer keen to learn game development with C++ or get up to date with game development, this book is for you. Some knowledge of C++ programming is assumed.

With the following software and hardware list you can run all code files present in the book (Chapter 1-12).

Software and Hardware List

Chapter Software required OS required
1-12 Visual Studio 2017 Community Edition Windows, Mac OS X, and Linux (Any)

We also provide a PDF file that has color images of the screenshots/diagrams used in this book. Click here to download it.

Errata

  • Page 7 (Line 1): This section covers the basic concepts. should be This section covers some basic concepts, as evident from chapter names.
  • Page 10 (Paragraph 1, line 6): suggesting that the the program executed and the program can terminate without errors. should be suggesting that the program can be executed and can terminate without errors.
  • Page 10 (Last paragraph, line 3): you encounter your first compiler errors. should be you encounter compiler errors.
  • Page 13 (Point 8, line 1): You will have seen a popup of the console after you ran the program. should be You should see a popup of the console after running the program.
  • Page 14: which is done like so should be in this manner
  • Page 54 (Paragraph 2, line 1): The positive X axis starts from the origin and starts moving endlessly should be The positive X axis starts from the origin and moves endlessly
  • Page 54 (Paragraph 2, line 2): The positive Y axis starts from the origin as the X axis and starts going in the upward direction at 90 degrees to the X axis and the negative Y moves in the opposite direction. should be The positive Y axis starts from the origin and moves in the upward direction at 90 degrees to the X axis, and the negative Y axis moves in the opposite direction.
  • Page 58 (Paragraph 1, line 1): The as follows vectors (A) and (B) are starting in different locations. should be In the following diagram, the vectors (A) and (B) are starting at different locations.
  • Page 58 (Paragraph 2, line 2): In the example as follows, the vector (V) is equal to (2, 3, 1) and is also denoted as is denoted as: should be In the following example, the vector (V) is equal to (2, 3, 1) and is denoted as follows:
  • Page 121 (Point 1): You will see the .h and .cpp file sections automatically populated as Hero.h and Hero.cpp. should be You will see that the .h and .cpp file sections get automatically populated as Hero.h and Hero.cpp, respectively.
  • Page 121 (Point 3): the update, jump, and getSprite functions will update the player position, make the player jump, and get the sprite of the player used for drawing the player character. should be the update, jump, and getSprite functions will update the player position, make the player jump, and get the sprite of the player used for drawing the player character, respectively.
  • Page 199 (Line 1): Creating a MeshRenderer class should be Creating the MeshRenderer class
  • Page 360 (Figure): Per Sample Opertation should be Per Sample Operation
  • Page 366 (Code comment): intially was 0 should be initially was 0

Related products

Get to Know the Author

Siddharth Shekar Siddharth Shekar is a game developer and teacher with over 6 years' industry experience and 12 years' experience in C++ and other programming languages. He is adept at graphics libraries such as OpenGL and Vulkan, and game engines such as Unity and Unreal. He has published games on the iOS and Android app stores. He has also authored books including Swift Game Development, Mastering Android Game Development with Unity, and Learning iOS 8 Game Development Using Swift, all published by Packt Publishing. He currently lives in Auckland, New Zealand, and is a lecturer in the games department at Media Design School. He teaches advanced computer graphics programming, PlayStation 4 native game development, and mentors final year production students.

Other books by the authors

Learning Cocos2d-x Game Development

Learning iOS 8 Game Development Using Swift

Cocos2d Cross-Platform Game Development Cookbook - Second Edition

Mastering Android Game Development with Unity

Swift Game Development - Third Edition

Suggestions and Feedback

Click here if you have any feedback or suggestions.