GDCE 2015: Blueprint Components to C++
-
Upload
gerke-max-preussner -
Category
Software
-
view
101 -
download
0
Transcript of GDCE 2015: Blueprint Components to C++
UE4 COMPONENT DESIGN:FROM BLUEPRINT PROTOTYPE TO C++
Gerke Max [email protected]
Overview
● Key Terms and Concepts○ UE4’s Framework (High Level)
■ Actors & Components○ What is Blueprint?
● Prototyping a Custom Component using Blueprint○ Where to begin○ Building our first component (Hover Component)
● Converting to C++○ Deconstructing artist’s intent○ Adding code to project○ Replacing Blueprint asset with native version
UE4 Framework at a Glance
● Object○ Engine’s highest-level base class
■ In C++, UObject is the base of all classes○ Lots of “under-the-hood” functionality
■ Garbage collection■ Metadata (UProperty)■ Support for exposing variables to the Editor■ Serialization■ Loading and Saving
○ Just about everything in Unreal inherits from (or gets some functionality from) Object
UE4 Framework at a Glance
● Actor○ Inherits from Object
■ C++ class is AActor○ Used for anything that is placed in your game’s world○ Supports 3D transformations
■ Position■ Rotation■ Scale
○ There are many Actor types included with the Engine■ If it is actually in your game, it’s probably some kind of actor■ Characters, meshes, lights, particle systems… just about everything.
UE4 Framework at a Glance
● Component○ Inherits from Object
■ C++ class is UActorComponent
○ The “building blocks” of Actors
○ Self-contained piece of modular functionality
○ Can be added to or removed from any Actor
And best of all…
YOU CAN MAKE THEM IN BLUEPRINT!
What is Blueprint?
● Powerful visual scripting language
● Tailored to artists, visual people
● Solves communication problems between artists and programmers
● Allows you to create compiled script using nodes and wires instead of code
● Includes a variety of real-time debugging features
Blueprint vs. C++
● Blueprint is great for fast iteration!
● Blueprint has lower performance than native C++
○ Runs on its own VM layer
○ Approximately 8-10x slower than native code
○ For most simple event-based game tasks, you probably won’t notice
○ Many AAA games are using Blueprint in shipping titles (incl. Epic!)
○ Anything running on every frame (tick) should probably be native (physics calculations)
● Still, Blueprint is excellent for prototyping!
○ Often faster for a designer to create what they want in Blueprint, then let a programmer
convert it to code
○ This is how we often use Blueprint at Epic
And now...
a demonstration!Yay!
Conclusion
● Blueprint makes it easy for visual developers to implement ideas!
● The nature of the graph makes it easy for programmers to reproduce (and optimize!)
● Code can be added to any project right inside the Editor
● Faster collaboration, clearer communication
Questions?