SDLx::FPS man page on OpenSuSE

Man page or keyword search:  
man Server   25941 pages
apropos Keyword Search (all sections)
Output format
OpenSuSE logo
[printable version]

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

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.18.1			  2013-09-28			  SDLx::FPS(3)
[top]

List of man pages available for OpenSuSE

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net