The following is the changelog for the AI scripts that I've spent the quarter working on.
3:35 PM 1/15/2014
I have absolutely no idea why it never occurred to me to update and record revisions like this until now.
v1.0
Added:
AI searches for targets. Upon hitting a wall, it will adjust direction left or right depending on which is
closer to target.
-Attack rate. Small timer that allows adjustment to how fast the enemy can attack.
- Enemies now stop if they're about to walk off a cliff. If they're making sharp turns around a corner, they
might still blunder over a ledge, though; not much I can do about that at the moment with this particular method.
v1.1
Added:
Enemies now update targets again; they'll (presumably) stop if target lost (or killed), and will change targets if attacked.
Hopper code begun.
Hopper stops when inside attack range, and turns to face target. Hopper pauses outside of range, then lunges at target.
Enemies now correctly shoot projectiles. (Eugine)
Enemies now correctly use ramps. Going up ramps is slow due to current physics, but enemies will go down them if their target
is on the ground and below them.
v1.2
????
v1.3
- Hopper attacks now wait for attack animations to quit playing before moving to next state/etc.
- Hopper now has the intended behavior for which it was designed: It approaches players, leaps in, attacks, and leaps outward.
- Juggernaut functionality in. Currently broken because turning off personal gravity makes every OnGround check return true. When Eugene fixes that, this will work fine.
- Wisp functionally implimented, waiting on ability to detonate when hit.
- Code structuring partially implimented
v1.4
- Bot objects updated for rigid bodies (by Eugene)
- Juggernaut now correctly falls [Eugene fixed personal gravity bug.]
- Juggernaut's stomp/slam ability implimented and functional, but currently does not wait for animation to finish.
- Enemies now have differing sizes and textures. These textures are literally me just throwing existing textures on top of them because I don't know how to make new ones from scratch yet. But it's enough for visual distinction between enemies, especially considering that the resizes and textures exist to show differentiation between enemies until we get the actual enemies in the game anyway.
11:34 AM 2/10/2014
v1.5:
- Bots no longer stare into the void when they find a cliff, again. Reducing the amount the moveDir is reduced by fixed this; this implies the cutoff Eugine implimented to get an enemy to stop using their movement animation when their moveDir is really small actually physically makes their movement zero, rather than simply using the idle animation.
- Bot scripts now extend from main AI script. Main AI script houses standard AI functions - movement, obstacle and pit detection, and so on - while the scripts for individual enemies now exclusively handle their individual behaviors.
- The basic low-level enemy is now BasicEnemy. TestEnemy still exists and has not been removed to avoid it breaking some levels, but be advised that it won't use updated movement/AI code.
3:03 PM 2/11/2014
v1.6:
- bots now use materials again for visual distinction.
- Found bug where bots will walk off cliffs sometimes because their Y coord is juuuust slightly different from their target's. This is because receiving knockback pops them up in the air, and when they land their y coord is slightly different. Fixed this by adding a threshold - Enemies will now only ignore collision in front of them and the absence of ground below them if their target is half a meter above or below their position.
- Bots now face their targets independantly of the direction in which they're moving, (the aiming code is in CHR_PHY, and the actual line is AimAt(GameObject);) This is a large first step for more advanced movements. Next step is looking into switching around between local and global positions and movement. Actually getting them to /stop/ facing something is unknown; maybe just send it a null?
- Because of the new facing code, EndMove can be called to nuke moveDir without locking its rotation, meaning we don't have to divide moveDir by a rediculous number to get it to stay in place, which in turn means the visual issue of enemies moving in place no longer exists.
- Bug found where enemies would seemingly randomly stop moving, permanently. Bug was in bFaceTarget incorrectly turning itself off; bug fixed.
- Juggernaut now makes sure target is on ground before jumping at they ass.
- Snatcher functional. Movement is slightly wonky and needs refinement; jumps towards, and if it misses, it hops straight up, then loops. When it collides with a player, it'll start syphoning EXP from whoever it's attached to. This exp goes into a pool, and whoever kills the snatcher gets its base exp plus all the exp it syphoned.
- Basic ranged enemy fixed, and now attacks at range like it's supposed to.
- Sandra will shoot her boomerang, but the boomerang goes flying over the target and does not return. Also too fast.
- Wisp uses damage radius, and no longer does stupidly absurd amounts of knockback.(Seriously, how'd it get put to 70? O_o)
- Juggernaut's knockback now knocks slightly less upward.
5:08 PM 3/4/2014
v1.7
- Enemies now have a tentative wandering thing. If idle, and without a target, they'll move in a random direction for a random duration every so often. Bug found in that discovering a pit will have them stuck and staring at it. Rotating the enemy them to the direction in question fixed this. Will sometimes wander off cliffs; not entirely sure why as of yet.
- various AI tweaks regarding attack speed, damage, knockback, etc.
- Kinematic to false for ragdolling. Animations need to not play to work. Ragdoll wizard sets up colliders; remove them. No gravity.
No comments:
Post a Comment