top of page

Blueprint Work

This is where I go more in depth on the mechanics and code I've done. It's updated periodically/when something significant is completed.

Structs and Data Tables Prac

Attribute Damage System Prototype

Demonstration/Overview:

Design Goal 1:

  • Have a way to easily view on screen relevant player and enemy stats.

Solution:

  • After researching the most basic systems that would be handled by numbers and text, I created a data table that could be used by both the player and the enemy (as separate tables). A simple UI was then added that would pull the information from the player and the enemy actors.

6d55ba1aa848bbb3841ed06d2241c8b5.png
1398830b3e44b07b0c8711c25063a036.png

Reflection:

  • I had never used data tables prior to this and I had created them before anything else in the project. I had ended up making the UI and pulling the data table information there before creating the enemy actor that would also be using the same information. I would later have to go back and edit the blueprints to make it both make more sense in regards to spawning/destroying actors but now I know for future reference how it should be handled.

Design Goal 2:

  • Have shields react differently to different damage types.

Solution:

  • I began with making a duplicate of the health actor component and adding multiple checks before the damage was calculated. The component then checks for the damage type based on the array used just prior and adjusts damage accordingly. If the amount of damage done is greater than the remaining shield, it is then carried over into damaging the health of the enemy.

Reflection:

  • While I'm not sure if this was the most efficient way to go about determining the damage and shield types, this was the cleanest result I could manage. The component itself would need slight modifications in the future if more shield and damage types were added.

Shops, Loot Drops, and Experience Points

Shops

Demonstration/Overview:

(While the Shop was the main goal of this section, other smaller features were also added but not listed here.

Please refer to the video to see them.)

Design Goal:

  • Create a shopkeeper/in-game store that sells items to the player.

Solution:

  • The widget first finds which shopkeeper the player is in front of and storing a reference, it then checks to see if will display random items from the data table or a specific row  and stores these values into the widget.

Determining Shop Inventory
3710271f0d94dc415d82e397efb776b8.png

Reflection:

  • The hardest part about of creating the shops was actually populating them with the content from the data table. I was unable to create a general shop UI based on the total items assigned and instead limited it to three select items per shopkeeper.

    And while it does appear to look like items are added to an "inventory", it is really only an array of strings and doesn't contain any other information. However, it should be able to be used in the future for pulling data from a table by matching the strings.
     

  • A bonus to this, since the items list was created, was being able to create a rewards system for when the player defeats an enemy complete with experience points and a random item dropped onto the ground.

Pickup and Throw Objects (Project VV)

Pickup and Throw

In Depth Video

Design Goal:

  • Pick up and object and throw it a set distance.

Solution:

  • The player character would determine if the held object is one of multiple potential objects to pickup and attach it to a bone on its hand mid animation. It would then wait to be thrown before playing a second animation and applying an Impulse to it by calculating an arc of a set distance via kinematics. For enemies, rather than using kinematics (since they would chase and attack the player thereby dodging the relatively slow moving object), the object instead flies straight at them at a higher speed.

Reflection:

  • The process for creating all of this inside unreal engine was not an easy task. The largest issue being how two of the variables for determining the kinematic formula were missing so I would have to manually create and test a static distance variable before determining the height of the arc. 

  • For the longest time as well, I had used the wrong value for calculating height of the held object, instead using the world height rather than the difference in heights of the held versus the target object. With both of those solved though, the game really started to feel like a replication of the reference. The biggest thing learned however would be how to properly code something of this nature for future projects.

Object Targeting for Throwing (VV)

Throwing

In Depth Video

Design Goal:

  • When there is an available throwing target, display a circle over the closest target object.

Solution:

  • Once the player character was holding an object, it would then check to see how many targetable objects were within range of the player and within the dot product. A minimum distance float is updated as the player walks closer to objects that are within that range and dot product. This float is what determines which object will be told to enable their target widget and set it to be the target of the held object. Should the player move out of range or face another direction from all possible targets, the distance is reset and the target made invalid. Lastly, resetting these two variables when the target is destroyed either by the player or by anything else helped to snag any loose ends.

Reflection:

  • This was a minor bug problem that had been present for most of development. Sometimes the player would target one object but enable to target UI on a different one. Similarly, if the player walked out of range after targeting something, then threw their object, it would face them to that last target and throw rather than just tossing the object with default kinematics in the current direction. Luckily the solution was simple once I figured out how to use the dot product, SphereOverlapActors, and the minimum distance float all in conjunction with the different checks.

bottom of page