old games play too fast

Ask a Question related to Macromedia Director Lingo, Design and Development.

  1. #1

    Default old games play too fast

    With the much faster CPUs of today, many of the older games we had developed several years ago are unplayable. Does anyone know how to control this? I took a class several years ago and vaguely remember a command in a moviescript. Something like cpuHogTicks.

    What are you guys doing to control this?

    Joe


    tevadar webforumsuser@macromedia.com Guest

  2. Similar Questions and Discussions

    1. Shockwave installed, but cannot play games anywhere?
      I tried the "see if your shockwave has successfully installed" page here in the adobe website, and it seems to be working perfectly. However, I am...
    2. XP restricted accounts cannot play Shockwave games
      I have Windows XP SP2. My children have their own accounts in my PC. Their XP accounts are of type 'Restricted user'. My own XP account is...
    3. New Shockwave Version won't play Games
      I get these errors when I try to run 3D Billiards at http://www.shockwave3d.com/: http://www.earthplanet.net/sw_error_1.jpg...
    4. I cant play shockwave games
      When I play a shockwave game it says, Network Error. Please check your internet connection and try again. Also I have tried downloading the software...
    5. Help me play Shockwave games
      When I play a shockwave game it says, connection lost please try again. Or check your internet connection. Also I have tried downloading the software...
  3. #2

    Default Re: old games play too fast

    Suitable coding techniques can make the play speed more consistant.

    Where you have loops animating objects you might add delay times like


    repeat with i = 1 to 20
    waitEnd = the milliseconds
    sprite(10).locH = i * 10
    updateStage
    -- avoids accumlated errors with running waitend
    waitEnd = waitEnd + 50 -- 20 fps speed
    repeat while the milliseconds > waitEnd
    end repeat
    end repeat
    end

    Throttling the score tempo setting back can help, in the old days some
    people had the bad habit of cranking the tempo setting all the way up
    to 60, althought the cpu rendering speed ended up effecting controling
    the speed.
    JB Guest

  4. #3

    Default Re: old games play too fast

    The way to control it is to base your movements on time instead of frame. If
    you do that then the frame rate is irrelevent. As a quick example - say you
    want to move something 500 units in 2 seconds.

    This would be your setup:

    millIncrement = 500 / 2000.0 --how much to move per timeslice
    lastTime = the milliseconds

    Then on every frame - such as in an enterFrame:

    currentTime = the milliseconds
    elapsedTime = currentTime - lastTime

    amountToMove = elapsedTime * millIncrement

    You would then move your sprite, or object, by amountToMove and then
    finally:

    lastTime = currentTime

    to reset the timer... See?
    You just get the amount of time that passes between updates and move your
    sprite by that amount of time multiplied by the amount to move per
    timeslice. Does that make sense? <shameless plug>It's how I did all of the
    animation timing on my xyz*bert game - it doesn't matter if it runs at 20fps
    or 80fps, things still take the same amount of time.
    [url]http://www.blurredistinction.com/dev/xyzbert.htm[/url] </shameless plug>


    PS - I gotta give props to Brian Robbins for his great explanation of this
    to me in the first place, which _finally_ made it sink in...
    --


    Dave
    [url]http://www.blurredistinction.com/director[/url]


    Dave Mennenoh Guest

  5. #4

    Default Re: old games play too fast

    > repeat while the milliseconds > waitEnd
    > end repeat
    NNNNNOOOOOOOO!!!!!

    Blocking out everything else with a repeat loop is, in general, a BAD IDEA.
    Using updateStage in such a fashion will also break other animations, especially
    if they use on prepareFrame.

    Andrew

    Andrew Morton Guest

  6. #5

    Default Re: old games play too fast

    Thank you gentlemen,

    I'll give these a try.

    Now all I have to do is dust the cobwebs off of my lingo skills and get to work :)

    Much appreciated,
    Joe


    tevadar webforumsuser@macromedia.com Guest

  7. #6

    Default Re: old games play too fast

    The framerate in a Director or Flash file is the top limit... frames
    will not play faster than what you specify.

    If those older movies had a very high framerate, one that they could not
    reach on older computers, then they might come closer to executing your
    instructions on faster machines, true.

    jd




    --
    John Dowdell, Macromedia Developer Support, San Francisco CA
    Search technotes: [url]http://www.macromedia.com/support/search/[/url]
    Soapbox column: [url]http://www.macromedia.com/desdev/jd_forum/[/url]
    Daily technical diary: [url]http://www.macromedia.com/go/blog_jd[/url]
    Offlist mail is trapped by spam-filters... best here, thanks!

    John Dowdell Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139