Become Familiar with Blueprint Visual Scripting in Unreal Engine 4
Visual ScriptingSo, before we really dive into Blueprint, it's best that you understand what visual scripting is. Yes, it still has scripting in the name, but it's actually quite different from a typical scripting language. Moreover, to someone just starting out, visual scripting can be something very simple to grasp. Typically, visual scripting is a type of programming language that lets you create gameplay elements by tweaking program elements graphically rather than creating them textually. It's a concept that has actually been implemented in many different game engines, including, to a certain extent the popular mobile game development software GameSalad. However, they categorize themselves as more of a drag-and-drop game creator. There has also been many different plug-ins created for Unity like PlayMaker, as well as iCanScript, that lets you create games through visual scripting. One of the biggest benefits of visual scripting is that these gameplay elements can be created extremely quickly, much faster than typical programming languages like C++ or C#. That being said, there are certainly drawbacks to visual scripting, as it can never be as powerful as traditional programming languages. Nevertheless, depending on your project, it may be all you need.
Node-BasedBlueprint is a complete gameplay visual scripting system with a node-based interface. If you've used most 3D applications or compositing programs, you'll be somewhat familiar with a node-based interface. For example, you can think of it like Maya's Hypergraph or Hypershade, or NUKE's node-based interface. This type of system gives you a lot of flexibility, letting you use many of the concepts typically only available to programmers, and packaging it into a much easier to understand tool. A node-based system is for the most part very easy to grasp, however, at first glance, it can be a bit overwhelming, as it looks like a lot of spaghetti strands connected to different boxes. Once you understand the concept of a node-based interface, you'll be able to quickly see how powerful it really is. Through Blueprint you can implement or modify nearly any gameplay element, like game rules, setup items like weapons, and pickups, as well procedurally-generated elements and items. Each box that you see in Blueprint is a Node, Event, Function or a Variable, which is wired together to the corresponding node. You can do everything from create atmospheric effects, have a level's lights turn on when the player enters the room to setting up cameras. Depending on how complex you get with Blueprints, you can create simple prototypes, or complete games. The devs at Epic Games created a flappy bird clone in one day using just Blueprint to highlight what the visual scripting language has the capabilities of doing. It's important to understand that with Blueprint, and regular programming, they are very much intertwined each other. The terminology between Blueprint, and visual scripting in general is similar to a scripting language. At its very core, Blueprint is an event and function-driven system. So an event will happen in your game, and when those events occur, functions will be ran on the actors in the game. One of the most beneficial uses of Blueprints is the fact that you can quickly and easily prototype various elements within your game. Since you can setup a basic game very quickly, you can test out levels, and different game elements much faster than you could if you had to program it using something like C++.
Types of BlueprintsUnreal Engine 4 actually has several different types of Blueprints, and each type has their own specific purpose, however, there are a few common Blueprint types that you'll likely be using most. The first is the Level Blueprint, and if you've used UDK at all, the Level Blueprint accomplishes most of what Kismet did in UDK, and has similar capabilities. Any level that you create in Unreal Engine 4 has its own Level Blueprint tied to it. The Level Blueprint manages everything from cinematics, checkpoints, and any other level related tasks. It can also control different Actors within the level. The Class Blueprints are what is used to create interactive assets within your level. So a light switch that the character can turn on, items that they can collect, a door that will open when the player gets close enough. You can also setup things like a sound effect that will be played when a character interacts with a certain element in the game.
Setting Up a Very Basic BlueprintOur games tutor Josh walks you through setting up a very basic Blueprint event inside UE4 in the video below.
Blueprint is an extremely powerful visual scripting system inside of Unreal Engine 4 that allows individuals who may not be as comfortable with coding, to be able to create games with an easier to understand method. Even if you are experienced in a scripting language, Blueprint allows you to quickly create game prototypes without spending a lot of time coding. If you want to learn more advanced Blueprint uses, check out Creating Gameplay Systems using Blueprint Features in Unreal Engine.