Sunday, 7 May 2017

Overall Evaluation

Unit Evaluation

The units we have completed this year all link in some way into the Unit 3 game creation umbrella brief.

Below are conclusions and outcomes for each unit and how they related to the final game project.

Unit 52: Ideas Generation for Computer Games
In this unit, I think I did very well with my character and enemy implementation and I managed to achieve a Distinction for this. I completed all of the set tasks and expanded on the lessons and examples to create some extra gameplay mechanics. It was very interesting learning about the animation blueprints, state machines and blendspaces for character control, and I enjoyed learning about basic AI. I enjoyed the problem solving process with some areas of the implementation as well, such as preventing a animation glitch with AI characters which caused them to jerk around.

Unit 70 - 3D Environments for Computer Games
In this unit, I ended up creating two landscapes. One for the boss fight area and another for the outer background of the map so the player could see outside. I explored the use of several programs in the creation of heightmaps. I think I did quite well and manage to achieve a Distinction. This unit was linked to Unit 76 to create a complete level.

Unit 72: CGI Rendering and Lighting for Computer Games Animation
In this unit I created a high detail lit and rendered scene based off the theme of my game. I feel the results are very good considering this is the first time we have really touched lighting on this course. I think the amount of research I did into the example maps Epic had created to show as examples to developers is what helped me the most to get my head around it. The creation of effects materials and use of lights was an interesting experience, and overcoming the limitations of Unreal's built-in sunshaft technology and having to create my own effect was enlightening.

Unit 74: Production Techniques for Computer Games
The animations I created in this unit I think helped me appreciate how difficult animation is in the industry, especially when manually animating a walk cycle. The intention was to use these animations in my game, though I didn't actually do it in the end as these were created near the start of the project and later on the relevance of the animations had reduced, so I decided to keep the pre-made animations for time reasons. I was quite happy with how my lip-sync turned out, though we animated this in Maya and never got to show it in-game.

Unit 76: Level Design for Computer Games
This unit was linked to Unit 70 and the landscapes. For this unit I designed a map layout, blocked out the parts and created a modular level kit to build my environment. Some of the problems I overcame were with the level layout, and I had to iterate the map several times to get a more desirable result.

Unit 79: Human-Computer Interfaces for Computer Games
I really enjoyed this unit and learned a lot of advanced Blueprint logic that will help me in the future. I'm happy with the outcome of this unit and I'm glad I was able to get some advanced features like the Mini-map working and fully functional. One of the biggest hurdles to overcome was how Unreal handles controller input for menus, which I managed to solve, though it was extremely time-consuming for something that should have been simple.

Conclusion

In conclusion, I feel the units I have completed this year have been very educational and have given me the knowledge to actually make a game from scratch. I know I do have some issues with time management and I can also get carried away with adding features, but I am happy with what I have achieved and will strive to improve myself in the future.

Saturday, 6 May 2017

Unit 79: Human-Computer Interfaces for Computer Games

For this unit, we were tasked with creating advanced UI and HUD elements.

I first created some Mind Maps to generate some ideas for the menus.



And the HUD



I then created a Menu Flow chart to plan out the main menu and sub menus.



The colours and theming of the UI was important. The medieval and rustic theme played into the use of natural tones in the UI.



Part of the project specifications was to have a background toy or interaction in the menu. I decided upon a little distraction where the player can make barrels and crates fly around using a physics impulse generator linked to a line trace.



And how it works in game:



A real loading screen with a progress bar was a must, so all of my loading code was placed into the loading screen, and I placed an add to the progress variable between each section of the load.



And the in-game view:



Another goal of this project is to have controller support in the menus. This proved more difficult than first envisioned, but I managed to solve the problem all the same.

The basics of this code are, all of the buttons are added to an array, then the event tick checks each array element for focus, then changes the button style appropriately. To avoid multiple highlight errors, mouse hover is converted to focus events.



Pause menu functionality was another area that required extra steps to function with controller inputs.

When the game is paused, only the menu is actually running, the in-game player controller pauses, which means you cannot use an input map on the character to come out of pause. I had to work around this by putting an input override into the menu code to capture the start button, which uses an event dispatcher to tell the game to un-pause.



I implemented a Main Menu with controller support using the methods above and created the menu below:



The options menu was a more difficult task. I wanted a grid of buttons which showed the options chosen by the user and stayed highlighted.



I used an array of text strings to set the options, then used a loop to run each console command in sequence when the apply button was pressed.



I also implemented some simpler menus, such as Quit, Restart and the controls screen.





On the character select screen, the two characters will highlight based on which character is hovered by the mouse or by which button is being hovered or focused by the controller.

This was achieved by first using the controller code for menus mentioned earlier so that the buttons can be selected, then having the menu instance as a variable in the dummy character code, which is then read by the two character model blueprints to set weather they have highlight or not.



The result in game:





For the character customisation, I wanted several things: To be able to rotate the character when in the customisation menu, to allow changing of weapons and armour, and for all of the customisations to replicate into the game.

To get the rotation, I used the dummy characters player controller to capture the input values of the right stick and the mouse, then this used event dispatchers to communicate this to the character model blueprint and update the rotation.





The ability to change the weapons and optional bracer all had menus associated with them, as shown below, along with a shot of the replicated weapons.



The menu code tells the character model blueprint to iterate up or down though the appropriate array, changing the shown model.



To replicate the options into the game, the player character has a construction script which reads the variables set in the customisation menu and sets the models to the correct objects on the character.



With the jumping main boss, I needed a way to track the position in 3D space. I decided to create an on-screen arrow that rotated in relation to the world space of the player character. Sort of like this example:



To make this into a 2D UI element, I had to think of a way to make it into a flat texture and remove the background to make is transparent in the UI.

I decided to make it so that I could use a material function to remove a solid colour from the background.

First I made a 'bluescreen' kind of studio for the arrow to be inside, which was a high contrast colour to the red of the arrow.





I used the render target and an alpha mask in the material to make it so that all the blue area became the transparency for the final material.



The arrow rotation used the player location and the boss location as the vector for a look-at target, then the camera Yaw was removed so that it was relative to the camera, not just the player model.



And here's how it appears in-game:



For the second playable character I had a character model I had created earlier in the course which used a gun. I thought this would be good practice to implement shooter mechanics.



I rigged the character in Mixamo and downloaded animations I thought I'd need for it.



Using the experience from implementing the original character, getting the model into engine and animating with controls was relatively simple.



And I used a multi-directional blendspace for the aiming mode.



To get the hair and tail to act with physics, I extracted them from the model in Maya and rigged them with bones.



I then used the skeletal mesh physics in Unreal to make them act realistically.



Then re-attacked them to the character using sockets.



To get the character working as playable, I had to create the gameplay mechanics for shooting.



This code aims the gun when a button is pressed, then fires a line trace to determine which enemy was hit and apply damage to it.

I added an aiming reticule and an ammo count. The player can fire 10 times, then there is a re-load animation which replenishes the bullets.



In addition to the standard firing, I added a couple more gameplay mechanics. This is a bullet-time mechanic, using the Time Dilation node.



And this is a explosive blast which pushes enemies away.



Another advanced feature I wanted was a on-screen mini map.

This involved using render targets again. I created a copy of the map under the world which allowed a camera to view it from above.



I created an object which would translate the relative position of the player character onto the map and show it as an arrow.





For the enemies, I created a Red version of the arrow object that would be spawned when an enemy appears and destroyed when it dies.

The updates for the enemy objects are transmitted from the enemies themselves and not tracked by the passive objects.



I also used this same map for the main map screen, which allowed it to be real-time.

Here is how they both appear in the game:

Friday, 5 May 2017

Unit 74: Production Techniques for Computer Games

The aim of this unit was to develop skills in animation.

We were required to produce several full body animations, some animated assets and a lip sync facial animation.

Before starting on our main animations, we were introduced to how bones, rigging and skinning works in Maya.









We used the Mixamo online service to rig our characters, as there was not enough time to fully rig manually.

To plan my body animations, I did a Mind Map, and took choices from this.



My choices were:

Walk Cycle
Idle
Salute
Attack ready loop
Basic melee attack



To create the walk cycle animation, I looked at walking animations for reference. I used the graph editor to first animate both legs at the same time, then I used it to offset the left leg from the right, making a natural walk. I added swing to the arm and some lean to the body to give a more realistic feel.



I didn't want to do just a static idle animation, so I animated the character stretching his shoulder. This involved animating the fingers into a fist and rolling the head over in a natural way.



For the salute I went with more of a militia/mercenary style chest-pound than the military head salute. This was due to the style of game and the look of the character. I animated the arm up to the chest and made his foot stamp down like he is showing respect to authority.



For the attack ready, I created a looping animation where the character is holding their axe up defensively, waiting for an opening. The body moves back and forth and there is a subtle breathing effect on the torso.



For the attack animation, I begin with the ready stance from the previous animation, then bring the axe up to attack, then bring it down quite fast, to give it some force. I would have liked a little more freedom on how it moved at the extremes, but the primitive Mixamo rig started deforming the mesh weirdly.

For another task, we were required to rig and animate game assets. For my two assets, I chose a rifle I'd created and an animation for an axe weapon.

For the gun, I rigged each part so that they moved, rotating around their pivot points.



The animations I made were cocking the lever to set the hammer back, then pulling the trigger to make the hammer fall.

For my second asset, I created a melee weapon with multiple attack modes.






The blades moved as shown above, locking into each position. I wanted to get a very mechanical, powerful feel, so the locking is very solid, with a satisfying 'set' position for each mode.