那就另找士兵?
那是每一round運算時間是2xnxm,現在是<2xnxm
可能能降低至nxm,快了一半。
那就用第二種方法吧。
可能的bug?目標死了,那就另找目標吧。
需要雙方都有這個尋找嗎?還是一方就行?
因為近是雙面的,你離a近代表a離你也近。
那就。。
電腦依靠玩家士兵的距離感來決定該殺誰?
bug可能出於次序問題。
1. a find path
2. if the old distance is same or shorter, just remain. else, find a new one.
3. a walk, random at walk up or left
4. yeah, b gotta find path too, otherwise, there must be bug
then the sequence of units is another problem now.
it cannot say all units attack together.
the sequence base on the sequence of putting units.
if defense, then how?
the athogithm of defense is base on grid.
that need recursive function.
yeah, that will work.
and then the computer's ai?
how to put units?
i guess i will give it limited numbers of units.
actually players vs me.
and then the campign story?
that needs lots of drawing.
沒有留言:
張貼留言