##############################################################################
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"
2002-12-29 v0.08 Tels - 76 tests
* optimized next_frame():
- calc $frame_diff was unnecc.
- shifted a bit more code to XS (calc of new wake_time)
When doing an empty loop (with max_fps set to 500), v0.07 was able to do
about 11000 FPS, v0.08 manages about 23000. (1 Ghz AMD)
* if max_fps == 0, set it to at least 1
* set max_fps to 500 at most (anything above 300 will result in no cap at
all, currently)
* fixed EventHandler::check: don't check if event is inactive
2003-01-01 v0.09 Tels - 109 tests
* added activate(), deactivate(), is_active() to Timer.pm
* added SDL::FPS::App::Group.
* added example on how to sort event handlers in groups, and enable, disable
them in batches
* added a test for timer not beeing due when time_warp == 0 (time frozen)
* tests for new timer features and group
* encapsulate all data of base class SDL::App::FPS inside $self->{_app}
* EventHandler callback can carry additional arguments
* added mandel.pl to examples
2003-01-02 v0.10 Tels - 111 tests
* nit: fixed =NAME to contain 'SDL' for indexing
* PREREQ SDL_perl v1.19.2 since it is now on CPAN
* added LICENSE and CREDITS
* added SDL::App::FPS::depth()
* depth(), height() and width() return cached values for more speed
* fixed: create_window() ignored the user options and always used 640x480x24
* fixed to mandel.pl:
+ fixed and enabled the recursive algorithmn in mandel.pl (takes 48 sec
instead 154 sec on 1 Ghz AMD for first image, even better when zoomed in)
+ fixed time output in mandel.pl, dump some debug output and coordinates
+ zooming in while recursive calc was underway resulted in corruption
+ toggle method: 1 (iterative), 2 (recursive), 3 (recursive with prefill)
2003-01-04 v0.11 Tels - 164 tests
SDL::App::FPS::Thingy:
* added, made Timer, Group, EventHandler and Button use it as base class
SDL::App::FPS::EventHandler:
* cater for SDL_VIDEORESIZE events
* upon rebind, call $app->_rebound_event_handler()
* is now able to watch for 1,2 or 3 different mousebuttons with the same
handler (pass BUTTON_MOUSE_LEFT + BUTTON_MOUSE_RIGHT for instance)
* removed LEFTMOUSEBUTTON, RIGHTMOUSEBUTTON and MIDDLEMOUSEBUTTON
SDL::App::FPS::Button:
* added, use Thingy
* rectangular, circular or elliptic shapes
* watches for mouse in, out, hover, button down/up or click events
SDL::App::FPS::Group:
* use Thingy
* activate()/deactivate() calls activate()/deactivate() of each member
SDL::App::FPS:
* event_handler() no longer exists, so don't use nor document it
* pause() throws away events
* internal methods prefixed with '_'
* added support for option -resizeable
+ add event for SDL_VIDEORESIZE and adjusting width/height in _resized()
* added _rebound_event_handler()
* added BUTTON_MOUSE_LEFT, BUTTON_MOUSE_RIGHT, BUTTON_MOUSE_MIDDLE
* added resize_handler()
mandel.pl:
* rewrote mandel's recursive algorithmn to be simpler, also fixed a bug that
it calculated/draw one pixel too much for every hor/vert. line
* fixed the bug in recursive alg. that left 'holes'
* use watch_event(), support resizable (restart calc upon resize)
* reset point counter when starting new calculation
* use recursive method as default
demo.pl:
* use watch_event(), supports resizable (automatically)
empty.pl:
* use watch_event(), support resizable (automatically)
event.pl:
* use watch_event(), support resizable (automatically)
button.pl and MyButt.pm:
* added a simple click'n'kill game to show SDL::App::FPS::Button usage
2003-01-05 v0.12 Tels - 190 tests
Library:
* fixed all the outstandind issues with Button, all combinations now work
* added: BUTTON_DOWN and BUTTON_UP (for BUTTON_RELEASED and BUTTON_PRESSED)
* documented add_button() in FPS.pm
* added SDL::App::FPS::Color inclusive tests
* fixed stupid definition bug in BUTTON_MOUSE_*
Demos:
* added mouse.pl and MyMouse.pm to show off advanced Button features
* added color.pl and MyColor.pm to show off colors
* mandel.pl shows percentage of already done area in recursive mode
* fixed event.pl (I know should try things before releasing them..)
Please send me test-reports, your experiences with this and your ideas - I love
to hear about my work!
Tels <http://bloodgate.com/>