Thursday 4 May 2017

Outside the Box Project Beta Work - Move Enemy, Speed Fix (Fix 1)

This was initially a script Chess wrote, however once the role as joint Games Designer began to shift between us, where Chess took on the documentation side of the role and I took over all coding and most gameplay decisions, when it came to fixing some bugs it was up to me to go in and sort them out.

This script in question was made to govern the movements of the enemies from waypoint to waypoint. It did function as intended, mostly. The problem occurred when the enemies would interact with our BubbleWrap defence. The BubbleWrap is designed to slow down the speed variable of the enemies by half, however, instead of the slowing down, the enemies would be pushed back, even into other enemies which wasn't right.

The problem was that the speed variable was being used in calculation to determine the distance the enemy had left to travel to reach the next waypoint. So when we were halving the speed through the BubbleWrapBehaviour script, we were in fact doubling the distance the enemy "thought" it had to travel.

This was fixed with the inclusion of a pathProgress value.



No comments:

Post a Comment