Continuous tasks and code redundancy

One day one implements, say, propulsion system that can accelerate/deccelerate/rotate one’s ship based on given order. The other day one implements a nice “moving to given point” method that gives orders like accelerate → move at constant speed & rotate to given direction → deccelerate. The third day one wants to add more complicated task like, say, patroling: “moving to p1” → “moving to p2” → “moving to p3” → loop Every time one wants to use the same nice “moving to given point” code. So component receives a transient field that indicates just inner state of the system, number of checks in method grows…

One just can’t get rid of imperative thinking or what?

“moving to a given point” doesn’t sound like it’s own thing outside of AI to me… it’s a fundamental thing almost at the level of steering. Like, I can’t think of a single case where “move to point” makes any sense outside of some other behavior.

So perhaps I don’t understand enough about the problem yet.

1 Like

So it might be put at wrong level you say… point, I’ll think of it, thanks.