In main loop of PSM app:
public static void Main(string[] args)
{
Initialize();
while (true)
{
SystemEvents.CheckEvents();
Update();
Render();
}
}
we are not actually controlling cycle length. I guess the delay is implemented internally in
SystemEvents.CheckEvents()
function since it's the only one that is no defined by us. My questions are:
- Is my assumption right about how refresh rate controlled in app?
- Is there any function (or app setting) in SDK that allows to set refresh rate to any other than 60 fps?
Answer
The PSM documentation for CheckEvents()
says:
Checks for system events and updates the system state.
This is not related to framerate, but for handling application minimizes and maximizes via the PS button.
Now, for Update
and Render
, you will notice that you are implementing both those functions. In the sample PSM application, Render
will eventually call GraphicsContext.SwapBuffers()
. SwapBuffers
will wait for a retrace to actually swap the buffers, so it is the one that is actually capping your framerate.
I think the Vita goes at 60fps, but it's probably better if you don't take any guarantees, and update your frame logic at whatever framerate makes the most sense for your game, calling 0, 1 or more logic updates per graphics frame.
That's how I make my games, regardless of the platform.
And no, you can't change the display framerate on the vita.
No comments:
Post a Comment