I fixed a small bug that kept enemy units from getting targets to attack. It needs some more work, because now the paths generated will go into a core’s safe area, which is something I’d like to avoid. I’ll probably have the enemy choose a different target if this happens, or wander aimlessly/despawn if there aren’t any valid targets.
But I ran into another problem, one which I already sort of knew existed. Two things don’t seem to be able to move at once. They technically can, but there are some weird issues around it. I don’t know if it’s because it’s happening in a subprocess (I’m not sure how cocos2d works this way) or what, but I’ve been unable to figure out exactly how to fix it. Ideally, I’d like some global tick rate, where things are updated every tick. Slower things might be updated some number of ticks, but the concept is the same.
I’m not sure how to do this with cocos2d, or even if it’s possible to do with cocos2d. I spent quite a bit of time trying to get something working, and not coming up with a good solution, so today’s update is a bit light.