############################################################################## SDL::App::FPS - base/parent class for frame rate centric SDL applications This base class can be easy subclassed for your own projects. It is a basic building block for building SDL applications that need a fast framerate with event handling before each frame. In examples/, there is a complete example to show you the features. Features ======== * Framerate monitoring, so you can adjust the scene complexity in real-time * Capping the framerate, even with the inaccurate timer delays * event handling in between frames (very fast response to user action) * decoupling of the animaition speed from the framerate by using an extra clock (meaning the animation has the same speed, independed from the current frame rate) * time warp of the clock (see above): the clock can be warped by a factor, which can even be changed on a frame-by-frame basis. This allows effects like slow motion or fast forward, complete with ramping (e.g. slowly slowing down). * has timers that are syncronized with the warped clock and only expire at the start of each frame (and not in-mid frame). Their overshot value still allows you to determine the exact time the timer should have fired, so you can correct for this. This setup allows you to get away without any locking or worry about the simulation code removing and object that is currently drawn or something along these lines. Installation ============ * You need at least SDL for Perl and SDL itself from . * untar/ungzip the package (replace 0.02 with the version you got) tar -xzf SDL-App-FPS-0.02.tar.gz * Check the signature. Download my key from http://bloodgate.com/tels.asc or from my CPAN directory. Then do in the build directory (where you unwrapped stuff): cpansign -v * if the signature verifies OK, proceed. Otherwise NOTIFY ME IMMIDIATELY. Do NOT INSTALL THE PACKAGE! Your system might get compromised! * Build the make file: perl Makefile.PL * Make the project make * Run the tests: make test * If some tests fail, please notify me. * If all tests pass, install as root: su [enter password] make install exit Go to the example/ directory and run the example application for fun. Enjoy! Usage ===== Look at the files in t/ (MyFPS.pm and myfpm.t) and the example app for how to use it. Please send me test-reports, your experiences with this and your ideas - I love to hear about my work! Tels