Welcome, Guest. Please login or register.

Author Topic: Mathmatic genies click here --> a Puzzle needs to be solved!  (Read 2603 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline Wain

  • Hero Member
  • *****
  • Join Date: Sep 2002
  • Posts: 745
    • Show all replies
I may be misunderstanding, but are you saying that the dragon essentially starts completely off the screen, and then animates it's way onto and then completely across the screen until it is completely off again on the other side??

If so, than it's just dragonwidth*2 (for each side) pixels + screenwidth ( which will give you the pixel count of the dragon completely off on each side of the screen, and size of the screen itself)

then take the result and divide it by 200 to see how many pixels the dragon should traverse  per frame over 200 frames.

or, more accurately

(dragonwidth + screenwidth + dragonwidth) / number_of_frames_used_in_crossing

will give you how many pixels each frame should advance the dragon by.

If you already know how far the dragon advances in each frame, and you're just trying to figure out how many frames it will take to get from one end to the other it's

(dragonwidth + screenwidth + dragonwidth) / number_of_pixels_advanced_per_frame

will give you how many frames are necessary to move the dragon from one end to the other, divide that result by the number of frames per step(20) and you'll have the resulting number of steps necessary to get the dragon completely off-screen from one side to the other.

It is also quite possible that I have completely misunderstood your question and am visualizing this improperly.
Professional Expatriate
 

Offline Wain

  • Hero Member
  • *****
  • Join Date: Sep 2002
  • Posts: 745
    • Show all replies
Re: Mathmatic genies click here --> a Puzzle needs to be solved!
« Reply #1 on: July 24, 2003, 06:34:19 AM »
@mdwh2

You are most right, I have lost my mind somwhere, prolly' left it in the wrong pants.

Distance to traverse is only going to be dragonwidth + screenwidth.  

Overall width of the field would be dragonwidth*2+screenwidth,

so, distance to move would have to be dragonwidth + screenwidth / Num_of_frames or pixels depending on what you're trying to accomplish.

\thanks for that mdwh2, I wasn't thinking clearly at the time.


Professional Expatriate