The Wolf in Me
Steam News 19 July 20241y ago

Devlog 61 - Combat Token System, Comic Strip for Storytelling and much more!

Hi everyone! Welcome to a new devlog! In this episode, I will show the progress made this past month. This update includes: My token system for combat. My solution for storytelling. Using PCG for Level Design. Improveme…

Update log

Full The Wolf in Me update

The complete published notes, normalized for clean reading and source attribution.

Extracted changes

0 fixes9 additions13 changes0 removals
  • Gameplay
  • UI and audio
  • Events
  • Performance
  • Workshop
addedHi everyone! Welcome to a new devlog! In this episode, I will show the progress made this past month. This update includes:
addedNew AI behaviors.
addedAs you can see, there is lots of new stuff, so let's get started!
addedIf you are new here, welcome! My name is Dani Marti, and I'm a solo developer creating an action-adventure game inspired by The Last of Us and Diablo.
addedToken System for CombatThis system may look very complex, but it's much simpler than it seems. In my case, the Player and the Enemy are children classes from the same parent. So, since both will need a counter for tokens, I added the Combat Tokens variable to the parent. So I can access it from the children. In the same way, I added a new variable called Combat Tokens Max. This variable is hard-coded, but it could be different, for example, if I decide to have various difficulty levels. The hard-coded value is right now 2. That means that only two enemies will be able to attack at once.
addedToken System for CombatI'm using Behavior trees, and I have a task to perform the attack; if we take a look at the function, we will see that before attacking, we check if the attack is possible, so this is the perfect place to add a new condition, has the Player available tokens?

Hi everyone! Welcome to a new devlog! In this episode, I will show the progress made this past month. This update includes:

  • My token system for combat.

  • My solution for storytelling.

  • Using PCG for Level Design.

  • Improvements in the spectator camera.

  • New AI behaviors.

  • Headshots.

As you can see, there is lots of new stuff, so let's get started!

If you are new here, welcome! My name is Dani Marti, and I'm a solo developer creating an action-adventure game inspired by The Last of Us and Diablo.

Token System for Combat

This system may look very complex, but it's much simpler than it seems. In my case, the Player and the Enemy are children classes from the same parent. So, since both will need a counter for tokens, I added the Combat Tokens variable to the parent. So I can access it from the children. In the same way, I added a new variable called Combat Tokens Max. This variable is hard-coded, but it could be different, for example, if I decide to have various difficulty levels. The hard-coded value is right now 2. That means that only two enemies will be able to attack at once.

On the Enemy side, there is a little more work; so let's see it step by step.

I'm using Behavior trees, and I have a task to perform the attack; if we take a look at the function, we will see that before attacking, we check if the attack is possible, so this is the perfect place to add a new condition, has the Player available tokens?

To answer this, I'm using a blueprint interface to improve the communication between the Player and the Enemy. Here, I have three functions, get the available tokens, consume tokens, and replenish tokens. This way, I can perform all the operations I need for the Enemy and the Player.

So, as you can see, the Enemy can perform Special Attacks, Finishers, and Normal Attacks. For Special and Normal Attacks, the Enemy only needs 1 token, but for Finishers, it uses 2; this is a way to ensure Finishers can be only performed by one Enemy at a time since finishers are synced animations and won't look good if more enemies are performing at the same time.

So, the first step is to check how many tokens the Player has available; in step 2, if there are enough tokens, the Enemy consumes the tokens from the Player. You can see the Consume and Replenish Token functions in action here.

The check fails if there aren't enough tokens and the Enemy circles the target. This behavior makes the Enemy look smarter since it looks like the Enemy moves to a better location to wait and try to attack again.

All the attacks are performed using Anim Montages, so after the Anim Montage is complete, we return the tokens from the Enemy to the Player, using the Consume and Replenish Tokens functions again.

The last thing to take into consideration is death. If an Enemy took Tokens from the Player, but we killed them before returning those Tokens, I forced the return in the Death Event. This way, other Enemies can still attack us.

That's how I created the system; the UI on top of the characters is just for debugging and making it more visual. Please let me know in the comments below if you have any questions about the system.

Dynamic Comic Strip

The next significant feature is the Dynamic Comic Strip. I created this feature because I'm creating an adventure game, and this kind of game usually has tons of cinematics. Since I'm not an animator, and my expectations are over the top due to my annoying perfectionism. I knew that would take too long, and I probably wouldn't be happy with the results. So, I came up with this system:

  • I have several Scene Capture Cameras in the scene that frame what will be shown in the comic strip.

  • Each camera has a post-process effect with the hatching style and the outline.

  • I use the Custom Depth pass to choose what elements are displayed in color.

  • All is displayed as UI.

If you are interested in the system, I can go for a deeper dive in another devlog, but this is, so far, the overview.

A couple things worth mentioning, I'm not a shader artist by any means; so for my shader, I created a mix using tutorials from Visual Tech Art and Kamil Hepner. They are very good tutorials and worth checking out.

The other thing is that I find the animation UI system very annoying and hard to manipulate. So, I created a blueprint assistant that manages the UI animations using timelines; this way, I can just manipulate the times and curves more efficiently, which allows for a very fast iteration.

For my UI and animations, I used the UI materials from the UI Material Lab, which is a free resource from Unreal Engine. The information there is pure gold.

The last thing I want to mention is that the system initially fed the comic stripes with render target textures, so the caption was done in real-time.

After some testing, I realized the rendering of three images simultaneously was dropping my fps considerably, so now I'm manually rendering and saving the images beforehand. It's not so convenient, but it's much more performant since I'm just dealing with textures and UI now.

Using PCG for Level Design

If you have been watching my devlogs, you know how much I struggle with my level design. Step by step, I'm getting more comfortable and coming up with my own solutions. For me, one of the biggest challenges is creating boundaries that limit the Player's movement.

I found Blaze 92, a youtube channel that showcases games and how they overcome that challenge. Very interesting and inspirational to apply to your games.

So why creating boundaries is a challenge? In my case, I want the boundaries to be and feel natural, i'm not creating an open world, but I want the Player to have 'certain' freedom to move around. And when you do that, the dangers are:

  • The Player can feel lost.

  • The Player has more freedom to do things you didn't expect, which is always very dangerous.

  • It's harder to direct the Player towards goals and quests.

So, after some research, I decided to limit my level using geographical boundaries such as cliffs and rock formations. And when the level is flatter, I use what I call Forest walls; those are dense and have higher bushes, which show the Player that they can't go through, just like you wouldn't go through in real life. To add and manipulate those boundaries, I created a PCG Spline tool that allows me to easily make them.

On the other hand, I'm populating my forest using PCG based on landscape materials; this is super useful because I just need to paint my landscape with different materials to populate different assets. If you are into PCG, I highly recommend you check Aziel Arts's tutorials; for me, the best PCG tutorials on Youtube. He has a tutorial about populating landscapes.

Other updates

Last but not least, I made some improvements in my Spectator Camera, so now, the camera is always consistent with the framing, that means for example if the Enemy was coming from the left, the spectator camera keeps that framing so the Player and the Enemy are in the same position. That can seem silly, but because the camera now has collisions and detects nearby objects, it could pick a better location with fewer collisions, switching the frame, which doesn't look good. Now, the camera keeps the framing and adjusts the focal length to fit all the actors in the frame.

On the other hand, AI now shares core behaviors for different enemy types, such as discovering dead fellas and warning other enemies.

I also improved the aiming and shooting system, including headshots, which are very satisfactory.

So that was all the progress since the last devlog. I hope you like it. On the other hand, Lobo is on Steam, so please don't forget to add it to your wishlist if you like it, and if you want to support me further, I created a Ko-fi page where you have special perks and exclusive content.

As always, thanks so much for watching and see you in the next devlog! Bye bye!

Source

Steam News / 19 July 2024

Open original