1 of 34

C++ in Unreal Engine

De-mystifying

Object Oriented Programming

inside Game Development…

for students and educators

2 of 34

Who is Ms Johnson???

Born and raised in Guilford County NC, Greensboro Specifically.

Loved art and music as well as school and sports, fell in love with film and documentary in high school�Studied art and communications at UNC chapel hill, took 1 Java class and loved it . Made a few little websites and 1 super simple game��Pursued multimedia art projects based on history ecology and plants as well as narratives surrounding what we consider nature. Always connected to nature, never was into gaming as a kid. Lived and work as an artist in Miami for 5 years.

Got into teaching as a side gig with Project Art miami. Found my passion for teaching and volunteering within community through working at the library.

3 years at YOUmedia miami teaching audio production, video, graphic design, editing, photography and 3d printing. Found specific passion with teaching teens from the community as well as adults , but especially teens.��Decided to take on the challenge of teaching in public school system, specifically where I grew up. Applied as Scientific Visualization teacher, not knowing I would teach Game Art.��Self taught Unreal Engine and Maya as well as pursued all possible opportunities such as grants and programs with Epic Games. ��Coming into 3rd year At high Point Central as a teacher of Video production, digital design and animation, Game Art and 3d design.

3 of 34

Things i like to do

Working out…yoga/stretching

Dancing and music mixing

Making Art ! performance, photoshoots

Cooking

Nature and plant identification and learning about ecosystems & walking/ hiking

Read history & work with others who want to make the world a better place- because we can’t do that alone.

reading

4 of 34

Who is Ms Johnson???

Born and raised in Guilford County NC, Greensboro Specifically.

Loved art and music as well as school and sports, fell in love with film and documentary in high school�Studied art and communications at UNC chapel hill, took 1 Java class and loved it . Made a few little websites and 1 super simple game��Pursued multimedia art projects based on history ecology and plants as well as narratives surrounding what we consider nature. Always connected to nature, never was into gaming as a kid. Lived and work as an artist in Miami for 5 years.

Got into teaching as a side gig with Project Art miami. Found my passion for teaching and volunteering within community through working at the library.

3 years at YOUmedia miami teaching audio production, video, graphic design, editing, photography and 3d printing. Found specific passion with teaching teens from the community as well as adults , but especially teens.��Decided to take on the challenge of teaching in public school system, specifically where I grew up. Applied as Scientific Visualization teacher, not knowing I would teach Game Art.��Self taught Unreal Engine and Maya as well as pursued all possible opportunities such as grants and programs with Epic Games. ��Coming into 3rd year At high Point Central as a teacher of Video production, digital design and animation, Game Art and 3d design.

5 of 34

Things i like to do

Working out…yoga/stretching

Dancing and music mixing

Making Art ! performance, photoshoots

Cooking

Nature and plant identification and learning about ecosystems & walking/ hiking

Read history & work with others who want to make the world a better place- because we can’t do that alone.

reading

6 of 34

Why talk about C++ with Beginning Game Art Students?

What did you want to be when you grew up?��How did you discover what you are good at?��What function do you currently perform in society through your work?��

One of my favorite Seniors Sincere Frias meeting local elem. Students in his cap and gown prior to his graduation

7 of 34

Why talk about C++ with Beginning Game Art Students?

4,761 Unreal Engine results on indeed today ( few days ago)

289,000+ C++ Jobs in United States (12,725 new) on indeed.��If you were to expand the search to include all Object Oriented programming languages such as

C#, Python, Ruby, Java and dozens and dozens more, you would find

hundreds of thousands of higher earning jobs.

8 of 34

What is C++ ?

C++ is one of the world's most popular programming languages.

C++ can be found in today's operating systems, Graphical User Interfaces, and embedded systems.

C++ is an object-oriented programming language which gives a clear structure to programs and allows code to be reused, lowering development costs.

C++ is portable and can be used to develop applications that can be adapted to multiple platforms.

As C++ is close to C, C# and Java, it makes it easy for programmers to switch to C++ or vice versa.

9 of 34

What is C++ ?

C++ is a base computing language.

It is one of the Object Oriented Programming languages so shares much in common with

10 of 34

How does Unreal use C++ ?

To make a long story short: C++ is the language that is “Underneath the hood”

Used to build Unreal Engine….

Unreal's C++ API is commonly considered as "half-way to the simplicity of scripting languages" - in the perspective of full-time programmers. It's still C++, the entry barrier is higher than any scripting language or C#.

Unreal Engine was developed using C++ as a basis for the scripts that are accessible to the Users in blueprintging. ��You can still use C++ to create your own scripts, and this is how the engine is updated.

11 of 34

Origins of Unreal Engine

In 1998

1995- Tim Sweeney begins developing an engine for a first person shooter game he comes to call “Unreal”, developed using C++,

1999-2000s- Epic provides support for licensees and collaborates with constituents to discuss improvements to its game development system, creating the “Unreal Tech Advisory Group.”

Epic gave players the ability to modify its games with the incorporation of UnrealEd and a scripting language called UnrealScript, sparking a community of enthusiasts around a game engine built to be extensible over multiple generations of games. These are not average people, they are seasoned game programmers with a high level of knowledge

Early graphical editor in UnrealEd.

12 of 34

How does Unreal use C++ ?

IIn the early days, Unreal Script was at the core of Unreal Engine.

Unreal Script was a scripting language that was somewhat easier to use than C++ and more flexible.

Example of C++ Syntax, which is the basis for Unreal Script.

13 of 34

How does Unreal use C++ ?

To the untrained eye, Unreal Script was so close to programming languages such as C++ and Java that it could be equally off-putting. However, what was going on behind the scenes was somewhat different and meant that code written in Unreal Script tended to be a little more forgiving than similar functionality written in the more widespread and mainstream language.

So, Unreal Script provided power and functionality to the Unreal Engine but didn’t really solve the problem of ease of use for the non-programmer game developer.

Unreal 2 used Unreal Script, however Developers often used native code in addition to Unreal Script to make games in the engine. Certainly advanced programming knowledge of native code was needed to operate the Script.

Killing Floor, game developed in Unreal2

14 of 34

How does Unreal use C++ ?

Unreal 3 (2004)

  • Introduced “Kismet” (Visual scripting system.)

Kismet still required highly developed C++ knowledge to use and was not optimal for developers to use in building games. Most used C++ exclusively still.

15 of 34

Development of Blueprints

In 1998

2012- Unreal 4 introduces Blueprints

The Blueprint System released in Unreal 4 revolutionized game development by making Unreal user friendly for non-programmers to create games. ��Replacing Kismet, Blueprints is considerably more powerful and, for many, completely replaces the need to learn to program at all. While triple-A titles would still expect a considerable amount of direct C++ programming, Blueprints has enough functionality and power for a designer to create a game without any language-coding knowledge at all.

��

The simple Blueprints we know and love

16 of 34

Development of Blueprints

But how do the Blueprints work?

Epic built a multiplatform C++ library, tailored for game development. This is the engine's core. Something we often simply call "Unreal C++".

It provides low-level mechanisms to clean things up under the hood. This library works with everything that's is marked as U-thing:

UCLASS, UFUNCTION, UPROPERTY.

Every object in the world is based on the UObject class, which is automatically garbage collected.

Unreal C++ provides its own libraries supporting math, vectors, strings and many other standard things.��This makes development easier, preventing game programmers from reinventing the wheel for every single game.

Writing code is simplified, thanks to dozens of built-in class, function and property specifiers. ��For most basic Unreal users, this Unreal C++is automatically rendered into scripts and objects that connect using buttons and widgets in a visual system called “Blueprints”.��It is not important to know all that is underneath the hood, just how each thing must connect to other things to run the program you want. ��

17 of 34

18 of 34

Development of Blueprints

C++ Class construction

Syntax must be perfect

Blueprint Class construction

C++ Class Construction��UMyObject::UMyObject()

{

// Initialize Class Default Object properties here.

}

19 of 34

How do we start students in Object Oriented Programming ?

Understanding Classes and Objects

Understand how computers store data

Understanding the procedural logic that programs use.

20 of 34

C++ concepts to explore through beginning Game Art

Printing outputs

Adding comments

Classes and objects

Methods and functions

Inheritance (parent-child)

Variable types

User input

Operators

Conditions and if statements ( flow control)

Arrays

21 of 34

Lesson example: classes

22 of 34

23 of 34

24 of 34

25 of 34

26 of 34

27 of 34

Modeling class creation with

Simple worksheets

28 of 34

EXAMPLE workflow of introducing C++ logic

  1. Introduce concept generally

Ex. using presentation and activators

  • Have students emulate the construction of a class using real life examples.

Ex: create “students” and “teacher” classes include member variables�

  • Introduce the concept of a class using C++ site on w3schools in native code.

  • Use a blueprint that requires students to create a (blueprint class) and assign variables.

29 of 34

W3 schools is a great resource for teaching programming

30 of 34

31 of 34

32 of 34

This is the key blueprint class,

&includes the variable HASDOORKEY which students had to create create as a boolean in the class to unlock the door

33 of 34

This is the door blueprint class,

Which includes branch control based on the variable in the Third Person Blueprint class, whether it the variable HasDoorKey is t/f to unlock door

34 of 34

Conclusion

Its not required to introduce all of these ideas in isolation outside of their use in Unreal Engine, but I do think that holding up these concepts and examining the logic used is a functional method of deepening students ability to code outside of Unreal. it is worthwhile to really resolve misunderstandings of how a concept like conditional statements from C++ are used to make games in Unreal Engine to help students make their own blueprints and foster self sufficiency in game development.��Don’t be afraid to go deep !

Be as real as possible with students about career options and skills-

( your own as well as theirs. )

�Tech changes fast, so develop skills and problem solves, Grow people!