Been too stressed to paint this week due to immigration so did more technical stuff to get my mind off things. I really hope my visa problems dont mess up this job Im supposed to start
I often find programming is a good way to force my mind onto other stuff. So here I deiced to make my parent classes for various npc types in my old game. So far I got the ground, flying, swarms and static units with health systems and simple ai controllers.
This led me to reworking pathfinding. The plugin I bought years ago requires the navmesh to work and was bad in big environments as the whole scene would be calculated in one big batch. Unreals eqs also needs the same nav mesh which doesnt work in ocean environments
This one works by first tracing to the target. If it has a clear path it just adds input to move to the destination. If not It draws a grid around the pawn. At the moment it just selects the farthest point on the grid the pawn can see and goes there. As its just a wander mechanic this is enough for the moment. Later I'll make it a tad bit smarter by seeing if theres a grid point the pawn and distention can see, and chain those two together into a simple path.
The 'correct' way is to make an A* system inside the grid so it can make long chains of paths, but I dont think I'll need anything that smart as fish/birds dont need super precise pathfinding or to interact with super complex environments.
I think a good next step on this is that simple link method above, and then set up a way for these npcs to be loaded/unloaded into a spawnpool and after that put together an env to test more game orient behaviors/animation the code also allows you to swap the skeletal mesh with a niagara system
Id like to also get something like this working in game as it would be a good way to see how smart the system actually needs to be to work in game and would be scary to see in vr.
Replies
I often find programming is a good way to force my mind onto other stuff. So here I deiced to make my parent classes for various npc types in my old game. So far I got the ground, flying, swarms and static units with health systems and simple ai controllers.
This led me to reworking pathfinding. The plugin I bought years ago requires the navmesh to work and was bad in big environments as the whole scene would be calculated in one big batch. Unreals eqs also needs the same nav mesh which doesnt work in ocean environments
This one works by first tracing to the target. If it has a clear path it just adds input to move to the destination. If not It draws a grid around the pawn. At the moment it just selects the farthest point on the grid the pawn can see and goes there. As its just a wander mechanic this is enough for the moment. Later I'll make it a tad bit smarter by seeing if theres a grid point the pawn and distention can see, and chain those two together into a simple path.
The 'correct' way is to make an A* system inside the grid so it can make long chains of paths, but I dont think I'll need anything that smart as fish/birds dont need super precise pathfinding or to interact with super complex environments.
I think a good next step on this is that simple link method above, and then set up a way for these npcs to be loaded/unloaded into a spawnpool and after that put together an env to test more game orient behaviors/animation
the code also allows you to swap the skeletal mesh with a niagara system
Blockout