title: Function pointers and their called parameters
body: <p>This may be the wrong approach, but as I dig deeper into developing my game engine I have ran into a timing issue.</p>
  
  <p>So lets say I have a set of statements like:</p>
  
  <pre><code>for(int i = 0; i &lt; 400; i++)
  {
       engine-&gt;get2DObject("bullet")-&gt;Move(1, 0);
  }
  </code></pre>
  
  <p>The bullet will move, however, on the screen there won't be any animation. It will basically "warp" from one part of the screen to the next.</p>
  
  <p>So, I am thinking...create a vector of function pointers for each base object (which the user inherits from) and when they call "Move" I actually don't move the object until the next iteration of the game loop.
  So something like:</p>
  
  <pre><code>while(game.running())
  {
       game.go();
  }
  
  go()
  {
       for(...)
            2dobjs.at(i)-&gt;action.pop_back();
  }
  </code></pre>
  
  <p>Or something like that, and this way it runs only a single action of each object during each iteration (of course I'll add in a check to see if there is actually "actions" to be ran).</p>
  
  <p>And if that is a good idea, my question is how do I store the parameters. Since each object can do more than a single type of "action" rather than move (rotateby is one example), I think it would be nonsensical to create a struct similar in fashion to:</p>
  
  <pre><code>struct MoveAction {
       MovePTR...;
       int para1;
       int para2;
  };
  </code></pre>
  
  <p>Thoughts? Or is this the completely wrong direction?</p>