Re: Map Engine and Sprite Engine for Sphere v2 - Plan
Reply #20 –
Interface indecision...
So for queuing movement commands what should the interface be?
There will be a function that will pathfind to a specific location and then queue movement to follow the path.
But what about an interface for directly queuing specific moves?
My current method is this:
SEngine.entity_Id["Jeff"].queue.push({direction:"west",ticks:10});
Is that sort of approach good or should there be a function of some kind - I just can't see what value the function would add.
Edit: Generalising the above point I'm thinking about how much store I should set by making the engine have nice function interfaces, e.g. I added the following earlier:
SEngine.prototype.Idle = function()
{
return (this.waiting == this.entities.length);
}
Which is a function some people would probably find helpful BUT - if I explain some of the systems internal variables that sort of check can be in-lined very easily without the function overhead, thoughts?