Moving Along

I’m doing AI code, and now the animations almost work. Instead of just running at The Thief they now use one of the preselected animations. Further, I got the system to recognize the different states, so I can more easily see what’s going on. Like the Doc says -> after an attack the default it to go back to En Guarde. Turns out it already does that, so it saves me some time.

I think I need a way for the player to attack if I’m going to build the rest of the defense, otherwise I won’t be able to test it.

…and done. It turns out this created some serious issues made more irritating by my lack of comments in the code here. The animation line up function no longer works. I’ll get the animator to make a longer attack sequence for The Thief to make up for it and help with combat timing. I had forgotten the joy of just rushing in and beating the enemies like invalids. Of course, moving on they will only get smarter and more capable of defending themselves, which is also good in a way. Mostly, I press Attack and attacks happen. It feels smoother already.

Fixed an odd bug. The back up rectangle function failed on the right side for some reason. It’s better now. The issue seems to be that the middle of 150 isn’t 75. If I make a, lets say for the sake of example, a collision rectangle, and place it 75 pixels off of the enemy’s upper left corner, the opposite corner should not be 150 pixels away. You would get a rotten bug like the one described above if you did something silly like that. If you did that, you’d be forgetting the fact that the enemy has something described in some circles as an X dimension. So, 75 on a side plus 60 pixels across for the enemy’s girthiness, gives you a needed space of 195, which is what it is now.

Ah, now they don’t back into wall anymore. That’s a bonus.

Leave a Reply

Your email address will not be published. Required fields are marked *