##############################################################################
SDL::App::FPS:
2002-12-25 v0.01 Tels - 3 tests (not released)
* rewrote test.pl into package SDL::App::FPS complete with doc and a testfile
* features:
- option handling
- framerate monitor
- time warp (slow motion, fast forward, even clock going backwards)
- event handling after each frame
- framerate cap, with sophisticated delay to acocunt for timer inaccuracies
- object oriented approach, subclassable
* added sample subclass and testfile
2002-12-26 v0.02 Tels - 8 tests (15:30)
* added $VERSION
* made into a proper package for easier handling
* added quit() to quit application from draw_frame() or anywhere else
* added fullscreen() (still needs some work)
* added can_ok() test to test for methods to exist
* added tests for pre_init_handler(), post_init_handler() and quit_handler()
* added test for framerate cap
* require SDL version 1.18.0 (since 1.19.x is not yet on CPAN)
* added ramp_time_warp(), stop_time_warp_ramp()
* added freeze_time(), thaw_time()
2002-12-26 v0.03 Tels - 11 tests (19:50)
* added time_is_frozen(), time_is_ramping()
* added pause() to pause application until some or an specific event occured
(the SDL_QUIT event will always end the pause and then the application)
* added examples/ with Kcirb.pl and subclass for it
* main loop ends when $self->{quit} is true, to avoid hanging at end when
there are no more events
* moved post_init_handler() after initializing $self->{now} et al.
* renamed update() to next_frame() and added update() to call {app}->update()
* added app(), width() and height()
* added min_fps(), max_fps()
* added min_frame_time(), max_frame_time()
2002-12-26 v0.04 Tels - 41 tests (22:35)
* moved bugs from TODO to BUGS
* the event we wait in pause() for is put to handle_event(), too.
* added support for timers via SDL::App::FPS::Timer and add_timer(),
get_timer(), remove_timer(), timers() as well as expire_timers()
* added a timer example to the example application, it now spawns a new
rectangle every 3 seconds.
* re-ordered METHODS in FPS.pm: move the automatically used methods to bottom
* added tests for Timer.pm
2002-12-27 v0.05 Tels - 50 tests (1.35)
* timers can have additional arguments to callback, test for them
* timers allow negative target time and negative delay time
* fixed: add_timer() really add timer, instead of replacing the first one
* timer take a 'rand' argument to randomize their times (not used yet)
* pass overshot value to timer callback
* fixed README
* don't start time warp ramp if we are already at the target warp
* randomize rectangle sizes in example application
* add "shots" to example application (shows nested timers with overshot
correction!)
* added key 'b' to example application, wait for some action, then try it!
2002-12-27 v0.06 Tels - 50 tests (23:43)
* coded the delay() routine in XS, so that the example app only spents about
4% of it's time in next_frame(), not 12%.
* remember timer's next $next_check so as to not check them too often
(example app saves a few % by calling expire_timers() only about half as
much as in v0.05)
* disable next_time_check when adding or removing timers (w/ nesting)
* optimized the example application to cache the SDL::rect objects for each
rectangle. While capping at 40 fps it uses about 50% CPU, even when there
are about 40 rectangles on the screen. v0.05 would start using 100% CPU
starting from only 20 or so rectangles onwards.
2002-12-28 v0.07 Tels - 70 tests
* Changed the event handling framework:
added add_event_handler(), SDL::App::FPS::EventHandler (with new(),
rebind(), check()), and del_event_handler().
Overriding handle_event() no longer necc., removed handle_event(), and
changed example app to use this.
* timer check that rand value is smaller than abs(time) and abs(delay)
* wiggle timer time and delay based on rand value
* added in_fullscreen() to check current fullscreen status
* fullscreen() takes argument to switch to fullscreen or windowed mode
(instead just toggling) and returns current status
* tests for random timers and fullscreen stuff
* added a big section on why, how, time warp, ramping, event handlers and
timers to the pod in SDL::App::FPS
* renamed remove_timer() to del_timer() and documented it
* tests for del_timer()
* fixed get_timer() and test for it
* renamed example application to "demo"
Please send me test-reports, your experiences with this and your ideas - I love
to hear about my work!
Tels <http://bloodgate.com/>