Hi Dajan
just to smile
I have tried to use your tecnique on the same row of calculation and valutation of conditions...
but I have got no good results, my ball stucked when it touched every edge ...
sigh! So I tryed to add IF THEN to see if I have made a bad control of conditions.... but nothing...
So next step I go to trace value of variable on the screen, (for a so little program I don't disturb vWatch) and i see that variables never pass trough the edges!.... Sigh!
then one of mine criticist neuron said me that I have forgotten to test the condition of equality so when variables gained the edge they are not more changed by routine and never went trough the edges so they never have been corrected! And so they stucked the ball.
Naturally I have tried to use condition in calculation and not to simulate physics so don't search for bouncing or gravity effects.
It has been a test to use this tecnique of shrinking.
This is the basic concept
xC = 100: yC = 100: rC = 20: cC = 6
yC
= yC
- 5 * (yC
>= 20 AND yC
<= 460) * (a$
= "W" OR a$
= "w") + 5 * (yC
>= 20 AND yC
<= 460) * (a$
= "S" OR a$
= "s") - 10 * (yC
< 20) + 10 * (yC
> 460) xC
= xC
+ 5 * (xC
>= 20 AND xC
<= 620) * (a$
= "D" OR a$
= "d") - 5 * (xC
>= 20 AND xC
< 620) * (a$
= "A" OR a$
= "a") + 10 * (xC
> 620) - 10 * (xC
< 20)
Thanks to share the idea