Monday, 21 May 2018

Week 33-34

Week 33-34

HND PROJECT

Alright, this week I had met up with Matt and we began to combine our work together. Unfortunately, we ran into a few snags. While we were attempting to load our files, Matt’s UE4 file had become corrupted and we had lost one of his “Maps” (aka, “Levels”) that we were going to use. We could not recover it despite our best attempts. Fortunately, however, Matt did record evidence of him creating it and we won’t be held responsible about the mishap itself.


While it wasn't our intent, the current "Map" that we are using is unfortunately rather small and was supposed to be part of the final level. Regardless, it still works and we'll have to make do. I then noticed a few bugs after we had put together our UE4 projects.  Specifically, the Enemy AI's range on the Castle map tends to be all over the place. For example, the Enemy AI can sometimes attack the player normally at close-range; This normal and part of game-play.


However, though, I quickly noticed that if there is some kind of obstacle in the way or if the Enemy AI can somehow not get to the player (IE: Stuck on a Ledge, Stuck in Limbo, etc), they'll still inflict damage at long-range even when they shouldn't be able too. after looking at the coding, I could not find what the problem that caused it and I assumed it has something to do with Matt's layout. Or there is something that I'm missing and I cannot see the problem itself.

Monday, 14 May 2018

Week 32

Week 32:

HND Project


Unfortunately, I ran into a problem this week that could have seriously affected my Project.  At home, I work on my assignments and make use a Dell laptop. While it can be very reliable at times, it does tend to have the habit of overheating when I am using programs like Steam or Unreal Engine 4. Eventually, it’ll simply crash and force itself to switch off to cool-down. 



This week I had made the mistake of overusing my laptop when I was updating my Unreal Engine 4 project. As a result, my laptop then overheated and then crashed. Once I managed to get it up-and-running again, I made an unfortunate discovery and found I had lost several weeks worth of Project-related work that had previously be saved on my Dell laptop due to this.


Fortunately, however, I had been creating copies of my Project beforehand on USB Sticks and USB Drives. In addition, I was also recording my progress on this blog. As such, it was only a matter of time before I eventually backtracked and had recovered what I had lost due to the damages. I didn't get much done this but week but I thought this was noteworthy of mentioning.



As a warning, I believe its safe to say and common sense that one should always create and keep copies of Projects, Assignments, Images, etc. I was lucky this time, but had I not been I would have to start again from scratch and wasted so much trying to recover what I had lost, and the time I had already used up before it had happened. 

Monday, 7 May 2018

Week 31

Week 31:

HND Project


This week, I began polishing up the Game for the UE4 Project. This consisted of checking to see if all of the codes were working.  Including the Health System, Stamina System and Damage System. Other aspects, including whether the Player AI and Enemy AI were working correctly. I also cleaned up the Blueprints in the Event Graph.


After I had cleaned everything up that seemed out of place or broken, and checked any pieces of coding that needed anymore fine-tuning I then headed to the HUD. There, I cleaned it up and re-positioned anything that seemed to be out of place. Additionally, I also changed the “Health Bar” colours so that they were now Red and White when they appeared on screen. 






Monday, 23 April 2018

Week 29-30

Week 29-30:

HND Project

So, for the past month I’ve been working on another game. I wanted to keep that game and this UE4 Project separate, but I my incorporate bits from both games into on another. For now, I shall be creating a Minimap for the UE4 Project this week and next week. To start off with, I went into the “FirstPersonCharacter” and into its “Viewport”, there I created a “SpringArm” and set its Rotation Y Axis to -90. After that, I then created a “SceneCaptureComponent2D” and named it “MinimapCapture”.


In the “Contents Browser”, in the “Materials and Textures” I then created a new “RenderTarget” and named that “MinimapRenderTarget”. I then went back to the “FirstPersonCharacter” blueprint and went to the “MinimapCapture” where I applied the “MinimapRenderTarget” to its “TextureTarget”. This means it’ll capture its data and render it now as a result.


I then right-clicked on “MinimapRenderTarget” in the “ContentsBrowser” and pressed “Create Material”, thus creating a “MinmapRenderTarget_Mat” which I then clicked and opened it up. I then changed its “Surface” to “User Interface” and then hooked up the “TextureSample” to “Final Color”. I then clicked “Apply” and “Save” before going back to the “Content Browser”.


I then went and created a new “Widget Blueprint” from the “User Interface”, that I then opened and dragged a “Image” across to the screen. I then changed its size to “250”x”250”. In the “Brush” section, I then chose the “MinimapRenderTarget_Mat” and clicked “Compiled”. To get it onto the screen in-game, I then had to click on “Open Level Blueprints” and enter its “Graph”.


I then entered the “Level created the following piece of coding. After this, I received the following results. I then decided to tidy this up due to getting lag from the pitch. To do this, I went back into the “FirstPersonCharacter” viewport and on “SpringArm”, I unclicked all of the “CameraSettings”.




I then clicked onto the “MinimapCapture” and scrolled down to “Perception” and changed it from “Perceptive” to “Orthographic”. I then changed its width from “512” to “1000”. Now when I play the game, it no longer has the lagging issue. Other changes I made, I went into the “SceneCapture” and went into the advanced “General Show Flags”, then ticked off the “Skeletal Meshes”.



After this, I then decided to create an icon to represent my character on the Map. To do this, I found a “Pointer” icon on the internet and then uploaded it onto my UE4 Project.  I then turned into a “Sprite” using the “Create Sprite” option. Then in the viewport, I added “PaperSprite” to the “SpringArm”. 






Monday, 16 April 2018

Week 28

Week 28:

HND Project:

This week I decided to expand upon the HUD a bit more. I decided that when the Player dies the HUD would disappear and then reappear when the Player respawns. To do this, I clicked on the “Behaviour” and pressed “Binding” on the “Visibility”, which then brought me to a new “Graph”. I then wrote the following code, which basically means, that when the Player dies the HUD (aka, Crosshair) will disappear.



I also decided to create a game over screen for the HUD. To do this, I dragged a “Text” onto the screen then typed in “Your Dead” and made it invisible in the “Behaviour”. After that, I then I clicked on the “Behaviour” and pressed “Binding” on the “Invisibility”, which then brought me to a new “Graph”. Afterwards, I copied the above coding and pasted it onto the “Your Dead” graph and changed it so it wasn’t “True” but “False” and that’d be “Visible” when the Player gets killed by the enemy Zombie AI.



The following results look like this on screen;



Monday, 9 April 2018

Week 27

Week 27:

HND Project:

This week I decided to expand upon the coding for the “Enemy Spawner”. I have decided that after a while the Zombie AIs would stop spawning after a certain amount and then continue to re-spawn, when that amount has begun to get depleted. To do this, I first created a new “Integer” variable that I named “EnemiesOut” and set its amount to “15”. I then wrote the following code. 



With this the “Enemy Spawner” has been now fully implemented and does not need anymore tinkering with, at the time be at least. As you can see the Zombie AI will continue to spawn until there at least 15 on them on the Map, that’s when they’ll stop spawning until there number as been depleted. That’s when they’ll start to re-spawn onto the Map once again and continue their usual course. 

Monday, 2 April 2018

Week 26

Week 26:

HND Project

I had another busy week this week, but I’ve managed to do something more with my UE4 Project. Simple-but-effective, I have changed the Skin of the Zombie AI. In the “Construction Script” on my “Enemy” character, I created a new “Linear Color” variable that I named “EnemyColor” and I created the following script. In addition, I found a basic Animation on the Internet that I imported and use as well.