Learning C++ by Building Games with Unreal Engine 4
Learning C++ by Building Games with Unreal Engine 4: a Beginner's Guide to Learning 3D Game Development with C++ and UE4, 2nd Edition
β Scribed by Volin, Sharan
- Publisher
- Packt Publishing Ltd
- Year
- 2018
- Tongue
- English
- Leaves
- 456
- Edition
- 2nd ed
- Category
- Library
No coin nor oath required. For personal study only.
β¦ Synopsis
Learn the fundamentals of C++ programming with a fun-filled, practical guide and create your own games using Unreal Engine 4.
Key Features
Book Description
Learning to program in C++ requires some serious motivation. Unreal Engine 4 (UE4) is a powerful C++ engine with a full range of features used to create top-notch, exciting games by AAA studios, making it the fun way to dive into learning C++17.
This book starts by installing a code editor so you can begin to write C++17 code. You will then get acquainted with important C++ aspects, such as variables and memory, if, else, and switch, looping, functions and macros, objects, classes, inheritance, and dynamic...
β¦ Table of Contents
Cover
Title Page
Copyright and Credits
www.PacktPub.com
Contributors
Table of Contents
Preface
Chapter 1: Getting Started with C++17
Setting up our project
Using Microsoft Visual Studio on Windows
Downloading and Installing Visual Studio
Starting a New Project in Visual Studio
Using Xcode on a Mac
Downloading and installing Xcode
Starting a new project in Xcode
Creating your first C++ program
Semicolons
Handling errors
Warnings in C++
What is building and compiling?
Example output
Exercise --
ASCII art
Summary
Chapter 2: Variables and Memory
Variables Declaring variables --
touching the siliconReading and writing to your reserved spot in memory
Numbers and math
Numbers are everything
More on variables
Math in C++
Exercises
Generalized variable syntax
Primitive types
Advanced variable topics
Automatically detecting type
Enums
const variables
Building more complex types
Object types --
struct
Exercise --
player
Solution
Pointers
What can pointers do?
Address of operator (&)
Using nullptr
Smart pointers
Input and output
The cin and cout objects
The printf() function
Exercise
Solution
Namespaces
Summary Chapter 3: If, Else, and SwitchBranching
Controlling the flow of your program
The == operator
Coding if statements
Coding else statements
Testing for inequalities using other comparison operators (>
,>
=, <
, <
=, and!=)
Using logical operators
The not (!) operator
Exercises
Solutions
The and (& &) operator
The or (||) operator
Exercise
Solution
Branching code in more than two ways
The else if statement
Exercise
Solution
The switch statement
The switch statement versus the if statement
Exercise
Solution
Bit-shifted enums
Our first example with Unreal Engine
Summary Chapter 4: LoopingThe while loop
Infinite loops
Exercises
Solutions
The do/while loop
The for loop
Exercises
Solutions
Looping with Unreal Engine
Summary
Chapter 5: Functions and Macros
Functions
An example of a library function --
sqrt()
Writing our own functions
A sample program trace
Exercise
Solution
Functions with arguments
Functions that return values
Exercises
Solutions
Initializer lists
Variables revisited
Global variables
Local variables
The scope of a variable
Static local variables
Const variables
Const and functions
Function prototypes .H and .cpp filesprototypes.h
funcs.cpp
main.cpp
extern variables
Macros
Macros with arguments
Constexpr
Summary
Chapter 6: Objects, Classes, and Inheritance
What is an object?
The struct object
Member functions
The this keyword
Are strings objects?
Invoking a member function
Exercises
Solutions
Privates and encapsulation
Some people like it public
The class keyword versus struct
Getters and setters
Getters
Setters
But what's the point of get/set operations?
Constructors and destructors
Class inheritance
Derived classes
Syntax of inheritance
π SIMILAR VOLUMES
<p><b>Create your own games using Unreal Engine 4 while learning the fundamentals of C++ programming</b></p><h4>Key Features</h4><ul><li>Gain foundational knowledge of C++ language and syntax when creating games with UE4</li><li>Build 2D and 3D games featuring interactive UIs, game physics, and arti
Youve actually been creating scripts in your mind your whole life, you just didnt realize it. Apply this logical ability to write Unity C# scripts<br>Learn how to use the two primary building blocks for writing scripts: the variable and the method. Theyre not mysterious or intimidating, just a simpl
<p><b>Learn the tools and techniques of game design using a project-based approach with Unreal Engine 4 and C++</b></p>Key Features<ul><li>Kickstart your career or dive into a new hobby by exploring game design with UE4 and C++</li><li>Learn the techniques needed to prototype and develop your own id
<p><b>Learn C++ programming with a fun, real-world application that allows you to create your own games!</b></p> <h2>About This Book</h2><ul><li>Be a top programmer by being able to visualize programming concepts; how data is saved in computer memory, and how a program flows</li><li>Keep track of pl
Unreal Engine 4 is used to create top notch, exciting games by AAA studios, and learning to program in C++ needs some serious motivation.<br>Learning C++ by Creating Games With UE4 will start with the basics of C++: installing a code editor so you can begin to write C++ code. You will then learn how