如何在Java中以60 fps限制帧速率? [英] How do I cap my framerate at 60 fps in Java?

查看:541
本文介绍了如何在Java中以60 fps限制帧速率?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在写一个简单的游戏,我想以60 fps的速度限制我的帧率而不让循环吃掉我的cpu。我该怎么做?

I am writting a simple game, and I want to cap my framerate at 60 fps without making the loop eat my cpu. How would I do this?

推荐答案

你可以阅读游戏循环文章。在尝试实现任何内容之前,首先要了解游戏循环的不同方法非常重要。

You can read the Game Loop Article. It's very important that you first understand the different methodologies for the game loop before trying to implement anything.

这篇关于如何在Java中以60 fps限制帧速率?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆