Learning How To Walk
The Problem: How do I stand up?
For this project, I am responsible for implementing how the player interacts with the world. Meaning I have to get the player's input, implement player movement, attacks, and anything else the player might do. Some player actions were already implemented with the starting template we used, but the problem I had was understanding how it all worked. Where do I get input and how was I doing it? Coming into this project, the only other experience I had making games was with Unity, so I was used to implementing gameplay functionality essentially from scratch and so that was the mentality I had. However, because we are using Unreal Engine 4, it has all that functionality built-in, to a degree. So I had to change my approach and learn how it worked together so that I can then begin implementing the player actions.
This is probably the most important part of the project at the moment because without it there would be no way to play the game. Another problem was figuring out how I am going to attack and damage an enemy. I have the attack animations, I have the input, I just need to figure out how to chain the animations together to simulate an attack combo and have the player character's sword hit an enemy and deal damage to it.
The Solution: Let someone hold your hand for support, and then... baby steps
Now my first problem was solved by a couple of days of research on how the engine works and creating a few test projects to get used to the workflow. Once I got the character moving I was able to move on to the attacks. My first task was to get the player attack animation to play whenever the player pressed the attack button. That was fairly straightforward since I have already figured out how to do basic input. My next challenge was getting the animations chained together with each button press to perform a combo. This was tricky because I have yet to figure out how to "save" multiple button presses and have them play the different animations with each respective press, before resetting the variables that keep track of whether or not the player is attacking and which attack in the combo they are in. So I chose to move on and come back to it later since I had my single attack animation and that was good enough to start implementing hit detection and applying damage to enemies.
My initial approach to this problem was to figure out how to get the bone in the skeleton that was attached to the sword to then attach a collider to it to represent the sword, and then check if there was a collision with that collider, and if an enemy collided with it, somehow deal damage to that enemy. This was before I found out Unreal also has ways of applying and receiving damage built-in. I then learned a way to use the base and tip positions of the sword to wrap a line/sphere trace around it to detect hits that I can then use to apply damage to the enemies. So, I wasn't too far off from my original approach which was something I was happy about. Now I know a way to attack and deal damage to enemies which is basically the game, so that is good to know. The next step is to get it working. I am looking forward to that challenge.
Get Lucifer's Hordes
Lucifer's Hordes
A roguelike hack and slash game. Acquire weapons and abilities to defeat enemies. Developed with Unreal Engine 4.
Status | Released |
Author | Justin DaSilva |
Genre | Action |
Tags | 3D, Hack and Slash, hell, horde, lucifer, lucifers-hordes, Medieval, Roguelike |
Languages | English |
More posts
- We Learn From Our MistakesJan 07, 2023
- Would You Like To Continue?Jan 07, 2023
- Adding Some PolishJan 07, 2023
- Almighty PushJan 07, 2023
- Creating AbilitiesJan 07, 2023
- Damage Types and AbilitiesJan 07, 2023
- It's the Small Things that MatterJan 07, 2023
- Revamping and Reimagining Our CombatJan 07, 2023
- Stuck in a LoopJan 07, 2023
- Combo AttacksJan 07, 2023
Leave a comment
Log in with itch.io to leave a comment.