Developed Ideas & Tests

Week 03 – 24th February – 1st March

Tasks planned:

  • Look of assets I wish to use within my desired game style
  • Create psuedocode and flowcharts for mechanics 

Current Position:

Psuedocode

Player animation blueprint

If player speed > 0

Set animation state to run

(Play run animation)

Else

If player speed = 0

Set animation state to idle

(Play idle animation)

This is some psuedocode I have written for the animation process for the player within my game. It will work by looking for what animation state to be in by checking the speed of my player character which I can get by setting the players current velocity as a variable that is constantly updated. Now if the players speed is over 0 then the animation will know its in the run state and set the subsequent animation to play and then the same would go for the idle state. This is a helpful visualisation of how I will setup my animation process within UE4. I can then apply this same approach to the animation blueprint tools in UE4, creating a fluid movement animation based on the speed that my character is moving. I will also be able to adapt this same blueprint to my enemy AI.

Player basic attack

Input action left click

Set actor rotation to mouse position

Play animation montage (Attack)

Apply damage

This is some psuedocode for the primary attack within my game, it details how I will set my character rotation to be the same as my mouse position so that you will always attack in the way you are facing your mouse. After the mouse position is found and the players rotation has been set the attack montage will play which will be a simple attack animation that is played and if this animation comes into contact with the enemy it will apply damage to the enemy. This psuedocode lays out the base nodes I will need to connect up within the blueprints of UE4 to create this mechanic and will act as a stepping stone for me as I have already planned out the logic of the action and now only have to create the specifics of the attack.

Player Movement

Event Tick

Get hit result under cursor

Find actor location – mouse location

Right click pressed

Move character to mouse position

Right click released (Move to last mouse position)

This is how I plan to setup the movement system within my game. This premise allows my character to move to the location of the mouse that is being constantly updated on event tick allowing for smooth movement. It does this by taking the location of the actor and taking away the mouse position giving a vector length that the can be used to move the character. I think this system will work really well in my game and this gives me the base layout of how I might be able to go about setting it up in UE4. I think the movement will be very fluid using this system as well give the player the option of holding or constantly pressing right click depending on their preference as it has been setup in event tick. I will use this to help me setup the physical mechanic in UE4 when I come to create test programs.

Flow Diagrams

Player Special Ability

Here I have made a flow diagram to plan out the logic of how I will create one of the abilities for my character. It will work by checking a bool to see if the player has enough chaos to cast the spell and if they don’t nothing will happen but if they do it will find the position of the players mouse and play the particle effect and cast a collider that can do radial damage. This will work well for an area of effect ability I have in mind for my game. I think having the spell cast from under the mouse position will be important as it will allow the game to have some flow with the player being able to run whilst casting the spell. This flow diagram will be really helpful when I come to create the test program for my game as it sets out how the blueprint will flow and connect up, this will make it easier for my to have a clear idea of what I need to do to create this mechanic.

This flow diagram details how my enemy AI will be able to attack my player character. The mechanics behind this flow diagram working will be made in a behavior tree however assuming this principle has been created then this flow diagram will work. it looks to see if the player is in range to be attacked and if this is true then the AI will begin the attack animation which will then cast a sphere raycast that will return a hit result. I can use this hit result to then apply damage to the player character by casting to it and taking away from its health variable. I think this way of doing the damage will work really well as it is more reliable than using a generic collider and removes a margin of error of just using overlap events that could cause multiple hits to register. Just as with the flow diagram above I will be able to use this as a stepping stone between my theory and the blueprints and kin of follow it as a guide to realise the mechanic in the game.

This is a UML Diagram I have made to show the mechanics of my player, It details how the different mechanics of my character will interact with each other, what I like about this is it helps me visualize what I need to do, in this case I will need the movement, attack and ability mechanics to all work in tandem with each other as I want the game play to feel fluid. I will refer back to this throughout the creation of my player character so that I keep on track with how I wasn’t the mechanics to interact.

Week Concluded:

This week went really well as I was able to plan out some of the more important mechanics within my game and I didn’t find myself struggling with any of this. What I have achieved this week will help me greatly in the future as I start to create test mechanics for my game. I dont feel as though I need to change my plan going forward as I was able to accomplish all of my desired tasks however going forward I would like to try and get ahead of my plan and begin work on creating actual mechanics for my game.

Week 04 – 2nd March – 8th March

Tasks planned:

  • Look of assets I wish to use (Character models)
  • Create top down movement system

Current Position:

Asset Research

This is a knight asset that I found on CG-trader that I will be able to use within my game as the main character. I really like the design of the character as it feels grounded in reality and could be a real knight. The dark colours make the asset look powerful however I think it may make the character look too foreboding and evil, this would be counter intuitive to the themes I want the player character to feel empowering and a force for good but the black armor of this model would make you think otherwise. I do really like that this model comes with animations as this will make the game feel more like a finished piece of work having all of the abilities animated but it will also give the player feedback on what they are doing. I think I will continue to look for assets for my player character until I find something more fitting to my thematic.

This is another knight character design and unlike the first one I looked at this ones colour scheme leans way more into the colours that represent good and order (Which I found in my research to be blues, silvers, whites and golds) this colour scheme would fit the thematic of the main character in my game perfectly. The overall design of this character may be too alien for what I want, the design looks almost sci-fi much like “Warframe” which is a sci-fi, action rpg. I think what I’m looking for is something that is slightly more grounded in medieval fantasy whilst incorperating this kind of colour scheme. This research has helped narrow my field on what I am looking for and what I want to add to my game.

This asset is from the Unreal Marketplace and is a free 3D model from the game paragon, it is free use content and it includes a full set of animations and particle affects plus a animation blueprint. Stylistically this model fits my game perfectly, it leans slightly into fantasy making the character stand out and be instantly identifiable as a main character and also has a colour scheme that fits the aesthetic for the order theme that I am trying to build. I really like the broad range of animations and particle affects at my disposal with this asset as it will be a perfect for creating a finished feel and bring the character I’m trying to create into fruition. I think I will use this asset in my game as it has the best balance between fantasy and realism for the character design as its armour is stylized but not outlandish, also the colour scheme fits what I’ve previously outlined as colours for order.

This is a demon character for my game that I would use as an enemy. This design leans heavily to the traditional demon look with horns and an animalistic looking form. I like the design of this model however I was looking for something slightly less tradition but still coveys the chaos feel of a demon by having reds blacks and oranges as the colour scheme. I do like the traditional look as it instantly identifiable as a demon but I want something a little more interesting. This model doesn’t come with any textures or animations which is another thing which has deterred me from using this model as I would need to find an animation set that I could apply to its skeleton.

This is a another model from the paragon selection on the Unreal Marketplace and as with the Greystone asset this one comes with a full range of particle effects and animations which will be crucial to creating a finished feel to my game. Something I really like about this asset is the broad range of models that come with it as I will be able to use the different skins as different enemies within my game that have varying difficulty. Some of the more sci-fi looking models will be unusable however there are a handful that could fit seamlessly into my game as they have fantasy aspects. Another advantage of using this asset pack is there will be a unison in art style between the enemies and my character which well help the game mesh together. Going forward I will be using this asset as my enemy in my game as it fits the theme of my enemy as well as having the same art style as my character.

Test Mechanics

1
2

This is my test mechanic for the top down movement system within my game. In the first image you can see how I am finding the position of the cursor and this is done by doing a hit result under the cursor which will give me its current position among many other things. I have used this location to and set a decal to this position which gives the player a visual representation of where the mouse is on screen and I will be able to customise what this looks like which will be very important for my games aesthetic. The second image shows how the player moves to a location and I did this by again finding the location of the cursor and then take away the actors current position giving the distance to travel which I check against my minimum click distance and if it is greater then the character will move to the location. This is perfect for what I need in my game as it works fluidly and it allows me to easily control how much specific control the player has over their movement. In the third and final screenshot you can see how I put this function into practice using a gate which lets me control if the function is running or not. This lets me move the character by both holding and clicking the right mouse button. Overall I am very happy with this mechanic as it works exactly how I wanted it to and I don’t see myself needing to make anymore adjustments other than to the minimum click distance.

Week Concluded:

This week went really well for me as I was able to find assets for my player and enemies which I am really happy with. I didn’t take me too long as well to find assets I was happy with which left me with a lot of time to really work on and refine my top down movement system. I did have some issues setting up this mechanic as it was something that I haven’t created before so I needed to watch a tutorial to understand how the hit result under cursor mechanic worked but other than that I was able to finish my tasks without any problems. Going forward I will continue to follow my plan that I detailed in my proposal as I have been able to work on pace which will leave me finish my project on time.

Week 05 – 9th March – 15th March

Tasks planned:

  • Create AI Wonder mechanic
  • Setup player basic attack
  • Create animation blueprint for player

Current Position:

Test Mechanics

Here I have the test mechanic for making my enemy wander around a given area. I wanted the enemies in my game to walk around the dungeon at their own free will to a degree as I think this gives the enemies some more life and character that would otherwise be lost if they just stood still and waited to come into contact with you. I really like how this mechanic turned out as when I implement it into a level design it will feel like the demons are really patrolling and living in this dungeon giving the level some extra life. I achieved this by setting up a custom task for the behavior tree that looks for a random location within a specified range on a NavMesh and then had the behavior tree run this task as a move to that will continue to run every two seconds which I can change. This works very well for what I want but I may improve on this mechanic in the future to create a set patrol path for the AI or have the wander set to a specific NavMesh so I can control the bounds of the movement to for example bind the character to a room.

1
2
3

This is my player characters animation blueprint which I created so that the player would have visual feedback on what they are doing in the game. It’s relatively simple after you understand how animation blueprints work and what I have done here is in the first screenshot (1) I have setup a variable for my players speed and this is done by checking the characters velocity in an update event so that I can constantly know the current speed of my player. In the second screenshot (2) I have then put the speed variable to work by setting up transition conditions which dictate what state the player is in, in this case its run or idle. I do this by checking if speed is equal to zero and if it is then I will be in the idle state however if the opposite is true then I will be in the run state. Final we have the third and final screenshot (3) which brings the states together into the animation pose that you see in game however I did setup a layered blend per bone so that I can blend different slots of animations together so for example I will be able to play my run animation and attack animation at the same time because I have blended the slots at a specific bone. Overall this was a really good learning experience for me as it has taught me a great deal about animation in UE4 and I feel confident creating more animation blueprints in the future.

Lastly this week I have my player characters basic attack. what I did here was find the position of the mouse and set the player character to be rotated to that position so that when you swing your attack you will be facing the same way as your cursor and I felt that this was important as it would feel to clunky to manually rotate your character to hit enemies you were running away from. After the rotation has been set and the player is facing the right way it was play an attack montage which is an animation from a slot that I have blended with the characters movement so that you can hit and run at the same time. I haven’t set up damages as of yet on this attack however I plan to do this next week when I create the health variables for both the player and the enemy. I feel that this mechainc works very well but I would like to make some refinements to it going forward as I feel that using a do once and only having one kind of basic attack is monogamous and leaves no real flow to the combat but other than this I am very happy with the outcome.

Week Concluded:

This week has gone really well for me as I have been able to create all of the mechanics I wanted to without any hiccups or problems which really helped me to finish this week on time as I thought I may struggle with the animation blueprints as I hadn’t done this before but I manages to get through it and learn a new feature of UE4. There are some things I’ve done this week that I would like to improve on such as the players basic attack but other than that I feel that I did really well this week.

Going forward into next week I would like to keep working at the same pace and continue to follow my plan outlined in my proposal as this has kept working for me. If I finish my tasks early next week I would like to ry and push myself to do some extra work keeping me ahead of my schedule but other than that I am really happy with my current position.

Week 06 – 16th March – 20th March

Tasks planned:

  • Create players ability
  • Setup detect & chase for enemy
  • Create enemy attack
  • Level designs

Current Position:

Test Mechanics

Here I have a failed test mechanic for creating area of effect damage on my players Q ability. What I was trying to do here was cast a multi sphere trace that would detect all the enemies inside of it allowing me to do damage to multiple enemies within my game however I ran into an issue using this method which was it would cast multiple hit results onto each enemy which would cause them to take the damage amount multiple times meaning the damage this did would be unreliable. I scrapped this idea and then tried to use the AI report damage event so that I could access the AI perception mechanic on my enemy and have it read a damage event. This left me feeling the ability is too definitive and not rewarding the player for being as accurate as possible because it didn’t matter what part of the ability hit, it would always do the same amount of damage. This really helped me begin to learn some different ways of doing damage with Unreal and although none of these worked for me currently, I will be able to apply this knowledge later to create the mechanic I want.

1
2
3

Between these three screenshots you can see how I have created the Q ability for my player character. Starting with the first screenshot you can see how I have spawned in the ability rather than casting it directly from the player and I did this as it allows me more freedom in terms of where I will have the take place. I made the Q ability spawn at the players mouse position as they run through an attack montage that looks as though you are casting an attack. I had it spawn at the mouse position as I felt this gave the player the most control on how they use the attack allowing them to run away and cast the attack at the same time and I think this was incredibly important to keep a fluid motion to my game to which I think it works very well. In the second screenshot you can see how I am apply damage with the attack. Firstly I am spawning a particle emitter as a visual representation of the attack and then I am applying my damage through a mechanic in UE4 called radial damage with falloff. What this lets me do is cast a spherical radial around the origin point (the middle of the ability), this lets me customise the size of the attack as well as the max and min damage. I have set all these up as instance editable variables so that I am able to change them without going into the blueprint itself. The max and min damage allows me to create a linear drop of between the two values which means I can have the outer radius of my spell do less damage than the center which is more rewarding for the players accuracy.

Lastly we have the third screenshot which is how I am receiving the damage on my enemy and this is done using the same system as applying the damage. There is an event receive radial damage and this lets me quite simply take the damage I have setup on the apply system and take it away from the enemies health on the receive system. Overall I am very happy with how this mechanic works within my game as it feels rewarding to use because of the damage fall off on the ability and having the attack spawn at my mouse position lets the player have full control over the attack. The only thing I would change about this attack is add a targeting system so that the player can separately aim and fire the attack.

This is my enemy chase and attack mechanic and this lets my AI detect the player using AI perception and then chase them as long as it can see you and then if you fall into the range it will try and attack. I have setup the detection system using AI perception as it allows me to setup different ways for the AI to detect the player, for example I have used the sight system so that the enemy will detect me using sight but I can also use hearing so that enemies would be able to hear your footsteps and react to you. For my games purposes I am happy with only using the sight perception as I can setup a max range for the detection and with it being sight based it is possible to run away from and escape the enemies but its an interesting mechanic that I have learnt and would be able to apply to projects in the future. After detection the AI will chase the player using a custom task I have created with a vector key that allows me to set what the AI is moving towards. This mechanic is simple but very effective and works perfectly for my games purposes. I have setup this mechanic to have a cooldown so that the enemies movement is less robotic and really feels like you are being chased. Lastly I have setup an in range condition so that if the AI gets within a certain distance of you it will be able to attack you. I still need to setup the actual attack for this but what I have here is the foundation for my AI to able to attack. I am really happy with the workings of this mechanic as it works as I hoped it would and it really feels like the AI has some intelligence and decision making capabilities which leaves it feeling like more of a threat to the player rather than enemies I have made in the past that mindlessly run at you. I feel that I have really gotten to grips with the AI tools within Unreal now so I feel comfortable going forward if I need to make any changes to this system.

Here I have the enemies basic attack system. I achieved this by having a sphere trace that starts at a specified socket on my enemy. I then am able to set the the radius of this sphere trace giving the attack radius of my enemy. If the trace has a hit result with my player character it will then cast to the players health where I am then able to apply my damage variable to take health away from the player. I really like this system as it allows me full control over what gets hit as I can setup an array of actors for the trace to ignore. It also only has one hit result meaning it will only do damage once. Another thing I like about this mechanic is that I have set it to be cast from a socket on the players weapon and this lets the player have a chance to dodge the attack because its only the weapon that will do damage to them. Overall I am very happy with this attack as it works how I want it to and the degree of accuracy I have been able to give to the attack really makes fighting the enemies more of a skill contest rather than who can do more damage per second.

Week Concluded

I think this week went quite well as I was able to complete some of the more complicated mechanics within my game however due to how my schedule has been changed because of the COVID-19 incident and the tasks I planned this week taking slightly longer than I anticipated I was unable this week to complete all of my planned tasks putting me slightly behind my originally planned timetable but other than this I am very happy with my current position in the project

going into next week I will compensate my loss of time by doing less level designs so that I am able to focus on and squeeze in all of the tasks I have planned for next week as well as the level design that has rolled over from this week.

Blog at WordPress.com.

Up ↑

Design a site like this with WordPress.com
Get started