SlideShare une entreprise Scribd logo
1  sur  53
Télécharger pour lire hors ligne
Unreal Engine Basics
Chapter 1: Game Framework
Nick Prühs
Let’s Make Something Unreal!
About Me
Lead Programmer
Daedalic Entertainment, 2011 – 2012
Co-Founder
Slash Games, 2013 – 2016
Technical Director
since 2016
First Things First
• At slideshare.net/npruehs you’ll always find these slides
• At github.com/npruehs you’ll find the source code of this module
• Ask your questions – any time!
• Each lecture will close with
▪ Further reading
▪ An optional assignment
• Contact me any time npruehs@outlook.com
Objectives
• Getting familiar with Unreal Engine as a technology, framework and
toolset
• Learning the basics about writing Unreal Engine C++ code
What is Unreal Engine?
• State-of-the-art 4th generation industry-leading game engine
• Created by highly skilled developers at Epic Games since 1995
• Huge community
• Completely open-source* and public roadmap
• Immense code base
* except for console platform integration (NDA)
What is Unreal Engine?
• Mature asset pipeline and editor
• Powerful animation and motion systems
• Highly performant renderer
• Engine and editor support for visual effects, AI, UI, audio, and more
• Engine-level multiplayer
• Visual scripting
• Desktop, console, mobile, web, TV, XR, streaming platforms
• Configuration, debugging, profiling, test automation
UObjects
• Base class for all objects (similar to Java, C#)
• Garbage collection
▪ Don’t worry about memory allocation and deallocation – too much
• Reflection
▪ In C++. It’s black magic.
• Serialization
▪ Reading and writing property values for data objects and levels
• Editor integration
▪ Expose properties and functions to editor windows
Actor
• Any object that can be placed in a level
▪ Almost everything in Unreal is an actor
• Translation, rotation, and scale
• Can be spawned (created) and destroyed through gameplay code
• Ticked (updated) by the engine
▪ If you want it to
• Replicates to clients or server
▪ If you want it to
Actor Components
• Can be attached to actors to provide additional functionality
• Can tick and replicate as well
• Allow for a very clean, modular gameplay setup through re-usable
components
▪ Basic units in A Year Of Rain had 40 (!) components attached, e.g.
Abilities, Orders, Health, Attack, Name, Cost, Vision, Containable,
DestructionEffects, SpawnAudio, Footprints, MinimapIcon, …
Game Mode
• Gameplay rules, e.g.
▪ Which GameState, PlayerController, PlayerState, Pawn to use
▪ Game initialization
▪ Player initialization
▪ Teams
▪ Victory & defeat conditions
• As an Actor, can tick as well
• Server only
Game State
• Global data relevant for all players, e.g.
▪ Match duration
▪ Score
• Server & client
Pawn
• Base class of all Actors that can be controlled by players or AI
• Physical representation of a player or AI within the world
▪ Location
▪ Visuals
▪ Collision
Character
• Special type of Pawn that has the ability to walk around
▪ SkeletalMeshComponent for animations
▪ CapsuleComponent for collision
▪ CharacterMovementComponent for movement
• Can walk, run, jump, fly, and swim
▪ Yes, swim.
▪ Did I mention that the engine has been used for 25 years already?
• Default implementations of networking and input
Controller
• Non-physical Actors that can possess a Pawn to control its actions
• One-to-one relationship between Controllers and Pawns
▪ PlayerController handles input by human players to control Pawns
o Create and update UI
o Authorative on (“owned by”) clients
▪ AIController implements the AI for the Pawns they control
o Setup and update behavior trees and blackboards
o Server only
Player State
• Player-specific data relevant for all players, e.g.
▪ Name
▪ Scores
• Server & client
What’s with all those prefixes?
UnrealHeaderTool requires the correct prefixes, so it's important to provide
them.
▪ Classes that inherit from UObject are prefixed by U.
▪ Classes that inherit from AActor are prefixed by A.
▪ Enums are prefixed by E (e.g. ENetRole).
▪ Template classes are prefixed by T (e.g. TArray).
▪ Classes that inherit from SWidget are prefixed by S.
▪ Classes that are abstract interfaces are prefixed by I.
▪ Most other classes are prefixed by F.
Project Layout
• Binaries. Compiled editor and game binaries.
• Config. Editor and game configuration files.
• Content. All (created and imported) game content (e.g. meshes, maps).
• Intermediate. Intermediate compiler output.
• Saved. Log files and local configuration.
• Source. Game and editor source code.
• .sln. Visual Studio solution file.
• .uproject. Unreal Engine project file.
Coding Standard
• You’ll read much more code than you write
▪ Most of the time, not even your own code
• Code conventions allow you to understand new code more quickly
▪ File layout
▪ Naming conventions
▪ Formatting & indentation
▪ Language features
• Cross-platform compatibility
https://docs.unrealengine.com/en-
US/Programming/Development/CodingStandard/index.html
C++ Codebase
By convention, put
▪ Header files in a Classes subfolder
▪ Source files in a Private subfolder
This allows for easier #include‘ing from other sources and modules.
I recommend creating C++ subclasses for the engine core game
framework first, as you‘re going to need them anyway.
Hint!
After moving or renaming files in your file system,
you can always regenerate your Visual Studio solution
from the context menu of your .uproject file.
Hint!
After moving or renaming files in your file system,
you can always regenerate your Visual Studio solution
from the context menu of your .uproject file.
You should also do so after updating from source control,
To make sure not to miss any new files.
Hint!
Because of how the UnrealHeaderTool works,
C++ namespace are (mostly) unsupported by Unreal Engine.
Hint!
Because of how the UnrealHeaderTool works,
C++ namespace are (mostly) unsupported by Unreal Engine.
By convention, you can append a shorthand of your
project name as prefix for your class names
to avoid naming collisions with existing classes.
Unreal Header File Layout
#pragma once
#include "CoreMinimal.h"
#include "GameFramework/GameModeBase.h"
#include "ASGameMode.generated.h"
UCLASS()
class AWESOMESHOOTER_API AASGameMode : public AGameModeBase
{
GENERATED_BODY()
};
#include Statement Order
1. Pre-compiled header of the module
2. Arbitrary headers – but I recommend:
1. Base class header
2. Other engine headers
3. Other module headers
3. Generated header
Unreal Engine 4 Macros
• UCLASS indicates the type should be reflected for Unreal’s type system
• AWESOMESHOOTER_API exports the type for other modules (similar to
DLL_EXPORT)
• GENERATED_BODY injects additional functions and typedefs into the
class body
Assignment #1 – Setup Development Environment
• Install Visual Studio 2017 with Game Development With C++
• Download the Epic Games Launcher from
https://www.unrealengine.com/en-US/get-now
• Install Unreal Engine 4.23.1, including
▪ Starter Content
▪ Engine Source
▪ Editor symbols for debugging
Assignment #1 – Setup Project
• Create a new C++ Basic Code project with starter content
• Create C++ subclasses for the engine core game framework
▪ Character
▪ Game Mode
▪ Game State
▪ Player Controller
▪ Player State
References
• Epic Games. Reflections Real-Time Ray Tracing Demo | Project Spotlight | Unreal
Engine. https://www.youtube.com/watch?v=J3ue35ago3Y, March 21, 2018.
• Epic Games. Unreal Engine Features. https://www.unrealengine.com/en-
US/features, February 2020.
• Epic Games. Unreal Engine Gameplay Guide. https://docs.unrealengine.com/en-
US/Gameplay/index.html, February 2020
• Epic Games. Unreal Engine Programming Guide.
https://docs.unrealengine.com/en-US/Programming/index.html, February 2020.
• Epic Games. Unreal Property System (Reflection).
https://www.unrealengine.com/en-US/blog/unreal-property-system-reflection,
February 2020.
See you next time!
https://www.slideshare.net/npruehs
https://github.com/npruehs/teaching-
unreal-engine/releases/tag/assignment01
npruehs@outlook.com
5 Minute Review Session
• What is the base class of all Unreal Engine objects?
• What type of object is put in Uneal Engine levels?
• Which part of the game framework is responsible of your game rules?
• What are GameState and PlayerState classes mainly used for?
• How does Unreal Engine abstract Pawns from how they decide to
move?
• Which parts of your header files are essential for the
UnrealHeaderTool and type system to work?

Contenu connexe

Tendances

Unreal Engine.pptx
Unreal Engine.pptxUnreal Engine.pptx
Unreal Engine.pptxSujitShejul1
 
Unity Introduction
Unity IntroductionUnity Introduction
Unity IntroductionJuwal Bose
 
Editor Utility Widgetで色々便利にしてみた。
Editor Utility Widgetで色々便利にしてみた。Editor Utility Widgetで色々便利にしてみた。
Editor Utility Widgetで色々便利にしてみた。IndieusGames
 
出張ヒストリア ブループリントを書くにあたって大切なこと
出張ヒストリア ブループリントを書くにあたって大切なこと出張ヒストリア ブループリントを書くにあたって大切なこと
出張ヒストリア ブループリントを書くにあたって大切なことhistoria_Inc
 
マジシャンズデッド ポストモーテム ~マテリアル編~ (株式会社Byking: 鈴木孝司様、成相真治様) #UE4DD
マジシャンズデッド ポストモーテム ~マテリアル編~ (株式会社Byking: 鈴木孝司様、成相真治様) #UE4DDマジシャンズデッド ポストモーテム ~マテリアル編~ (株式会社Byking: 鈴木孝司様、成相真治様) #UE4DD
マジシャンズデッド ポストモーテム ~マテリアル編~ (株式会社Byking: 鈴木孝司様、成相真治様) #UE4DDエピック・ゲームズ・ジャパン Epic Games Japan
 
UE4 Saitama 初心者向けハンズオン #6『サウンド再生』
UE4 Saitama 初心者向けハンズオン #6『サウンド再生』UE4 Saitama 初心者向けハンズオン #6『サウンド再生』
UE4 Saitama 初心者向けハンズオン #6『サウンド再生』Yuuki Ogino
 
『バランワンダーワールド』でのマルチプラットフォーム対応について UNREAL FEST EXTREME 2021 SUMMER
『バランワンダーワールド』でのマルチプラットフォーム対応について  UNREAL FEST EXTREME 2021 SUMMER『バランワンダーワールド』でのマルチプラットフォーム対応について  UNREAL FEST EXTREME 2021 SUMMER
『バランワンダーワールド』でのマルチプラットフォーム対応について UNREAL FEST EXTREME 2021 SUMMERエピック・ゲームズ・ジャパン Epic Games Japan
 
UnrealBuildTool勉強会まとめ
UnrealBuildTool勉強会まとめUnrealBuildTool勉強会まとめ
UnrealBuildTool勉強会まとめShun Sasaki
 
ゲームエンジンの文法【UE4】No.005 Gameplay Frameworkの理解
ゲームエンジンの文法【UE4】No.005 Gameplay Frameworkの理解ゲームエンジンの文法【UE4】No.005 Gameplay Frameworkの理解
ゲームエンジンの文法【UE4】No.005 Gameplay Frameworkの理解Tatsuya Iwama
 
目指せ脱UE4初心者!?知ってると開発が楽になる便利機能を紹介 - DataAsset, Subsystem, GameplayAbility編 -
目指せ脱UE4初心者!?知ってると開発が楽になる便利機能を紹介 - DataAsset, Subsystem, GameplayAbility編 -目指せ脱UE4初心者!?知ってると開発が楽になる便利機能を紹介 - DataAsset, Subsystem, GameplayAbility編 -
目指せ脱UE4初心者!?知ってると開発が楽になる便利機能を紹介 - DataAsset, Subsystem, GameplayAbility編 -historia_Inc
 
Introduction to Unity3D Game Engine
Introduction to Unity3D Game EngineIntroduction to Unity3D Game Engine
Introduction to Unity3D Game EngineMohsen Mirhoseini
 
West Coast DevCon 2014: Game Programming in UE4 - Game Framework & Sample Pro...
West Coast DevCon 2014: Game Programming in UE4 - Game Framework & Sample Pro...West Coast DevCon 2014: Game Programming in UE4 - Game Framework & Sample Pro...
West Coast DevCon 2014: Game Programming in UE4 - Game Framework & Sample Pro...Gerke Max Preussner
 
UE4のコンポジット機能をもっと深く使ってみた
UE4のコンポジット機能をもっと深く使ってみたUE4のコンポジット機能をもっと深く使ってみた
UE4のコンポジット機能をもっと深く使ってみたMasahiko Nakamura
 

Tendances (20)

Unreal Engine.pptx
Unreal Engine.pptxUnreal Engine.pptx
Unreal Engine.pptx
 
Unity Introduction
Unity IntroductionUnity Introduction
Unity Introduction
 
Editor Utility Widgetで色々便利にしてみた。
Editor Utility Widgetで色々便利にしてみた。Editor Utility Widgetで色々便利にしてみた。
Editor Utility Widgetで色々便利にしてみた。
 
出張ヒストリア ブループリントを書くにあたって大切なこと
出張ヒストリア ブループリントを書くにあたって大切なこと出張ヒストリア ブループリントを書くにあたって大切なこと
出張ヒストリア ブループリントを書くにあたって大切なこと
 
UE4モバイルでノンゲームコンテンツ
UE4モバイルでノンゲームコンテンツUE4モバイルでノンゲームコンテンツ
UE4モバイルでノンゲームコンテンツ
 
マジシャンズデッド ポストモーテム ~マテリアル編~ (株式会社Byking: 鈴木孝司様、成相真治様) #UE4DD
マジシャンズデッド ポストモーテム ~マテリアル編~ (株式会社Byking: 鈴木孝司様、成相真治様) #UE4DDマジシャンズデッド ポストモーテム ~マテリアル編~ (株式会社Byking: 鈴木孝司様、成相真治様) #UE4DD
マジシャンズデッド ポストモーテム ~マテリアル編~ (株式会社Byking: 鈴木孝司様、成相真治様) #UE4DD
 
UE4.17で入る新機能を一気に紹介・解説!
UE4.17で入る新機能を一気に紹介・解説!UE4.17で入る新機能を一気に紹介・解説!
UE4.17で入る新機能を一気に紹介・解説!
 
UE4 Saitama 初心者向けハンズオン #6『サウンド再生』
UE4 Saitama 初心者向けハンズオン #6『サウンド再生』UE4 Saitama 初心者向けハンズオン #6『サウンド再生』
UE4 Saitama 初心者向けハンズオン #6『サウンド再生』
 
『バランワンダーワールド』でのマルチプラットフォーム対応について UNREAL FEST EXTREME 2021 SUMMER
『バランワンダーワールド』でのマルチプラットフォーム対応について  UNREAL FEST EXTREME 2021 SUMMER『バランワンダーワールド』でのマルチプラットフォーム対応について  UNREAL FEST EXTREME 2021 SUMMER
『バランワンダーワールド』でのマルチプラットフォーム対応について UNREAL FEST EXTREME 2021 SUMMER
 
UnrealBuildTool勉強会まとめ
UnrealBuildTool勉強会まとめUnrealBuildTool勉強会まとめ
UnrealBuildTool勉強会まとめ
 
ゲームエンジンの文法【UE4】No.005 Gameplay Frameworkの理解
ゲームエンジンの文法【UE4】No.005 Gameplay Frameworkの理解ゲームエンジンの文法【UE4】No.005 Gameplay Frameworkの理解
ゲームエンジンの文法【UE4】No.005 Gameplay Frameworkの理解
 
[CEDEC2017] UE4プロファイリングツール総おさらい(グラフィクス編)
[CEDEC2017] UE4プロファイリングツール総おさらい(グラフィクス編)[CEDEC2017] UE4プロファイリングツール総おさらい(グラフィクス編)
[CEDEC2017] UE4プロファイリングツール総おさらい(グラフィクス編)
 
エンタープライズ分野向けUE4最新機能のご紹介
エンタープライズ分野向けUE4最新機能のご紹介エンタープライズ分野向けUE4最新機能のご紹介
エンタープライズ分野向けUE4最新機能のご紹介
 
[CEDEC2018] UE4で多数のキャラクターを生かすためのテクニック
[CEDEC2018] UE4で多数のキャラクターを生かすためのテクニック[CEDEC2018] UE4で多数のキャラクターを生かすためのテクニック
[CEDEC2018] UE4で多数のキャラクターを生かすためのテクニック
 
目指せ脱UE4初心者!?知ってると開発が楽になる便利機能を紹介 - DataAsset, Subsystem, GameplayAbility編 -
目指せ脱UE4初心者!?知ってると開発が楽になる便利機能を紹介 - DataAsset, Subsystem, GameplayAbility編 -目指せ脱UE4初心者!?知ってると開発が楽になる便利機能を紹介 - DataAsset, Subsystem, GameplayAbility編 -
目指せ脱UE4初心者!?知ってると開発が楽になる便利機能を紹介 - DataAsset, Subsystem, GameplayAbility編 -
 
猫でも分かるUE4.22から入ったSubsystem
猫でも分かるUE4.22から入ったSubsystem 猫でも分かるUE4.22から入ったSubsystem
猫でも分かるUE4.22から入ったSubsystem
 
Introduction to Unity3D Game Engine
Introduction to Unity3D Game EngineIntroduction to Unity3D Game Engine
Introduction to Unity3D Game Engine
 
West Coast DevCon 2014: Game Programming in UE4 - Game Framework & Sample Pro...
West Coast DevCon 2014: Game Programming in UE4 - Game Framework & Sample Pro...West Coast DevCon 2014: Game Programming in UE4 - Game Framework & Sample Pro...
West Coast DevCon 2014: Game Programming in UE4 - Game Framework & Sample Pro...
 
非同期ロード画面 Asynchronous Loading Screen
非同期ロード画面 Asynchronous Loading Screen非同期ロード画面 Asynchronous Loading Screen
非同期ロード画面 Asynchronous Loading Screen
 
UE4のコンポジット機能をもっと深く使ってみた
UE4のコンポジット機能をもっと深く使ってみたUE4のコンポジット機能をもっと深く使ってみた
UE4のコンポジット機能をもっと深く使ってみた
 

Similaire à Unreal Engine Basics 01 - Game Framework

East Coast DevCon 2014: Game Programming in UE4 - Game Framework & Sample Pro...
East Coast DevCon 2014: Game Programming in UE4 - Game Framework & Sample Pro...East Coast DevCon 2014: Game Programming in UE4 - Game Framework & Sample Pro...
East Coast DevCon 2014: Game Programming in UE4 - Game Framework & Sample Pro...Gerke Max Preussner
 
BYOD: Build Your First VR Experience with Unreal Engine
BYOD: Build Your First VR Experience with Unreal EngineBYOD: Build Your First VR Experience with Unreal Engine
BYOD: Build Your First VR Experience with Unreal EngineMichael Sheyahshe
 
East Coast DevCon 2014: Engine Overview - A Programmer’s Glimpse at UE4
East Coast DevCon 2014: Engine Overview - A Programmer’s Glimpse at UE4East Coast DevCon 2014: Engine Overview - A Programmer’s Glimpse at UE4
East Coast DevCon 2014: Engine Overview - A Programmer’s Glimpse at UE4Gerke Max Preussner
 
1-Introduction (Game Design and Development)
1-Introduction (Game Design and Development)1-Introduction (Game Design and Development)
1-Introduction (Game Design and Development)Hafiz Ammar Siddiqui
 
Mallory game developmentpipeline
Mallory game developmentpipelineMallory game developmentpipeline
Mallory game developmentpipelineKarynNarramore
 
West Coast DevCon 2014: Engine Overview - A Programmers Glimpse at UE4
West Coast DevCon 2014: Engine Overview - A Programmers Glimpse at UE4West Coast DevCon 2014: Engine Overview - A Programmers Glimpse at UE4
West Coast DevCon 2014: Engine Overview - A Programmers Glimpse at UE4Gerke Max Preussner
 
Software Engineer- A unity 3d Game
Software Engineer- A unity 3d GameSoftware Engineer- A unity 3d Game
Software Engineer- A unity 3d GameIsfand yar Khan
 
Supersize your production pipe enjmin 2013 v1.1 hd
Supersize your production pipe    enjmin 2013 v1.1 hdSupersize your production pipe    enjmin 2013 v1.1 hd
Supersize your production pipe enjmin 2013 v1.1 hdslantsixgames
 
Introduction to Game Engine: Concepts & Components
Introduction to Game Engine: Concepts & ComponentsIntroduction to Game Engine: Concepts & Components
Introduction to Game Engine: Concepts & ComponentsPouya Pournasir
 
Maximize Your Production Effort (English)
Maximize Your Production Effort (English)Maximize Your Production Effort (English)
Maximize Your Production Effort (English)slantsixgames
 
Deep Dive: Amazon Lumberyard & Amazon GameLift
Deep Dive: Amazon Lumberyard & Amazon GameLiftDeep Dive: Amazon Lumberyard & Amazon GameLift
Deep Dive: Amazon Lumberyard & Amazon GameLiftAmazon Web Services
 
Initial design (Game Architecture)
Initial design (Game Architecture)Initial design (Game Architecture)
Initial design (Game Architecture)Rajkumar Pawar
 
De Re PlayStation Vita
De Re PlayStation VitaDe Re PlayStation Vita
De Re PlayStation VitaSlide_N
 
Introduction to html5 game programming with impact js
Introduction to html5 game programming with impact jsIntroduction to html5 game programming with impact js
Introduction to html5 game programming with impact jsLuca Galli
 
FMX 2017: Extending Unreal Engine 4 with Plug-ins (Master Class)
FMX 2017: Extending Unreal Engine 4 with Plug-ins (Master Class)FMX 2017: Extending Unreal Engine 4 with Plug-ins (Master Class)
FMX 2017: Extending Unreal Engine 4 with Plug-ins (Master Class)Gerke Max Preussner
 
East Coast DevCon 2014: Extensibility in UE4 - Customizing Your Games and the...
East Coast DevCon 2014: Extensibility in UE4 - Customizing Your Games and the...East Coast DevCon 2014: Extensibility in UE4 - Customizing Your Games and the...
East Coast DevCon 2014: Extensibility in UE4 - Customizing Your Games and the...Gerke Max Preussner
 

Similaire à Unreal Engine Basics 01 - Game Framework (20)

East Coast DevCon 2014: Game Programming in UE4 - Game Framework & Sample Pro...
East Coast DevCon 2014: Game Programming in UE4 - Game Framework & Sample Pro...East Coast DevCon 2014: Game Programming in UE4 - Game Framework & Sample Pro...
East Coast DevCon 2014: Game Programming in UE4 - Game Framework & Sample Pro...
 
BYOD: Build Your First VR Experience with Unreal Engine
BYOD: Build Your First VR Experience with Unreal EngineBYOD: Build Your First VR Experience with Unreal Engine
BYOD: Build Your First VR Experience with Unreal Engine
 
East Coast DevCon 2014: Engine Overview - A Programmer’s Glimpse at UE4
East Coast DevCon 2014: Engine Overview - A Programmer’s Glimpse at UE4East Coast DevCon 2014: Engine Overview - A Programmer’s Glimpse at UE4
East Coast DevCon 2014: Engine Overview - A Programmer’s Glimpse at UE4
 
Unity 3D VS your team
Unity 3D VS your teamUnity 3D VS your team
Unity 3D VS your team
 
1-Introduction (Game Design and Development)
1-Introduction (Game Design and Development)1-Introduction (Game Design and Development)
1-Introduction (Game Design and Development)
 
Mallory game developmentpipeline
Mallory game developmentpipelineMallory game developmentpipeline
Mallory game developmentpipeline
 
Ch03lect2 ud
Ch03lect2 udCh03lect2 ud
Ch03lect2 ud
 
West Coast DevCon 2014: Engine Overview - A Programmers Glimpse at UE4
West Coast DevCon 2014: Engine Overview - A Programmers Glimpse at UE4West Coast DevCon 2014: Engine Overview - A Programmers Glimpse at UE4
West Coast DevCon 2014: Engine Overview - A Programmers Glimpse at UE4
 
Cross-Platform Juggling
Cross-Platform JugglingCross-Platform Juggling
Cross-Platform Juggling
 
Software Engineer- A unity 3d Game
Software Engineer- A unity 3d GameSoftware Engineer- A unity 3d Game
Software Engineer- A unity 3d Game
 
Supersize your production pipe enjmin 2013 v1.1 hd
Supersize your production pipe    enjmin 2013 v1.1 hdSupersize your production pipe    enjmin 2013 v1.1 hd
Supersize your production pipe enjmin 2013 v1.1 hd
 
Introduction to Game Engine: Concepts & Components
Introduction to Game Engine: Concepts & ComponentsIntroduction to Game Engine: Concepts & Components
Introduction to Game Engine: Concepts & Components
 
Maximize Your Production Effort (English)
Maximize Your Production Effort (English)Maximize Your Production Effort (English)
Maximize Your Production Effort (English)
 
Deep Dive: Amazon Lumberyard & Amazon GameLift
Deep Dive: Amazon Lumberyard & Amazon GameLiftDeep Dive: Amazon Lumberyard & Amazon GameLift
Deep Dive: Amazon Lumberyard & Amazon GameLift
 
Initial design (Game Architecture)
Initial design (Game Architecture)Initial design (Game Architecture)
Initial design (Game Architecture)
 
De Re PlayStation Vita
De Re PlayStation VitaDe Re PlayStation Vita
De Re PlayStation Vita
 
Introduction to html5 game programming with impact js
Introduction to html5 game programming with impact jsIntroduction to html5 game programming with impact js
Introduction to html5 game programming with impact js
 
Pong
PongPong
Pong
 
FMX 2017: Extending Unreal Engine 4 with Plug-ins (Master Class)
FMX 2017: Extending Unreal Engine 4 with Plug-ins (Master Class)FMX 2017: Extending Unreal Engine 4 with Plug-ins (Master Class)
FMX 2017: Extending Unreal Engine 4 with Plug-ins (Master Class)
 
East Coast DevCon 2014: Extensibility in UE4 - Customizing Your Games and the...
East Coast DevCon 2014: Extensibility in UE4 - Customizing Your Games and the...East Coast DevCon 2014: Extensibility in UE4 - Customizing Your Games and the...
East Coast DevCon 2014: Extensibility in UE4 - Customizing Your Games and the...
 

Plus de Nick Pruehs

Unreal Engine Basics 06 - Animation, Audio, Visual Effects
Unreal Engine Basics 06 - Animation, Audio, Visual EffectsUnreal Engine Basics 06 - Animation, Audio, Visual Effects
Unreal Engine Basics 06 - Animation, Audio, Visual EffectsNick Pruehs
 
Unreal Engine Basics 04 - Behavior Trees
Unreal Engine Basics 04 - Behavior TreesUnreal Engine Basics 04 - Behavior Trees
Unreal Engine Basics 04 - Behavior TreesNick Pruehs
 
Game Programming - Cloud Development
Game Programming - Cloud DevelopmentGame Programming - Cloud Development
Game Programming - Cloud DevelopmentNick Pruehs
 
Game Programming - Git
Game Programming - GitGame Programming - Git
Game Programming - GitNick Pruehs
 
Eight Rules for Making Your First Great Game
Eight Rules for Making Your First Great GameEight Rules for Making Your First Great Game
Eight Rules for Making Your First Great GameNick Pruehs
 
Designing an actor model game architecture with Pony
Designing an actor model game architecture with PonyDesigning an actor model game architecture with Pony
Designing an actor model game architecture with PonyNick Pruehs
 
Game Programming 13 - Debugging & Performance Optimization
Game Programming 13 - Debugging & Performance OptimizationGame Programming 13 - Debugging & Performance Optimization
Game Programming 13 - Debugging & Performance OptimizationNick Pruehs
 
Scrum - but... Agile Game Development in Small Teams
Scrum - but... Agile Game Development in Small TeamsScrum - but... Agile Game Development in Small Teams
Scrum - but... Agile Game Development in Small TeamsNick Pruehs
 
Component-Based Entity Systems (Demo)
Component-Based Entity Systems (Demo)Component-Based Entity Systems (Demo)
Component-Based Entity Systems (Demo)Nick Pruehs
 
What Would Blizzard Do
What Would Blizzard DoWhat Would Blizzard Do
What Would Blizzard DoNick Pruehs
 
School For Games 2015 - Unity Engine Basics
School For Games 2015 - Unity Engine BasicsSchool For Games 2015 - Unity Engine Basics
School For Games 2015 - Unity Engine BasicsNick Pruehs
 
Tool Development A - Git
Tool Development A - GitTool Development A - Git
Tool Development A - GitNick Pruehs
 
Game Programming 12 - Shaders
Game Programming 12 - ShadersGame Programming 12 - Shaders
Game Programming 12 - ShadersNick Pruehs
 
Game Programming 11 - Game Physics
Game Programming 11 - Game PhysicsGame Programming 11 - Game Physics
Game Programming 11 - Game PhysicsNick Pruehs
 
Game Programming 10 - Localization
Game Programming 10 - LocalizationGame Programming 10 - Localization
Game Programming 10 - LocalizationNick Pruehs
 
Game Programming 09 - AI
Game Programming 09 - AIGame Programming 09 - AI
Game Programming 09 - AINick Pruehs
 
Game Development Challenges
Game Development ChallengesGame Development Challenges
Game Development ChallengesNick Pruehs
 
Game Programming 08 - Tool Development
Game Programming 08 - Tool DevelopmentGame Programming 08 - Tool Development
Game Programming 08 - Tool DevelopmentNick Pruehs
 
Game Programming 07 - Procedural Content Generation
Game Programming 07 - Procedural Content GenerationGame Programming 07 - Procedural Content Generation
Game Programming 07 - Procedural Content GenerationNick Pruehs
 
Game Programming 06 - Automated Testing
Game Programming 06 - Automated TestingGame Programming 06 - Automated Testing
Game Programming 06 - Automated TestingNick Pruehs
 

Plus de Nick Pruehs (20)

Unreal Engine Basics 06 - Animation, Audio, Visual Effects
Unreal Engine Basics 06 - Animation, Audio, Visual EffectsUnreal Engine Basics 06 - Animation, Audio, Visual Effects
Unreal Engine Basics 06 - Animation, Audio, Visual Effects
 
Unreal Engine Basics 04 - Behavior Trees
Unreal Engine Basics 04 - Behavior TreesUnreal Engine Basics 04 - Behavior Trees
Unreal Engine Basics 04 - Behavior Trees
 
Game Programming - Cloud Development
Game Programming - Cloud DevelopmentGame Programming - Cloud Development
Game Programming - Cloud Development
 
Game Programming - Git
Game Programming - GitGame Programming - Git
Game Programming - Git
 
Eight Rules for Making Your First Great Game
Eight Rules for Making Your First Great GameEight Rules for Making Your First Great Game
Eight Rules for Making Your First Great Game
 
Designing an actor model game architecture with Pony
Designing an actor model game architecture with PonyDesigning an actor model game architecture with Pony
Designing an actor model game architecture with Pony
 
Game Programming 13 - Debugging & Performance Optimization
Game Programming 13 - Debugging & Performance OptimizationGame Programming 13 - Debugging & Performance Optimization
Game Programming 13 - Debugging & Performance Optimization
 
Scrum - but... Agile Game Development in Small Teams
Scrum - but... Agile Game Development in Small TeamsScrum - but... Agile Game Development in Small Teams
Scrum - but... Agile Game Development in Small Teams
 
Component-Based Entity Systems (Demo)
Component-Based Entity Systems (Demo)Component-Based Entity Systems (Demo)
Component-Based Entity Systems (Demo)
 
What Would Blizzard Do
What Would Blizzard DoWhat Would Blizzard Do
What Would Blizzard Do
 
School For Games 2015 - Unity Engine Basics
School For Games 2015 - Unity Engine BasicsSchool For Games 2015 - Unity Engine Basics
School For Games 2015 - Unity Engine Basics
 
Tool Development A - Git
Tool Development A - GitTool Development A - Git
Tool Development A - Git
 
Game Programming 12 - Shaders
Game Programming 12 - ShadersGame Programming 12 - Shaders
Game Programming 12 - Shaders
 
Game Programming 11 - Game Physics
Game Programming 11 - Game PhysicsGame Programming 11 - Game Physics
Game Programming 11 - Game Physics
 
Game Programming 10 - Localization
Game Programming 10 - LocalizationGame Programming 10 - Localization
Game Programming 10 - Localization
 
Game Programming 09 - AI
Game Programming 09 - AIGame Programming 09 - AI
Game Programming 09 - AI
 
Game Development Challenges
Game Development ChallengesGame Development Challenges
Game Development Challenges
 
Game Programming 08 - Tool Development
Game Programming 08 - Tool DevelopmentGame Programming 08 - Tool Development
Game Programming 08 - Tool Development
 
Game Programming 07 - Procedural Content Generation
Game Programming 07 - Procedural Content GenerationGame Programming 07 - Procedural Content Generation
Game Programming 07 - Procedural Content Generation
 
Game Programming 06 - Automated Testing
Game Programming 06 - Automated TestingGame Programming 06 - Automated Testing
Game Programming 06 - Automated Testing
 

Dernier

"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...Zilliz
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusZilliz
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024The Digital Insurer
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistandanishmna97
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesrafiqahmad00786416
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024The Digital Insurer
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Angeliki Cooney
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Victor Rentea
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...apidays
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...apidays
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfOrbitshub
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 

Dernier (20)

"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 

Unreal Engine Basics 01 - Game Framework

  • 1. Unreal Engine Basics Chapter 1: Game Framework Nick Prühs
  • 3. About Me Lead Programmer Daedalic Entertainment, 2011 – 2012 Co-Founder Slash Games, 2013 – 2016 Technical Director since 2016
  • 4.
  • 5. First Things First • At slideshare.net/npruehs you’ll always find these slides • At github.com/npruehs you’ll find the source code of this module • Ask your questions – any time! • Each lecture will close with ▪ Further reading ▪ An optional assignment • Contact me any time npruehs@outlook.com
  • 6. Objectives • Getting familiar with Unreal Engine as a technology, framework and toolset • Learning the basics about writing Unreal Engine C++ code
  • 7. What is Unreal Engine? • State-of-the-art 4th generation industry-leading game engine • Created by highly skilled developers at Epic Games since 1995 • Huge community • Completely open-source* and public roadmap • Immense code base * except for console platform integration (NDA)
  • 8. What is Unreal Engine? • Mature asset pipeline and editor • Powerful animation and motion systems • Highly performant renderer • Engine and editor support for visual effects, AI, UI, audio, and more • Engine-level multiplayer • Visual scripting • Desktop, console, mobile, web, TV, XR, streaming platforms • Configuration, debugging, profiling, test automation
  • 9.
  • 10. UObjects • Base class for all objects (similar to Java, C#) • Garbage collection ▪ Don’t worry about memory allocation and deallocation – too much • Reflection ▪ In C++. It’s black magic. • Serialization ▪ Reading and writing property values for data objects and levels • Editor integration ▪ Expose properties and functions to editor windows
  • 11.
  • 12.
  • 13. Actor • Any object that can be placed in a level ▪ Almost everything in Unreal is an actor • Translation, rotation, and scale • Can be spawned (created) and destroyed through gameplay code • Ticked (updated) by the engine ▪ If you want it to • Replicates to clients or server ▪ If you want it to
  • 14.
  • 15.
  • 16. Actor Components • Can be attached to actors to provide additional functionality • Can tick and replicate as well • Allow for a very clean, modular gameplay setup through re-usable components ▪ Basic units in A Year Of Rain had 40 (!) components attached, e.g. Abilities, Orders, Health, Attack, Name, Cost, Vision, Containable, DestructionEffects, SpawnAudio, Footprints, MinimapIcon, …
  • 17.
  • 18.
  • 19.
  • 20. Game Mode • Gameplay rules, e.g. ▪ Which GameState, PlayerController, PlayerState, Pawn to use ▪ Game initialization ▪ Player initialization ▪ Teams ▪ Victory & defeat conditions • As an Actor, can tick as well • Server only
  • 21.
  • 22.
  • 23. Game State • Global data relevant for all players, e.g. ▪ Match duration ▪ Score • Server & client
  • 24.
  • 25.
  • 26. Pawn • Base class of all Actors that can be controlled by players or AI • Physical representation of a player or AI within the world ▪ Location ▪ Visuals ▪ Collision
  • 27.
  • 28.
  • 29. Character • Special type of Pawn that has the ability to walk around ▪ SkeletalMeshComponent for animations ▪ CapsuleComponent for collision ▪ CharacterMovementComponent for movement • Can walk, run, jump, fly, and swim ▪ Yes, swim. ▪ Did I mention that the engine has been used for 25 years already? • Default implementations of networking and input
  • 30.
  • 31.
  • 32.
  • 33.
  • 34. Controller • Non-physical Actors that can possess a Pawn to control its actions • One-to-one relationship between Controllers and Pawns ▪ PlayerController handles input by human players to control Pawns o Create and update UI o Authorative on (“owned by”) clients ▪ AIController implements the AI for the Pawns they control o Setup and update behavior trees and blackboards o Server only
  • 35.
  • 36.
  • 37. Player State • Player-specific data relevant for all players, e.g. ▪ Name ▪ Scores • Server & client
  • 38. What’s with all those prefixes? UnrealHeaderTool requires the correct prefixes, so it's important to provide them. ▪ Classes that inherit from UObject are prefixed by U. ▪ Classes that inherit from AActor are prefixed by A. ▪ Enums are prefixed by E (e.g. ENetRole). ▪ Template classes are prefixed by T (e.g. TArray). ▪ Classes that inherit from SWidget are prefixed by S. ▪ Classes that are abstract interfaces are prefixed by I. ▪ Most other classes are prefixed by F.
  • 39. Project Layout • Binaries. Compiled editor and game binaries. • Config. Editor and game configuration files. • Content. All (created and imported) game content (e.g. meshes, maps). • Intermediate. Intermediate compiler output. • Saved. Log files and local configuration. • Source. Game and editor source code. • .sln. Visual Studio solution file. • .uproject. Unreal Engine project file.
  • 40. Coding Standard • You’ll read much more code than you write ▪ Most of the time, not even your own code • Code conventions allow you to understand new code more quickly ▪ File layout ▪ Naming conventions ▪ Formatting & indentation ▪ Language features • Cross-platform compatibility https://docs.unrealengine.com/en- US/Programming/Development/CodingStandard/index.html
  • 41. C++ Codebase By convention, put ▪ Header files in a Classes subfolder ▪ Source files in a Private subfolder This allows for easier #include‘ing from other sources and modules. I recommend creating C++ subclasses for the engine core game framework first, as you‘re going to need them anyway.
  • 42. Hint! After moving or renaming files in your file system, you can always regenerate your Visual Studio solution from the context menu of your .uproject file.
  • 43. Hint! After moving or renaming files in your file system, you can always regenerate your Visual Studio solution from the context menu of your .uproject file. You should also do so after updating from source control, To make sure not to miss any new files.
  • 44. Hint! Because of how the UnrealHeaderTool works, C++ namespace are (mostly) unsupported by Unreal Engine.
  • 45. Hint! Because of how the UnrealHeaderTool works, C++ namespace are (mostly) unsupported by Unreal Engine. By convention, you can append a shorthand of your project name as prefix for your class names to avoid naming collisions with existing classes.
  • 46. Unreal Header File Layout #pragma once #include "CoreMinimal.h" #include "GameFramework/GameModeBase.h" #include "ASGameMode.generated.h" UCLASS() class AWESOMESHOOTER_API AASGameMode : public AGameModeBase { GENERATED_BODY() };
  • 47. #include Statement Order 1. Pre-compiled header of the module 2. Arbitrary headers – but I recommend: 1. Base class header 2. Other engine headers 3. Other module headers 3. Generated header
  • 48. Unreal Engine 4 Macros • UCLASS indicates the type should be reflected for Unreal’s type system • AWESOMESHOOTER_API exports the type for other modules (similar to DLL_EXPORT) • GENERATED_BODY injects additional functions and typedefs into the class body
  • 49. Assignment #1 – Setup Development Environment • Install Visual Studio 2017 with Game Development With C++ • Download the Epic Games Launcher from https://www.unrealengine.com/en-US/get-now • Install Unreal Engine 4.23.1, including ▪ Starter Content ▪ Engine Source ▪ Editor symbols for debugging
  • 50. Assignment #1 – Setup Project • Create a new C++ Basic Code project with starter content • Create C++ subclasses for the engine core game framework ▪ Character ▪ Game Mode ▪ Game State ▪ Player Controller ▪ Player State
  • 51. References • Epic Games. Reflections Real-Time Ray Tracing Demo | Project Spotlight | Unreal Engine. https://www.youtube.com/watch?v=J3ue35ago3Y, March 21, 2018. • Epic Games. Unreal Engine Features. https://www.unrealengine.com/en- US/features, February 2020. • Epic Games. Unreal Engine Gameplay Guide. https://docs.unrealengine.com/en- US/Gameplay/index.html, February 2020 • Epic Games. Unreal Engine Programming Guide. https://docs.unrealengine.com/en-US/Programming/index.html, February 2020. • Epic Games. Unreal Property System (Reflection). https://www.unrealengine.com/en-US/blog/unreal-property-system-reflection, February 2020.
  • 52. See you next time! https://www.slideshare.net/npruehs https://github.com/npruehs/teaching- unreal-engine/releases/tag/assignment01 npruehs@outlook.com
  • 53. 5 Minute Review Session • What is the base class of all Unreal Engine objects? • What type of object is put in Uneal Engine levels? • Which part of the game framework is responsible of your game rules? • What are GameState and PlayerState classes mainly used for? • How does Unreal Engine abstract Pawns from how they decide to move? • Which parts of your header files are essential for the UnrealHeaderTool and type system to work?