The game loop is just that: a loop.
简单来说,游戏主循环就是一个循环过程。
何为游戏循环?
This sequence is handled through the game loop.
这序列就是通过游戏循环来实现的。
The game loop is the heartbeat of every game, no game can run without it.
游戏循环就像心跳,没有游戏能离开它。
Just like I said in the introduction, the game loop is the heartbeat of every game.
正如我在介绍中所说,所谓游戏循环就是每个游戏的心跳。
But fear not, because you have just stumbled upon the one and only article that gives the game loop the attention it deserves.
但别担心,因为你正好遇到这篇文章,这是唯一一篇给予游戏循环应有重视的文章。
The game loop is just a series of procedures for getting input and displaying output to the player and updating the game.
游戏环节是一个系列的过程,目的是为了让玩家可以输入并显示信息给玩家,以及可以更新游戏。
In this article I will not go into details on any of the above mentioned tasks, but will concentrate on the game loop alone.
在本文我不会深入前面提到的各种任务的详细实现,而是专注于游戏循环这一点。
When running on slow hardware, the framerate can drop until the game update loop will reach MAX_FRAMESKIP.
但运行在低速的硬件下时,帧速率会下降直到游戏更新循环抵达MAX_FRAMESKIP。
The problem with this simple loop is that it doesn't handle time, the game just runs.
这个简单循环的问题在于它忽略了时间,游戏仅仅在运行。
With this kind of game loop, the implementation of update_game will stay easy.
在这种游戏循环下,update_game的实现能保持简单。
But a slow frame rate shouldn't interfere with the updating of the game. The way to achieve this is by using the following game loop.
而一个低的帧速率不应该妨碍游戏的更新。
Another implementation of a game loop is to let it run as fast as possible, and let the FPS dictate the game speed.
另一种游戏循环的实现就是让其尽可能快地运行,然后让FPS控制游戏速度。
The action of the game, which includes moving graphical objects around the screen and polling for user input, is synchronized by the built-in XNA game loop.
游戏的行为,包括在屏幕的周围一些移动的图像对象,还包括一些等待用户的输入,在XNA这些都可以做到同步。
A possible solution for this could be to keep updating the game at that rate, but reduce the rendering framerate. This can be done using following game loop.
一个可行的解决办法是保持更新的速度,而减少渲染的帧速率。
Now we have started our main program loop, the part of our program which will repeat over and over checking for updates to the game.
现在开始我们程序的主循环,这一部分将反复的更新信息和检查按钮状态等。
Structurally, the loop is very simple. The above snippet of code can encapsulate the entire workings of your game.
从结构上来说,这个主循环非常简单。上面的代码片段基本上能够囊括你的游戏的整个工作过程。
When using a variable-step game loop, you should express rates—such as the distance a sprite moves—in game units per ms.
当使用可变步长的游戏循环时,你将要表示游戏单元每毫秒的值,比如一个精灵移动的距离。
It's possible that the player might have the fire button down in one part of the event loop and not in another, so you must sample at the same point you read the input for the game normally.
其可能造成的结果是游戏玩家在游戏事件循环的某一部分按下了发射键,而在另一部分却松开了它。所以必须在同一处进行采样与读入输入。
The explicit closed-loop Nash equilibrium solution reflected the rational behavior in the dynamic game, so the research on it also has important practical significance.
由于显式闭环纳什均衡解反映了理性人在动态博弈时的行为方式,因此关于它的研究也具有重要的实际意义。
Each time through the loop, we perform game logic updates, input updating and handling, and rendering.
在每次进入循环的时候,我们会执行游戏逻辑的更新,输入更新与处理,还有渲染。
Making the game state independent of the FPS seems to be the best implementation for a game loop.
基于恒定游戏速度的FPS的主循环实现方案简单易学。
Making the game state independent of the FPS seems to be the best implementation for a game loop.
基于恒定游戏速度的FPS的主循环实现方案简单易学。
应用推荐