じ☆ve冰风 发表于 6 天前

Framerate Independence

Framerate Independence





by Jet



Introduction

I've never quite understood why more games don't make themselves framerate independent. This meaning that say, a sprite is supposed to move 1 pixel every frame. You update at 60 FPS. The player, say due to a weak computer, only updates at 30 FPS. This independence from framerate would supplement by moving the sprite 2 pixels every frame instead of 1. This means that no matter what FPS the player is at, frame-based actions should take place in the same amount of time.

Features

- Frame-based actions are synchronized by time

- Plug and play

- That's basically it

Script

http://pastebin.com/raw.php?i=m4sGTgZ1

Credit

Jet

Note

This only applies this effect to the default engine. 3rd party scripts which use frame-based operations may still work at their regular speed instead of framerate independent.


本贴来自国际rpgmaker官方论坛作者:Jet处,因国际论坛即将永久关站,为了存档多年珍贵资料,署名转载到本论坛存档,由于官方帖子为英文原帖,需要中文翻译请点击论坛顶部切换语言为中文就可以将帖子翻译成中文浏览,方便大家随时查看,原文地址:https://forums.rpgmakerweb.com/threads/framerate-independence.2700/
页: [1]
查看完整版本: Framerate Independence