C++ Game Development By Example: Learn to build games and graphics with SFML, OpenGL, and Vulkan using C++ programming

Packt Publishing Ltd
Free sample

Explore modern game programming and rendering techniques to build games using C++ programming language and its popular librariesKey Features
  • Learn how you can build basic 2D and complex 3D games with C++
  • Understand shadows, texturing, lighting, and rendering in 3D game development using OpenGL
  • Uncover modern graphics programming techniques and GPU compute methods using the Vulkan API
Book Description

Although numerous languages are currently being used to develop games, C++ remains the standard for fabricating expert libraries and tool chains for game development. This book introduces you to the world of game development with C++.

C++ Game Development By Example starts by touching upon the basic concepts of math, programming, and computer graphics and creating a simple side-scrolling action 2D game. You'll build a solid foundation by studying basic game concepts such as creating game loops, rendering 2D game scenes using SFML, 2D sprite creation and animation, and collision detection. The book will help you advance to creating a 3D physics puzzle game using modern OpenGL and the Bullet physics engine. You'll understand the graphics pipeline, which entails creating 3D objects using vertex and index buffers and rendering them to the scene using vertex and fragment shaders. Finally, you'll create a basic project using the Vulkan library that'll help you get to grips with creating swap chains, image views, render passes, and frame buffers for building high-performance graphics in your games.

By the end of this book, you’ll be ready with 3 compelling projects created with SFML, the Vulkan API, and OpenGL, and you'll be able take your game and graphics programming skills to the next level.

What you will learn
  • 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
  • Create shaders and convert them to the SPIR-V binary format
Who this book is for

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.

Read more
Collapse

About the author

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.
Read more
Collapse
Loading...

Additional Information

Publisher
Packt Publishing Ltd
Read more
Collapse
Published on
May 3, 2019
Read more
Collapse
Pages
420
Read more
Collapse
ISBN
9781789537345
Read more
Collapse
Read more
Collapse
Read more
Collapse
Language
English
Read more
Collapse
Genres
Computers / Programming / Games
Computers / Programming Languages / C
Computers / Programming Languages / General
Computers / User Interfaces
Read more
Collapse
Content Protection
This content is DRM free.
Read more
Collapse
Read Aloud
Available on Android devices
Read more
Collapse

Reading information

Smartphones and Tablets

Install the Google Play Books app for Android and iPad/iPhone. It syncs automatically with your account and allows you to read online or offline wherever you are.

Laptops and Computers

You can read books purchased on Google Play using your computer's web browser.

eReaders and other devices

To read on e-ink devices like the Sony eReader or Barnes & Noble Nook, you'll need to download a file and transfer it to your device. Please follow the detailed Help center instructions to transfer the files to supported eReaders.
Program 3D Games in C++: The #1 Language at Top Game Studios Worldwide

C++ remains the key language at many leading game development studios. Since it’s used throughout their enormous code bases, studios use it to maintain and improve their games, and look for it constantly when hiring new developers. Game Programming in C++ is a practical, hands-on approach to programming 3D video games in C++. Modeled on Sanjay Madhav’s game programming courses at USC, it’s fun, easy, practical, hands-on, and complete.

Step by step, you’ll learn to use C++ in all facets of real-world game programming, including 2D and 3D graphics, physics, AI, audio, user interfaces, and much more. You’ll hone real-world skills through practical exercises, and deepen your expertise through start-to-finish projects that grow in complexity as you build your skills. Throughout, Madhav pays special attention to demystifying the math that all professional game developers need to know.
Set up your C++ development tools quickly, and get started Implement basic 2D graphics, game updates, vectors, and game physics Build more intelligent games with widely used AI algorithms Implement 3D graphics with OpenGL, shaders, matrices, and transformations Integrate and mix audio, including 3D positional audio Detect collisions of objects in a 3D environment Efficiently respond to player input Build user interfaces, including Head-Up Displays (HUDs) Improve graphics quality with anisotropic filtering and deferred shading Load and save levels and binary game data
Whether you’re a working developer or a student with prior knowledge of C++ and data structures, Game Programming in C++ will prepare you to solve real problems with C++ in roles throughout the game development lifecycle. You’ll master the language that top studios are hiring for—and that’s a proven route to success.
Over 90 recipes to get you creating modern, fast, and high-quality games with C++About This BookLevel up your game programming skills with insightful recipes on building games in C++Analyze the less commonly discussed problems with C++ applications to develop the best gamesImprove the performance of your games with the new multi-threading and networking features of C++11Who This Book Is For

This book is ideal for aspiring game developers who are proficient in C++ programming and are interested in developing games with C++. Some basic knowledge of game programming will be useful but is not necessary.

What You Will LearnExplore the basics of game development to build great and effective features for your gameDevelop your first text-based game using the various concepts of object-oriented programmingUse algorithms when developing games with various sorting and searching techniquesExploit data structures in a game's development for data storageCreate your first 2D game using GDI library and sprite sheet.Build your first advanced 2D game of space invaders using patterns such as observer, fly-weight, abstract factory, command, state, and moreIn Detail

C++ is one of the preferred languages for game development as it supports a variety of coding styles that provides low-level access to the system. C++ is still used as a preferred game programming language by many as it gives game programmers control of the entire architecture, including memory patterns and usage. However, there is little information available on how to harness the advanced features of C++ to build robust games.

This book will teach you techniques to develop logic and game code using C++. The primary goal of this book is to teach you to create high-quality games using C++ game programming scripts and techniques, regardless of the library or game engine you use. It will show you how to make use of the object-oriented capabilities of C++ so you can write well-structured and powerful games of any genre. The book also explores important areas such as physics programming and audio programming, and gives you other useful tips and tricks to improve your code.

By the end of this book, you will be competent in game programming using C++, and will be able to develop your own games in C++.

Style and approach

Every recipe of this guide covers a task that will help you build different aspects of a game, such as taking player input and displaying the output, using control flow to implement decision making, and so on. Each recipe begins with gentle introduction and key concepts, has illustrated examples of use, and ends with a detailed but informative description of the inner workings.

Utilize proven solutions to solve common problems in game developmentAbout This BookUntangle your game development workflow, make cleaner code, and create structurally solid gamesImplement key programming patterns that will enable you to make efficient AI and remove duplicationOptimize your game using memory management techniquesWho This Book Is For

If you are a game developer who wants to solve commonly-encountered issues or have some way to communicate to other developers in a standardized format, then this book is for you. Knowledge of basic game programming principles and C++ programming is assumed.

What You Will LearnLearn what design patterns are and why you would want to use themReduce the maintenance burden with well-tested, cleaner codeEmploy the singleton pattern effectively to reduce your compiler workloadUse the factory pattern to help you create different objects with the same creation logic and reduce coding timeImprove game performance with Object PoolsAllow game play to interact with physics or graphics in an abstract wayRefractor your code to remove common code smellsIn Detail

You've learned how to program, and you've probably created some simple games at some point, but now you want to build larger projects and find out how to resolve your problems. So instead of a coder, you might now want to think like a game developer or software engineer. To organize your code well, you need certain tools to do so, and that's what this book is all about.

You will learn techniques to code quickly and correctly, while ensuring your code is modular and easily understandable.

To begin, we will start with the core game programming patterns, but not the usual way. We will take the use case strategy with this book. We will take an AAA standard game and show you the hurdles at multiple stages of development. Similarly, various use cases are used to showcase other patterns such as the adapter pattern, prototype pattern, flyweight pattern, and observer pattern. Lastly, we'll go over some tips and tricks on how to refactor your code to remove common code smells and make it easier for others to work with you. By the end of the book you will be proficient in using the most popular and frequently used patterns with the best practices.

Style and approach

This book takes a step-by-step real-life case studies approach. Every pattern is first explained using a bottleneck. We will show you a problem in your everyday workflow, and then introduce you to the pattern, and show you how the pattern will resolve the situation.

Create stunning 3D multiplayer games with integrated cloud-based featuresAbout This BookBuild a multiplayer 3D game from scratch using the features of Amazon's LumberyardExplore the world of Lumberyard along with Twitch and various key Amazon Web Services to build a gameThis step-by-step practical guide will teach you how to build cross-platform games using LumberyardWho This Book Is For

The book caters for those who have an interest or desire to create their own games, either as a hobbyist or to enhance their skills as a professional games developer. The book requires previous knowledge of software development. Experience with C++ will also be beneficial.

What You Will LearnExplore Lumberyard's graphical user interfaceCreate stunning game worldsUse Geppetto editor to create 3D charactersCreate and animate game characters using Lumberyard's toolsetCreate impressive gameplay to add multiplayer functionality to your gameDebug and play your 3D gameAdd multiplayer functionality to your game using Amazon GameLiftIntegrate with Amazon cloud services to support cloud computing and storageEngage your users during gameplay with TwitchIn Detail

Amazon's Lumberyard is a 3D cross-platform game development engine for building high-quality AAA games. It makes the process of creating multi-player games and adding realistic characters, stunning terrains, and special effects much faster and more efficient.

This book will show you how to use Lumberyard to create a multiplayer 3D game with cloud computing, storage, and Twitch integration for user engagement. We will start with an introduction to Lumberyard and provide an overview of its capabilities and integration options. Once the game engine is installed, we'll guide you through the creation of an immersive game world with characters. You'll add animations and audio to bring the game to life. We'll explore external interactions to support live multiplayer game play, data storage, user engagement, and the back end.

By the end of the book, you will be efficient in building cross-platform games using Lumberyard.

Style and approach

This step-by-step tutorial is filled with practical examples that will introduce you to the game engine's interface, as well as setting up your development environment.

Discover all the secrets of Unreal Engine and create seven fully functional games with the help of step-by-step instructionsAbout This BookUnderstand what a Blueprint is and how to create a complex visual scripting codeDiscover the infinite possibilities that Unreal Engine offers, and understand which tool to use, where and whenLearn to think like a real game developer in order to create enjoyable and bug-free games using this comprehensive and practical handbookWho This Book Is For

This book is ideal for intermediate level developers who know how to use Unreal Engine and want to go through a series of projects that will further their expertise. Working knowledge of C++ is a must.

What You Will LearnWrite clean and reusable Blueprint scriptsDevelop any kind of game you have in mind, following the rules used by expertsMove through Unreal Engine 4, always knowing what you are doing and where to find the right tool for your needsIntegrate C++ code into your projects using Visual Studio and the tools that Unreal providesExtricate between classes, nodes, interfaces, macros, and functionsWork with different types of assets, from 3D objects to audio sources, from UI buttons to animationsExplore all the aspects of the game logic—collisions, navigation meshes, matinees, volumes, events, and statesIn Detail

With the arrival of Unreal Engine 4, a new wonderful tool was born: Blueprint. This visual scripting tool allows even non-programmers to develop the logic for their games, allowing almost anyone to create entire games without the need to write a single line of code. The range of features you can access with Blueprint script is pretty extensive, making it one of the foremost choices for many game developers.

Unreal Engine Game Development Blueprints helps you unleash the real power of Unreal by helping you to create engaging and spectacular games. It will explain all the aspects of developing a game, focusing on visual scripting, and giving you all the information you need to create your own games.

We start with an introductory chapter to help you move fluidly inside the Blueprint user interface, recognize its different components, and understand any already written Blueprint script. Following this, you will learn how to modify generated Blueprint classes to produce a single player tic-tac-toe game and personalize it.

Next, you will learn how to create simple user interfaces, and how to extend Blueprints through code. This will help you make an informed decision between choosing Blueprint or code. You will then see the real power of Unreal unleashed as you create a beautiful scene with moving, AI controlled objects, particles, and lights.

Then, you will learn how to create AI using a behavior tree and a global level Blueprint, how to modify the camera, and how to shoot custom bullets. Finally, you will create a complex game using Blueprintable components complete with a menu, power-up, dangerous objects, and different weapons.

Style and approach

This is an easy-to-follow guide full of practical game examples. Each chapter contains step-by-step instructions to build a complete game and each game uses a different tool in order to cover all the topics in a detailed and progressive manner.

Develop games for iOS and Android using Cocos2d with the aid of over 70 step-by-step recipesAbout This BookLearn to efficiently use Cocos2d to develop cross-platform games, and have them work on iOS as well as AndroidGet acquainted with industry-wide professional tools such as Glyph Designer, Texture Packer, and Physics Editor, as well as using the Swift/ Sprite builder implementation of Cocos2dUse the easy-to-follow recipes to develop as well as deploy games to the Playstore and the App StoreWho This Book Is For

This book is for intermediate game developers and especially the ones who are generally curious to find out what's new in Cocos2d v 3.3.

What You Will LearnBuild custom sprites with custom animations for the gameBuild interactivity into your game by adding gestures and touch interactionsUnderstand AI enemy programming and path finding to make games more excitingAdd physics to your game to make it more lively and interactiveGet familiar with the Swift and Sprite builder implementations along with Objective-C programmingPerform hassle-free deployment of games built in iOS onto AndroidAdd effects and particle systems to make the game more colorfulIn Detail

Cocos2d is the world's leading game development framework for developing iOS games. With the introduction of Swift and Spritebuilder, it has become easier than ever to develop the games of your dreams without much effort. With Cocos2d, you can also deploy the game on Android, thereby maximizing profit and reducing development and porting costs.

The book starts off with a detailed look at how to implement sprites and animations into your game to make it livelier. You will then learn to add scenes to the game such as the gameplay scene and options scene and create menus and buttons in these scenes, as well as creating transitions between them. From there on, you will get an understanding of how to program user interactions such as tapping, holding, and swiping. You'll then add accelerometer inputs and physics to the scene, and make objects respond back to the inputs. A game is practically incomplete without audio being added, so this will be covered next.

The next section will include ways to add Artificial Intelligence to enemies in the game, allowing them to patrol, chase, and shoot in a projectile manner. You will then learn to use NSUserDefault to save and load game progress, and create and access files using JSON, Plist, and XML files for custom storage and retrieval of data. Then you will learn to add dynamic lighting to your game and will use industry-wide tools such as Texture Packer, Glyph Designer, Physics Editor, Particle Designer, and Sprite Illuminator to create more visually appealing and performance-optimized games.

Towards the end of the book, we dive into Apple's latest programming language—Swift, highlighting the major differences between Objective C and Swift. The book culminates with taking your existing game developed for iOS and porting it to Android, showing you how to install the Android Xcode plugin as well.

Style and approach

The book is written in an extremely lucid and step-by-step manner; it can be understood easily by anyone. The topics included are broken down into individual chapters so you can refer to the specific chapter to get answers on the subject you are interested in.

Bestselling Programming Tutorial and Reference Completely Rewritten for the New C++11 Standard

Fully updated and recast for the newly released C++11 standard, this authoritative and comprehensive introduction to C++ will help you to learn the language fast, and to use it in modern, highly effective ways. Highlighting today’s best practices, the authors show how to use both the core language and its standard library to write efficient, readable, and powerful code.

C++ Primer, Fifth Edition, introduces the C++ standard library from the outset, drawing on its common functions and facilities to help you write useful programs without first having to master every language detail. The book’s many examples have been revised to use the new language features and demonstrate how to make the best use of them. This book is a proven tutorial for those new to C++, an authoritative discussion of core C++ concepts and techniques, and a valuable resource for experienced programmers, especially those eager to see C++11 enhancements illuminated.

Start Fast and Achieve More

Learn how to use the new C++11 language features and the standard library to build robust programs quickly, and get comfortable with high-level programming Learn through examples that illuminate today’s best coding styles and program design techniques Understand the “rationale behind the rules”: why C++11 works as it does Use the extensive crossreferences to help you connect related concepts and insights Benefit from up-to-date learning aids and exercises that emphasize key points, help you to avoid pitfalls, promote good practices, and reinforce what you’ve learned

Access the source code for the extended examples from informit.com/title/0321714113

C++ Primer, Fifth Edition, features an enhanced, layflat binding, which allows the book to stay open more easily when placed on a flat surface. This special binding method—notable by a small space inside the spine—also increases durability.

©2019 GoogleSite Terms of ServicePrivacyDevelopersArtistsAbout Google|Location: United StatesLanguage: English (United States)
By purchasing this item, you are transacting with Google Payments and agreeing to the Google Payments Terms of Service and Privacy Notice.