Travel back to a Britain full of mirth, myth and magic, in this top-down fantasy adventure RPG! A world is overcome by dark forces, the wheel of the seasons no longer turns, and it's down to you, a true adventurer, to uncover the secrets of the Ley Lines... Wield the wand of light! Throw ghostly <checks notes> gloves..? Attack enemies! Or simply explore, catch bugs, make potions and spend the rest of the day fishing! Maenhîr's beautiful, but deadly, open world lets you explore at your own pace!

Post feature Report RSS Dev Blog: Skullduggery!

More work on NPCs, this time jumping and exploding skulls...

Posted by on

Saturday 13.02.2021

Spent a few hours sculpting a skull. Came out ok, I think.

Sunday 14.02.2021

Finished off the low poly retopo of the skull and textured it in Substance Painter. Yup, that’ll do!

Monday 15.02.2021

The skull’s going to be a pickup/throw item, as well as an NPC.

I started the pickup item first, and noticed that I’d never consolidated how these were done in the blueprint. There was a lot of block-copy-coding in evidence :D

Decided to make the existing throwable pot a base to inherit from and did some tidy-ups in code to make that work. To be honest, it should all be pushed back to the C++ class, but the BP works, and I’m lazy.

Once that was done, I was able to make pickup/throw and destructible versions of the skull, which also react to the sword. Needs audio, and I think I’ll do a little extra and allow you to hoik out their content with the fishing rod, as well… On the TODO list.

The rest of the day was spent in a branch, integration Fluid Ninja Live and playing about to see what it can do. Didn’t work for my initial idea, but I think it’ll do what I want for some of the stuff in an upcoming dungeon.

I’ll come back to that later…

Tuesday 16.02.2021

Only had a couple of hours, today, but I put together the AI controller, and BP for the Skull NPC. Made a start on the first movement AIAction. I want the skull to ‘hop’ toward the player, but I’m not entirely sure how to do it. Or, how to make the character controller jump.

First pass is to lerp to position, pause for a bit, then lerp again.

Wednesday 17.02.2021

Was teaching, so again, only had a little bit of time today… Used it to explore my movement options. On the plus side, making a character jump is as simple as calling the “Jump” function. [IKR?] But, getting it to jump and move to a precise position, using navigation, looks wank, so it turns out that my first idea, lerping, is going to be the best. Durations will always be constant, and I can use a timeline to control the vertical offset to get the sort of hop that I want.

So, after all that, back to where I started…

Thursday 18.02.2021

Made a few behavioural changes to the skull. Now it jumps toward the player if it has line of sight, otherwise it jumps around randomly. If it gets close enough to the player, it screams, spins about, and then explodes, which will result in an area effect. Well, it will whenever I get around to putting damage into the game.

I was dithering about how to handle playing audio and spawning VFX, when it dawned on me; I created a load of delegates for when AIActions change. By adding an additional one for entering an action, I can let the BP latch on, check what the gameplay tag is, and do something. So, if we’re exiting a jump, play the landing sfx/vfx. If we’re entering explode, begin the process off killing the NPC.

This addition meant the AIActions remain generic, which is good. Not that I think I’ll end up re-using this particular set, but as a point of principal…

I have one problem now, which is leaving the spawned particles in the world when I destroy the skull. I thought I’d be able to detach the Niagara component and let it play out, but apparently not, so I think I’ll put the flames on a follow actor… tomorrow.

Friday 19.02.2021

My lazy hack of using follow actors worked. Flames now linger when skulls are smashed. Yup, but whatever.

I want another variation of the skull, that bounces around the room, but I don’t want it to use the existing static collision geometry. I want to confine it to spaces that might have doorways, or gaps.

To do this I’ve added a new physics trace channel, and a response profile. I can place a flat poly in the world that’s visible in the editor (invisible in-game) and set it up to use the new response profile. The movement AI [in the skull] throws out a sphere trace along the channel, detects the invisible poly, and then does its thing. In this case, reflects the movement trajectory.

That shouldn’t have taken all morning, but it did… There’s something about UE’s physics setup that means I always have to do everything at least 3 times. It’s like plugging in a USB stick.

Anyway, I still have a few audio bits-and-bobs to add, but the skulls are very nearly there.

Post comment Comments
bmbr1990
bmbr1990

It looks like it's taken out of Sea of Thieves :D
Well done, you really got some talent dude.

Reply Good karma Bad karma+1 vote
Post a comment

Your comment will be anonymous unless you join the community. Or sign in with your social account: