For special reason a rewrite the random movetype.
I don´t wish that the event moves often. So i made this:
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?
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.
So actually you can´t say 40 frames are one second because this depends on your computer. I have it right?
No, 40 frames is still a second, if the computer can't keep up, it will appear jerky. That's what lag is.
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.)
Ok, that calms my sorrows. Thanks.