Alternative Wait - Does it work?

Started by fjurio, December 07, 2010, 09:51:19 am

Previous topic - Next topic

fjurio

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?

Blizzard

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.
Check out our game brands:

Daygames
Game Night Games
Chugnar Games

Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

fjurio

So actually you can´t say 40 frames are one second because this depends on your computer. I have it right?

ForeverZer0

No, 40 frames is still a second, if the computer can't keep up, it will appear jerky. That's what lag is.
I am done scripting for RMXP. I will likely not offer support for even my own scripts anymore, but feel free to ask on the forum, there are plenty of other talented scripters that can help you.

Blizzard

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.)
Check out our game brands:

Daygames
Game Night Games
Chugnar Games

Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

fjurio