Xojo Conferences
XDCMay2019MiamiUSA

Down or Right movement (Real Studio games Mailinglist archive)

Back to the thread list
Previous thread: SpriteWorld in RB
Next thread: Spritesurface and speed of display drawing


[ANN] Preview of RBD 2.4   -   Marc Zeedar
  Down or Right movement   -   Eric Richards
   Re: Down or Right movement   -   Joseph J. Strout
    Re: Down or Right movement   -   Eric Richards

Down or Right movement
Date: 19.01.05 23:53 (Wed, 19 Jan 2005 22:53:33 GMT)
From: Eric Richards

Hi -

Well I've discovered that now the knight only can get
stuck (on occasion) by a few pixels when running and going down or right. It doesn't have any problems with up or left.

Well I'm stumped.

Doesn't make sense why it effects right or down but not
up or left.

Eric



___________________________________________________________________
Speed up your surfing with Juno SpeedBand.
Now includes pop-up blocker!
Only $14.95/month -visit http://www.juno.com/surf to sign up today!

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Re: Down or Right movement
Date: 20.01.05 00:05 (Wed, 19 Jan 2005 17:05:33 -0600)
From: Joseph J. Strout
At 10:53 PM +0000 1/19/05, Eric Richards wrote:

>Doesn't make sense why it effects right or down but not
>up or left.

You have separate code for each direction. I can easily imagine a
bug in some directions but not others. There will be no shortcut for
stepping through your code, line by line, and carefully thinking
about what it is doing at each step.

Best,
- Joe

Re: Down or Right movement
Date: 20.01.05 02:10 (Thu, 20 Jan 2005 01:10:48 GMT)
From: Eric Richards

>>Doesn't make sense why it effects right or down but not
>>up or left.

>You have separate code for each direction. I can easily imagine a
> bug in some directions but not others. There will be no shortcut for
>stepping through your code, line by line, and carefully thinking about
>what it is doing at each step.

At the moment I don't see the problem with having separate code,
perhaps a bit more coding, but you have more experience than I.

Well I've been examnining the code and doing a lot of thinking about it.
I'm even dreaming about coding....ok its not that bad yet. ;-)

The hard part is when it only happens with down or right and doesn't
always happen. Which makes stepping throught code difficult.

Humm I just thought of something, just off the top of my head.
Perhaps instead of separate code, maybe this -

if shiftkey then
runspeed = 4
else
runspeed = 0
end if

If "up" then
MY = My - 4 - runspeed
elseif "down" then
My = My +4 + runspeed
elseif "right" then
MX = MX +4 + runspeed
elseif "left" then
MX = MX -4 - runspeed
end if

If "object" in way then

else
Knight.y = MY
Knight.X = MX
end if

___________________________________________________________________
Speed up your surfing with Juno SpeedBand.
Now includes pop-up blocker!
Only $14.95/month -visit http://www.juno.com/surf to sign up today!

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>