debian man page for sdlx::fps

Query: sdlx::fps

OS: debian

Section: 3pm

Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar

SDLx::FPS(3pm)						User Contributed Perl Documentation					    SDLx::FPS(3pm)

NAME
SDLx::FPS - a more convenient way to set a framerate
SYNOPSIS
use SDLx::FPS; my $fps = SDLx::FPS->new(fps => 60); while(1) { # Main game loop # Do game related stuff $fps->delay; }
DESCRIPTION
SDLx::FPS simplifies the task of giving your game a framerate. Basically, it combines the methods of "SDL::GFX::Framerate" and "SDL::GFX::FPSManager" into a single module. Use it to delay the main loop to keep it at a specified framerate.
METHODS
new my $fps = SDLx::FPS->new( fps => 30 ); No arguments are required, if no "fps" is specified, the default FPS is 30. set $fps->set($new_framerate); Same as "SDL::GFX::Framerate::set". Set the new desired framerate. get Same as "SDL::GFX::Framerate::get". Get the currently set framerate. delay Same as "SDL::GFX::Framerate::delay". Generate a delay to accommodate currently set framerate. Call once in the graphics/rendering loop. If the computer cannot keep up with the rate (i.e. drawing too slow), the delay is 0 and the delay interpolation is reset. framecount Return the "framecount". rateticks Return the "rateticks". lastticks Return the "lastticks". rate Return the "rate".
AUTHORS
See "AUTHORS" in SDL.
SEE ALSO
SDL::GFX::Framerate, SDL::GFX::FPSManager perl v5.14.2 2012-05-28 SDLx::FPS(3pm)
Related Man Pages
sdl::cookbook::opengl(3pm) - debian
sdl::mpeg(3pm) - debian
sdlx::app(3pm) - debian
sdlx::controller::interface(3pm) - debian
sdlx::controller::state(3pm) - debian
Similar Topics in the Unix Linux Community
Warsow 0.4 (Default branch)
LOVE 0.1.1 (Default branch)
Warsow 0.41 (Default branch)
Tennix! 0.6.0 (Default branch)
FreeBASIC 0.18.5b (Default branch)