Hey. Sorry for not posting on my blog so much, but I've still be plugging away at Soldier Of. I've implemented a few things since my last post, actually.
One thing that I am still working on implementing is a good stealth system. Enemy guards can now patrol the area, as well as navigate around the environment to follow the player. The current implementation involves a series of nodes that I place on the map - each node is connected to each other node if there's a clear shot. This makes a map, or web, as each node is connected to at least one other node.
If a guard needs to go from one point to another, it first finds the nearest node that it has a clear shot to (uninterrupted by walls), and the nearest one to the desired end point. Then it finds the first path that works from the nodemap. It works alright, though may not be 100% accurate. I'll have to keep working at it.
Guards also follow the player around the environment, avoiding walls and obstacles while shooting and running directly at the player if he's got a clear shot. So, be sure to have cover and not go out in the open unless you're really ready.
The guards seem like they might be really following you around too
diligently, but I'm not sure. Maybe I'll make 'em easier going. After implementing this system of stealth with nodemaps, I'm thinking that it might have been easier to just implement a set of nodes that the player drops when he moves around. If an enemy finds him, they can just navigate using his nodes. I think I might just need to tweak the current way it works to make it better, though.
Also, I added an actual cone of vision (it's actually more of a rectangle) for the enemy guard robots. If you're behind them, then they won't see you, but if you cross their path, then they'll be on you for sure. Before, they would just detect you if you got close enough (that could be a good enemy, actually).
Another thing I added was grenade awareness to enemy guards. Now, if they're near a grenade when it hits the ground, they'll be onto you. I probably should make them run away from the grenade, actually. :p
I also gave the sky a darker gradient to give the game some color and imply the time of day better. I probably need to lighten it by a lot, but the principle's there.
Anyway, that's it for now. Thanks for reading and watching this space!