Here’s a video of a project I’ve been building in my free time. I started with the FPS blueprint template and built from there. The player character BP has jump, dodge and run. I also added camera shakes to all of the movement. There’s only one melee attack for the player and the art is super-proto. The enemy uses behavior trees for the AI, has 3 attacks, 2 hit reacts.
The map shown is just my small AI testing map. I wanted to make sure I could get some combat going before I actually build any encounters.
I couldn’t tell from the video if you have a full character body or are going with camera with arms attached. What do you plan to add to it?
Something that’s been bothering me about modern games for a while is the lack of collision in melee attacks, where it looks like the animation just sliced through air(harder to notice with hit reactions). It was very noticeable in Skyrim, when you watch two NPCs fist fighting and hitting thin air. Something I’d like to see is a sword blow collide/connect and blend the animation with physics so that the sword drags/scrapes across the surface(with some penetration for flesh) as well as physics based hit reactions(The one in the Content Examples behaved oddly). Just a thought to over-complicate things!
I would really love to see how you put this together. Seeing how people utilize Behavior Trees is really interesting to me. I totally understand if you want to keep your game’s details a secret though.
Most impressive. Unfortunately UE4 doesn’t really support high end visuals for realtime/procedural stuff yet. But in their timeline light propogation volumes have a really high priority! So hopefully they’ll be ginning up on that, a high enough LPV resolution should be doable (in an all interior game) and hopefully they’ll have support for point light injection (shouldn’t be too hard).
Either way it’s a solid looking concept already. Really reminds me of Capcom’s “Deep Down”. Though I hope you won’t put any pretentious and purposefully confusing voice over right?
Right now my first person has a full body but it doesn’t animate, I’d like to add full body + animations but that will probably come later since it’s not high priority (i’m trying to order my work from high-impact to low/polish).
As far as collision I’ll admit my melee collision is very basic right now, I check a bounding box for overlapping actors at a certain time in each animation. I do play a hit react that’s additive on the enemy, so they will react while they continue their action but I should probably play a hit react on my own sword! I also play a camera shake when the attack starts but could probably do another one on successful hit.
No secrets here!
Keep in mind, I know -very little- about AI and i’m probably not doing a lot of things properly! I just bash them together until they work Having said that, here’s my behavior tree:
SearchForEnemy is just a decorator that grabs the player variable off of the enemy pawn if the enemy aggro is set to true. On my enemy I have a sensing component that sets aggro to true if it detects a player.
Attack decorator just calls an attack function on my enemy that plays an attack anim montage and does damage.
This is pretty similar to what I’ve been working on in functionality, but is rather differently built.
Here’s my advice: You can get rid of all of the sequence nodes except the first one and it would probably work better actually. Just move the SearchForPlayerEnemy to the Selector below it and the “Attacking” decorator onto the MoveTo node below it (You may need to actually get rid of the Selector, but there is one too many composites here). The Sequence leading to the Attack doesn’t seem to be doing anything, so it can be removed flat out.
Here is a similar test zombie I have been working on. The simple parallel makes it so that he attacks while moving simply.
EDIT: I use a Service to find the player as well in case I decide to add NPCs so that the zombie could change victems. Decorators are good for checking before proceeding, but Services are for something that happens everytime a node is activated. If you move the SearchForPlayerEnemy down, you may want to switch it to a Service. I didn’t actually try any of this out, but it makes sense from what I’ve done in the past. If it starts acting funny, I can drop by and see what is up.