Blueprint Review

Unit 71: Object Oriented design- Task 2

Unreal Blueprint seems to be an easy alternative to programming with code. This is a very important feature of the Unreal Engine, as it makes Games Design more accessible to people who are not educated in C++ programming, and there are many people who want to learn how to make computer games- but they just don't have a grasp on the coding aspect of games development process- there are many very talented 3D artists, who would be slowed down by the code, but thanks to blueprint it's a lot easier, and doesn't require the programmer mindset. However this does not mean that Blueprint is necessarily easy, in fact it can be quite challenging, and takes time to understand what you are doing; but it is definitely not as confusing as coding.

So why bother with C++ in unreal? Why not just use the blueprint? Well the reason is for efficiency. Blueprint will effect the performance of a game, because blueprint needs to be converted into C++, as this is the language used by the Unreal Engine, this won't be too much trouble for a small game with basic features; but if used on a more complex game- such as an RPG, it can severely effect the games performance.

Sprint system
Here is the sprinting mechanic I made for my game. It's pretty simple, when the player presses the Left Shift key, the Max Walk Speed increases- this is a built in function of the Unreal Engine, all I had to do set up the character movement- I did this by binding keys in the "Axis Mappings" section of the Engine- Input menu. After doing this all I had to do was join the functions together; its pretty simple, and also a lot more tidy than lines of code.




The screenshot above shows the blueprint for AI patrol. Instead of describing everything in the screenshot I'll just tell you the result of this. A AI character moves from one point to another, but if they see the player they will chase them and if they catch up to the player, they will apply damage. Unreal Blueprint does seem to be a less confusing alternative to coding, but I can't deny that it can get a little bit messy from time to time. 






Here are some variables I set up, Variables are much easier with blueprint than code, you can select from many different types of variables i.e Boolean, Floats, etc.







Here is the blueprint which relates to the players healthbar, and the bloodsplatter effect which comes on screen when the player takes damage. These two things are both called widgets, a widget causes someone to happen in the players viewpoint, for example a healthbar can be placed in the corner of the screen. Along with the float variables such as "Regen" and "Max Health", the healthbar can increase and decrease in the amount of green colour within the bar. When the player comes into contact with the AI, they are damaged and blood will appear on the screen.
The blue square represents the screen. This is a very simple way of showing a healthbar, all I had to do was find the shape I wanted, and then give it the colour I wanted.
This is just a JPEG, it was pretty easy to bring into unreal.

Another great function in unreal are the mathematical functions, as someone who does not enjoy maths, I found this feature to be quite a relief, as it allows me to do the least amount of maths possible; all I have to do is connect the things together and it does the math for me. Although I imagine coding would be much quicker for someone is better at maths, every time you want to find one of the functions you have to right click and search for the function, whereas in coding all you would have to do is type it on the keyboard.


Gamemaker

I am not a C++ programmer, so I can not really compare Unreal's C++ to blueprint with examples- as I would not know how to create the code in the first place. But I have used code before, but in a much simpler form- GML code. GML code is the programming language GameMaker uses, Gamemaker is a very low level game engine, which is commonly used to make 2D games. Although it's a less powerful engine than Unreal or Unity, it has been responsible for some pretty good games, such as: Hotline Miami, and Undertale- both games which have sold millions of units. Gamemaker has a very simple Drag and drop system, this is a great way to make games without code- it's similar to the Unreal Blueprint in a way; and just like Blueprint it has it's limitations. As time went on, I discovered that coding might be an quicker way of creating games in Gamemaker, although I did not figure it all out myself, I used online tutorials to learn the code I needed to make my games. GML is said to be an easy code, but for someone who knew nothing about code it was still pretty hard to learn, although in my opinion it seems like a great place to start.

Here are all the Drag and Drop actions in Gamemaker Studio. Gamemaker Studio is a free version of Gamemaker, there are some more expensive versions of Gamemaker available and these have more features.




This is some code I used from my "Shapeman" game, the game consisted of some randomly generating shapes, every now and then the shapes will change into a different sprite. The code is basically showing when the shapes will change- using a countdown.





Here are some drag and drop commands, as you can see they are very simple. But also works with code- in the top window you can see the "Execute a piece of code" function, so when the player clicks the left button on the object the window is showing(obj_start), some code will be executed. This is very handy as it simply links up all these different things. 

Here's some code to show what happens when an enemy collides into the player. The way this game game works is that when player has the same sprite as the enemy they can kill the enemy- if they enemy has a different sprite, the player will die when they collide.


This next part is about another GameMaker game I made called Brainbox; this game was a top down maze game with maths questions. The screenshot above shows some of the script I used in the game, the script will run when the player reaches the end of the level- this is where the player will be asked a maths question. The script is basically showing what happens when the player select an answer, if they get it wrong, they will be sent back to the beginning of the level, and if they get it right they move to the next level. I didn't copy this from a tutorial, although I did find a tutorial on creating start menu' for games, and I applied this to a multiple choice question, this was pretty easy. The green text is a note, it doesn't actually do anything to the script, so it's similar to a comment in Unreal blueprint.
















And here is some code relating to the script.

All this code also links up to the multiple choice questions, for example the screenshot above shows how the menu's questions are navigated. And below is what I had to do to show the actual menu- I had to set up a font and position it in the right place. Maybe there was a simpler way of doing this, but all this for a little menu seems a bit complex, I'm sure in Unreal Blueprint you can just create a widget that can do this for you.


Here are some screenshots that show my Space Invaders game. This game was pretty easy to set up, it was a good mix of drag and drop functions and code. I set up alarms, which are events that act like timers, these alarms are a built in function in Gamemaker, Gamemaker has many built in functions like this which do a certain thing, it's just a matter of finding the right ones and using them in the right places.





I was quite happy with the finished game. And in my opinion GML code was pretty good, but I think I prefer Blueprint, because it has a lot more features, and is part of a more powerful engine. Gamemaker is great for people who want to want 2D games, but I am not a good artist, Gamemaker would be better for people who want to make games like Hotline Miami and Undertale. But for anyone who wants to make simple 3D games such as first/third person shooters, you should stick to Unreal Engine, the blueprint as good as GML as a starting point for games design and programming.




Comments