Chaos Project

RPG Maker => RPG Maker Scripts => Script Troubleshooting => Topic started by: fjurio on December 07, 2010, 09:51:19 am

Title: Alternative Wait - Does it work?
Post by: fjurio on December 07, 2010, 09:51:19 am
For special reason a rewrite the random movetype.

I don´t wish that the event moves often. So i made this:
Spoiler: ShowHide

      case rand(400)
        when 0..3  # Random
          move_random
        when 4  # 1 step forward
          move_forward
        when 5..399  # Temporary stop
          @stop_count = 0
      end


Now i notice that the time between the movements depends by the cpu-speed of the computer.
How high would the difference be between a fast and a slow computer. Are they marginal?
Title: Re: Alternative Wait - Does it work?
Post by: Blizzard on December 07, 2010, 10:53:00 am
Speed in the game doesn't vary. This will effectively work the same way on a slow computer as it does on a fast one. The difference is that a slow computer will render the frames slower in general.
Title: Re: Alternative Wait - Does it work?
Post by: fjurio on December 07, 2010, 11:52:27 am
So actually you can´t say 40 frames are one second because this depends on your computer. I have it right?
Title: Re: Alternative Wait - Does it work?
Post by: ForeverZer0 on December 07, 2010, 12:06:51 pm
No, 40 frames is still a second, if the computer can't keep up, it will appear jerky. That's what lag is.
Title: Re: Alternative Wait - Does it work?
Post by: Blizzard on December 07, 2010, 12:08:37 pm
Actually you can count on the fact that if 40 frames are not exactly one second, the whole game will slow down and everything will still be consistent. Basically you should always be calculating as if 40 frames are one second and not worry about everything else. (Keep in mind that event frames are slightly different and in events 20 frames are 1 second.)
Title: Re: Alternative Wait - Does it work?
Post by: fjurio on December 07, 2010, 12:17:40 pm
Ok, that calms my sorrows. Thanks.