Search:

Type: Posts; User: Norm

Search: Search took 0.11 seconds.

  1. Replies
    9
    Views
    2,371

    Re: Grid movement randomly not working

    There are usually more than one way to solve a problem.
    Simpler is often better.
  2. Replies
    9
    Views
    2,371

    Re: Grid movement randomly not working

    How else would you change the movement into the next postion if it was past where you want it to stop?

    I did not say to continue using the % 32 logic. Perhaps that is not the way to recognize...
  3. Replies
    9
    Views
    2,371

    Re: Grid movement randomly not working

    Look at the logic where you change the x,y values for a move.
    Check if the new position will cross a boundary and if the movement should stop.
    If it should stop, set the new location to be on the...
  4. Replies
    9
    Views
    2,371

    Re: Grid movement randomly not working

    Look at your logic to see if the image's next movement will go past the bounds of the grid and stop its moving at that point. For example if it is at 31 and moves by 2 it will skip over 32.
    So...
  5. Replies
    9
    Views
    2,371

    Re: Grid movement randomly not working

    You need to debug your code to see what is happening.
    Add some printlns to show the values of the variables as they are changed and as they are used to move the image.
Results 1 to 5 of 5