Early testing in trying to come up with something abit more advanced than the current line of sight system that comes by default with the engine. It works good in open planes but on multi-floor environments or maps with alot of corners and clutter it's very easy to get lost (for the enemies).
The solution is to keep track of every waypoint near the player based on distance, the closest one is what you see this red arrow pointing at as the player moves around on the map.
Next was make a special enemy type called 'WaypointEnemy' which for now won't attack us for testing purposes. But he will start to follow you if you make him take damage at all. We have it setup to actually attack the player but after having worked on this for 3 days I forgot to turn them back on...
Long story short when I shoot our new friend he chases me to the ends of the earth. He will pursue inside of buildings, outside when trying to hide in a garage. The next step we think will have to be something like adding special waypoints so enemies know where cover is, health, weapons, etc.
Looking past that I would say maybe making other enemies self-aware of other enemies on the same waypoint system so they can work together. This could prove interesting to see zombies trying to flank the player or block his exits, run away and get help, get a biggger gun, etc.
This was a good first step I think in making the enemies in Episode 2 and beyond not as dumb the first time around. :)
Would set up a navigation mesh instead of using waypoints way more realistic ;) but still you did a very nice job :D
lRever 1 year ago
@lRever When we built this we did not know about nav mesh and now we do, so talk about re-inventing the wheel we are still in the process of phasing this tech out but it's interesting how we came to some of the same solutions.
CrystalStudio 1 year ago
Now for LOS and Waypoint.
Jimmg3point0 1 year ago
@Jimmg3point0 LOS?
CrystalStudio 1 year ago