Devil May Cry Character Controller in Unreal 5

Role: Technical Designer

Genre: Action, Hack and Slash

Platform: Not available

Size: Solo

Duration: 8 Weeks

Tools: Unreal Engine 5.1, Perforce

Unreal Engine 5.1

Overview

Takeaways

Research 

Before I started with implementing, I first needed to research what systems were vital to Devil May Cry 1's feel. Based on this research, I determined it was a mixture of systems & features:

201565 Research Document - Devil May Cry - Jack Jadoenath.pdf

Melee Combo System

The melee combo system works by reading the player's attack input, checking the attack count and incrementing it( or resetting it if at the last attack), setting the attack animation based on that count, and then playing it.

The attack animation is obtained from the weapon your player character holds. 

The weapon is a separate actor that contains the first, second and third strikes in a map variable.

This map variable is comprised of enumerators that require associated Animation Montages.

This system allows you to implement unique attack animations for any desired weapon.

Animation flagging

One very important factor of the melee system is flagging within the animation when the player can and can't attack.

I've set up multiple Animation Notify States for this to flag this status and others such as:

Juggling and Dummy

The core fun of Devil May Cry is being able to perform combos around your enemies, you can have an advanced character controller but it won't mean anything if you don't have anything to mess around with.

In the weapon actor, I set variables like "Pushback" and "Launcher". These determine how far the enemy will be pushed back or launched upwards. 

Within the animation, I flag using an Animation Notify State if this attack is a launcher or a big pushback.

Dummy

The dummy reacts to the player attacks, I had to set up something quick & simple so I used a timeline to fake the enemy getting juggled.

Whenever the player attacks a dummy, the player's weapon sends them data of the pushback and launcher strength.

With each attack there's a series of checks, "Am I in the air?" "Am I hit with a launcher attack". These checks determine if the dummy will stay in the air or get pushed away from the player if they're grounded. 

It serves its purpose very nicely and it feels great to slap them around.

Camera System

In the original Devil May Cry, the game operates with a fixed camera system and an on-rail camera that follows the player. It also had hard cuts whenever you transitioned to different areas in a level, which caused disorientation to players and is perceived as "aged". 

To remedy this, I added an option that lets you control whether you want hard cuts, or you want to interpolate the camera from one location to the fixed next.

I also allowed a free cam to be used if you don't want to use the fixed camera system or let the player use both.

Fixed Camera

The fixed camera I recreated follows the player, and it's based on an actor with an overlap volume called BP_CameraSwitch.

Whenever the player overlaps with this volume if fixed camera are enabled, the camera swaps to that volume's assigned camera. 

The level designer places overlap volumes and assigns the BP_Camera object that tracks the player.

On-rails Camera

Operates similarly to the fixed camera but this will make the camera move based on a rail set by the level designer.

Devil May Cry also used an on-rails camera system

You can enable Rail cameras by using the same overlap volume actor we used earlier. BP_Camera has an option to enable "Rail Camera" and it will use a spline in the BP_CameraSwitch that the camera will use as a path.