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.




Tuesday, 27 March 2018

Week 25

Week 25

HND Project

This week I began to look at Skin/Animation Packs on the Unreal Engine 4 Marketplace. There’s an all manner of Skin/Animation Packs to choose, from ranging from ones that are free and ones that you’ll have to buy. Paragon has quite the selection of Skin/Animation Packs, but nothing I wanted, nor I felt would fit in our Survival Horror-based UE4 Game.



Additionally, Mixamo also offers a Skin/Animation Pack that is free and offers more than Paragon which only have single character packs. Mixamo ranges from Modern (Civilian, SWAT, etc) to Horror (Insane Patient, Doctor, etc) and even Fantasy-based (Goblin, Vampire, etc). Unfortunately, UE4 is no longer supported by Mixamo. The Skin/Animation pack on the UE4 Marketplace is also out-of-date.


 This means you can no longer use the Mixamo Skin/Animation pack on the current version of the Unreal Engine, which is version 4.19.0. Regardless, however, there are ways to get around this. For example, if you have one of the older versions of Unreal Engine that supports Mixamo then you’ll able to use it. Additionally, if you wanted to make use of Mixamo on the newer versions of Unreal Engine, then all you have to do is go into one of the older versions of Unreal Engine and then copy the Mixamo file.


Afterwards, all what you must do is add the Mixamo folder to the Contents Folder on you Project that makes use of Unreal Engine. Then go into your character’s viewport and then change the “Anim To Play”, under the “Animation” folder by selecting what animation the character will use. Then under the “Mesh” file pick the “Mesh file” that accompanies to the “Animation” and you now have a character. 

Monday, 12 March 2018

Week 24

Week 24:

HND Project


This week I decided to look back at the list I had created to see what other assets I should add to the UE4 Project, now that I more-or-less have a basic Zombie spawner operational. It was at this point I also realized I’d likely not have the prime game I had in mind ready for when I finally hand it in. Regardless, I decided to add what I could for now and re-organize my plans with Matt. This is what I’ve got don so far;

Enemy AI:
• Create an Enemy AI  ✓
• Behaviour (Basic) ✓
• Behaviour (Advanced) ✓
• Add Health System ✓
• Add Damage System ✓
• Add Skin

Player: 
• Add Health ✓
• Add Regenerate Health – Unable to Do at this point.
• Add Stamina ✓
• Add Regenerate Stamina ✓
• Sprint System ✓
• Add Damage System ✓
• Add Skin

Map System:
• Mini-Map (Basic)
• Mini-Map (Advanced)

Other: 
• Spawn Enemy
• Jump Scares
• Pick Ups

Levels:
• Create a Few Levels
• Move Between Levels

Monday, 5 March 2018

Week 23

Week 23:

HND Project

Once again, I was having a busy week distracted by a few other assignments that needed to be done. However, though, I decided to fix a few problems involving my “Stamina System”. The problem involved the “Stamina” not regenerating after it reached the bottom of the “Stamina Bar”. As such, I reconfigured the coding that involved duplicating and linking pre-existing nodes to make it work.



Monday, 19 February 2018

Week 21 + 22

Week 20:

HND Project

Been another busy couple of weeks with other Assignments but tor this week and next week, I decided I’ll create a “Sprint” system for my UE4 Project. To do this, I began by opening the “Project Settings” and then I went into the “Input” section, I created a new “Action Mappings” that I named “Sprint” and assigned the “Right Shift” on the keyboard to it. 


I then went into the “FirstPersonCharacter” blueprints and into the “Event Graph”, when I wrote in the following code (See Below). I did this by adding a “InputAction Sprint” box, then dragged the “Movement Component” onto the graph and connected it to a pair of “Set Max Walk Speed” boxes. I then changed the value of the first to “1000” and the second to “500”, and then linked them up to “InputAction Sprint”.


This piece of coding alone allows the Player to suddenly “Sprint” when the “Right Shift” key is pressed down and walk usually when it isn’t being pressed. This piece of coding, however, can be expanded upon and I did so by creating 3 “Float” variables that I named “Current Stamina”, “MaxStamina” and “StaminaRate”.



I then wrote the out the following code in the “Event Graph” in the “FirstPersonCharacter”. Then created a “Stamina Bar” in a separate HUD. To do that I created a new “Widget Blueprint”, opened it and dragged a “Progress Panel” onto the screen and the “Bind” it. I then wrote the following codes in its “Event Graph” and its “Percentage” graph. In effect, this code should increase the Player’s speed while decreasing “Stamina Bar” at the same time.







Monday, 12 February 2018

Week 20

Week 20:

HND Project

Alrighty, I’ve now got the essentials down for an okay game. This week I’m going to be focusing on creating a “Spawn” system to implement into our UE4 Project. To begin with, I had to create a new “Actor” blueprint class and then named it “EnemySpawner”. Once I had done that, I then clicked on it and in the “Viewport” I created a “BoxCollision” I simply named “SpawnVolume”.



Then, I used to the “Spawn Volume” variable to create the following code as seen below. This part of the coding allows the Zombie AI to be spawn randomly and anywhere on the Map. After this, I went into the “GameMode”. There, I created a “EventBeginPlay” and began to create the following code. Basically, this code allows the Zombie AI to be spawn as soon as the Game begins. 




After this, I brought the “EnemySpawner” box onto the Map, before I re-adjusted its length and width to match that of the Map. After that, I pressed play only for… Nothing to happen. This reason for this is because I forgot to set one of the values for the “EnemyPerSecond” variable. Because it was set to “0” that meant no Zombie AI would appear on the screen. I corrected this to the right value I needed (1).

I then tested it again and…

Ta-Da…!!





Monday, 5 February 2018

Week 19

Week 19:

HND Project

After finishing the “Health System” last week, I decided to work on and expand the “Score System” by adding it to the HUD officially. To do this, I went into the HUD and dragged a “Text” box onto the screen. There, I type in “Score:” and then left it as that. I then dragged another “Text” box onto the screen and left it empty. This is what’ll display the score onto the screen.



I then wrote the following piece of coding to accompany it (See above). In effect, this’ll now display the score on the HUD and let the Player know how many points they have accumulated from killing Zombie AI. With that, I could then remove the “Print String” on the “Get Score” code on the “FirstPersonCharacter” graph. 



So… As of this moment, I have more-or-less created the barebones of a game. Obviously, I shall add to more to it because I still have several weeks left and Matt will be creating the levels. But what I’ve done is basically what you must do if you want to create a game at its most basic core. In fact, you could even say this game is Left 4 Dead--  Made by somebody who possesses basic knowledge and only some experience when it comes to using UE4.






I finished up with this week by creating a new “Boorlean” variable called “IsDead”. Using this, I incorporated into several pieces of my code, including; “HealthSystem”, “MovementInput”, and the “MouseInput” codes. Basically, this code will kick in when the Player dies and prevents them from moving afterwards.

Monday, 29 January 2018

Week 18

Week 18:

HND Project


This week, I have decided to improve upon the “Health System” by incorporating a “Health Bar” in the HUD to better show how much damage that the Player takes from the Zombie AI.  To begin with, I had to create a new “Float” variable in the “Graph Event” that I named “MaxHP” and set its value to “100”. I then I went into the HUD that I created a few weeks ago and added a “Progress” bar.


Once I placed where I wanted it and filled in my desired colours, I then dragged a “Text” box onto the screen and left it blank. I then bind both the “Progress Bar” and the “Text” box. In the “Graph”, I created the following codes for the “Progress Bar” and the “Text” box. Below is how they appear.



After this, I went back into the “FirstPersonCharacter” graph and proceeded to remove the “Print Strings” in the “Health System” setup I had created earlier. I then quickly tested to see whether the results or not. To my satisfaction they had worked after a bit of configuration. 


After this, I noticed that the values still appear even after the Player dies and the continues values go down into minuses. As a result, I then decided to add a “Clamp” function to the piece of coding. This then stopped the “minus values” from happening and I also shortened the delay. 



Monday, 22 January 2018

Week 17

Week 17:


HND Project

This I am going to continue working on the “Health System”. This time I will be focusing on the Player’s Health. I shall also be creating a “Score System” of sorts to keep track of how many points the Zombie AI are worth. To start with, I proceeded to create a new “Float” variable named “HP” with a value of “100” in the Event Graph for the FirstPersonCharacter.



I then created the above the code with the “HP” variable. In effect, this piece of scripting tells the UE4 when the Player is taking damage and how much damage they are taking, and finally when the health meter reaches zero the Player will then have died and the whole level shall restart. 


I also had to edit and reconfigure the “Enemy Chases Player” coding in the Zombie AI’s “Event Graph” to allow the above coding to have any effect, like so. After this, I then when back into the “FirstPersonCharacter” and went to create the “Score System”. I did this by creating a new “Float” variable I named “Score” and then built a code around it, and added onto the “Gun” code to show the score.


After this, I then tested it out and then reconfigured the code after I realized I wasn’t getting the results that I wanted. For example, the “points” I received for destroying the Zombie AI. However, though, I noticed the score were simply multiplying everytime I hit the Zombie AI and thus, I realized I had to edit the code onto the Zombie AI’s health code after I had done this. You can see the improved code I wrote below.