Thank you for your reassurance Erel.
The following is a slightly modified Sprite example provided with B4PPC for learning purposes.
In the App_Start I set cw.direction to 0 and x,y to 48,76. cw.velocity=1, Then I move one pixel in X each tick. The sprite moves perfectly and the watch shows the correct x,y including the target 176,76 and beyond.
I cannot see that putting the test after the tick would have an effect.
Sub Timer1_Tick
gw.Tick 'VERY IMPORTANT: causes the GameWindow to advance to the next step.
tick = tick + 1
If tick Mod 50 = 0 Then gw.DeleteMarkedSprites
If cw.IntersectsPoint(176,76) = True Then cw.direction = 90
End Sub
[EDIT]
I have put the intersect line in the walking sample and it doesn't work, however, without pressing any buttons, just stepping the code, it changes direction of its own accord at x=161 which is not the edge of the screen. ( If it is then I can't see where it has been set) Even so 156 is < 161
I must be missing something here.
I set direction to 0 and sprite.x to 90 and sprite.y to 76
Sub Timer1_Tick
'Manually change the current frame.
'sprite.CurrentFrame = (sprite.CurrentFrame + 1) Mod 8 + 8 * direction
'If sprite.IntersectsPoint(120,100) Then form1.Text = sprite.X & " " & sprite.Y
If sprite.IntersectsPoint(156,76)=True Then sprite.direction = 90
gw.Tick
End Sub
Any pointers please?
[EDIT-1]
Weirder still, if I simply change the number 76 to 77 in intersects line in the above code the sprite starts in direction 270, change it back to 76 and it reverts to direction 0
Now I am baffled.