Hey guys sorry in advance if I format this wrong it's my first time posting here. The problem i'm having with my code is the paddle lags maybe about 10 seconds behind the actual input while the ball is in motion. If i comment out the line "move(ball, xvelocity, yvelocity);" which can be found in the while loop "while (lives > 0 && bricks > 0)" about a third of the way down on the code the paddle will move fine, but while its in effect the paddle lags behind. I'm not sure why the balls movement makes the paddle lag, I've tried various things and i can't figure it out. If you know the problem can you please explain to me why this happens i'm very curious to why this happens.

[removed code- academic honesty]

  • 1
    Are you sure that you've compiled the current file? I ran your code and the paddle responds immediately. Possibly you have changed the code but not saved it and you're running a compiled version of an older one, or the code you posted here isn't what you have actually compiled? – Cliff B Jul 23 '15 at 21:14
  • Maybe just your appliance is slow. – i_am_david Jul 23 '15 at 21:16
  • 2
    apparently there is a lag that is, weirdly enough, caused by initBricks. it goes away gradually by reducing the number of rows. this could be a bug in the SPL. I'll try to figure out the reason and report back. – Kareem Jul 23 '15 at 22:27
  • 1
    cool! something new! I look forward to seeing what is causing this, since I couldn't duplicate the problem. – Cliff B Jul 23 '15 at 23:08
  • @CliffB How much memory did you give to the appliance? Maybe if you decrease it you might be able to duplicate it. – i_am_david Jul 24 '15 at 1:32

You must log in to answer this question.

Browse other questions tagged .