Not NaNo Day 22

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.

cocos2d enemy attack.gif
Enemy appearing to attack a unit. It’s a fluke, not the intended behaviour. In the game it also doesn’t cycle, it goes the one spot and stops.
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s