As of the 12th of April, I used this week to make a start on my top down Unreal prototype.
So far, I’ve worked on actors and characters using the blueprint system. As well as trying out making my own textures and materials for the game. These are all in one level so far, which will serve as the testing grounds for any future features I might be able to add (See Figure 1).
First off, I will describe how I managed to create a playable character. For this I needed to use a PlayerInput object to be able to set some keyboard inputs the player could use to control their character.
“The PlayerInput Object is responsible for converting input from the player into data that Actors (like PlayerControllers or Pawns) can understand and make use of.”
In order to create a playable character, it was important for me to set some Input Mappings for the player. This would allow me to set certain mappings within the game with keys connected to them (See Figure 2).
There are multiple mappings you can assign keys to, these being Action Mappings and Axis Mappings. As my game doesn’t have any necessary actions yet, I’ve just used Axis Mappings – note that I have also set some axis scales to minus values.
Action Mappings are a discrete button or key press bounded to an event-driven behaviour, the idea for this is that it would usually be assigned to a single action typically that required a single press of a button.
“The end effect is that pressing (and/or releasing) a key, mouse button, or keypad button directly triggers some game behavior.”
An example of how an Action Mapping would be used is that it could be for actions as simple as jumping, couching or attacking – these are typically events in games that only require a single press.
Axis Mappings are bound to more continuous game behaviours, the advantages of this is that it can allow for smooth transitions in movement as opposed to more discrete game events.
“The inputs mapped in AxisMappings are continuously polled, even if they are just reporting that their input value is currently zero.”
Some good examples for Axis Mappings would be general movement keys, like “WASD” controls. As these mappings are continuous, it would be preferable to hold these keys down for movement instead of constantly needing to input them.
Using blueprints, I connected set mappings to add movement to the player. The set world direction values will then be scaled by the axis scales I’ve connected to them (See Figure 3).
For instance a regular W input will move the character forwards by X+1.0 , but an S input will move them by X-1.0 as it has a negative scale.
I will now mention briefly as to how I managed to import some custom textures I’ve made myself, importing textures is as easy as dragging and dropping a file into a folder.
As I’ll be using pixelated textures, I need to set their texture group to “2D Pixels” within the Level of Detail tab in order for them to display properly.
Materials work similarly to how actors and characters are made, as they also require blueprinting (See Figure 5).
As I don’t want the material of this texture to be too shiny, I’ve decided to increase the Roughness Input to 1 – What this does is control how rough or smooth a material’s surface is.
“A Roughness of 0 (smooth) results in a mirror reflection and roughness of 1 (rough) results in a diffuse (or matte) surface.”
As my texture is pixelated, I wouldn’t want it to look too reflective or shiny. However, if I were using a different texture that was meant to be reflective and smooth I could increase the values if I wanted – this may depend on what I can add into the game.
Docs.unrealengine.com. 2021. Input. [online] Available at: https://docs.unrealengine.com/en-US/InteractiveExperiences/Input/index.html [Accessed 19 April 2021].
Docs.unrealengine.com. 2021. Material Inputs. [online] Available at: https://docs.unrealengine.com/en-US/RenderingAndGraphics/Materials/MaterialInputs/index.html [Accessed 19 April 2021].