NEWS

Path: NEWS
Last Update: Fri Oct 24 21:38:10 -0500 2008

NEWS

Rubygame 2.4.0

Release focus: Events.

Features

  • New Events module, with a suite of new and revised event classes. The new classes offer full functionality as the older classes.
    • Use Rubygame::EventQueue#enable_new_style_events to enable the new event classes. This will become the default in Rubygame 3.0.
    • Uses symbols instead of integer constants for keyboard keys and mouse buttons (e.g. :a, :space, :mouse_left, :mouse_right).
    • Better unicode / international keyboard text input support. (See Rubygame::Events::KeyPressed#string)
    • More natural and memorable class naming scheme.
  • New hook-based event handling system. (NOTE: Requires use of the new event classes.)
  • Added Rubygame.enable_key_repeat and Rubygame.disable_key_repeat. Thanks to atiaxi for this new feature!

Fixes

  • Fixed: EventQueue#peek_each didn‘t yield any events.
  • Fixed: Segfault in extract_rgba_u8_as_u8() on x86_64 systems. Thanks to ElCuGo for this fix!
  • Fixed: Several "cast from pointer" warnings on x86_64 systems.
  • Fixed: Build system didn‘t correctly compile with debug symbols when using "debug" option.
  • Fixed: Surface#get_at didn‘t work correctly for 8-bit Surfaces.
  • Fixed: Ftor.new_from_to would always complain about "wrong number of arguments". Thanks to atiaxi for this fix!

Other Stuff

  • The panda demo (samples/demo_rubygame.rb) has been renovated to demonstrate how to use the new features, and to be a better example.
  • Old event classes are deprecated and will be removed in 3.0.
    • ActiveEvent (use Events::InputFocusGained,
                            Events::InputFocusLost,
                            Events::MouseFocusGained,
                            Events::MouseFocusLost,
                            Events::WindowMinimized, and
                            Events::WindowUnminimized)
      
    • ExposeEvent (use Events::WindowExposed)
    • JoyAxisEvent (use Events::JoystickAxisMoved)
    • JoyBallEvent (use Events::JoystickBallMoved)
    • JoyDownEvent (use Events::JoystickButtonPressed)
    • JoyHatEvent (use Events::JoystickHatMoved)
    • JoyUpEvent (use Events::JoystickButtonReleased)
    • KeyDownEvent (use Events::KeyPressed)
    • KeyUpEvent (use Events::KeyReleased)
    • MouseDownEvent (use Events::MousePressed)
    • MouseMotionEvent (use Events::MouseMoved)
    • MouseUpEvent (use Events::MouseReleased)
    • QuitEvent (use Events::QuitRequested)
    • ResizeEvent (use Events::WindowResized)

Rubygame 2.3.0

Release focus: Media resources.

Features

Fixes

  • ColorBase had been accidently placed in the top level namespace in Rubygame 2.2.0. It is now correctly placed in the Rubygame::Color module.

Other Stuff

Rubygame 2.2.0

Release focus: Colors.

Features

  • Add: Rubygame::Color module
    • ColorRGB, ColorHSV, and ColorHSL classes.
    • X11 and CSS palettes of pre-defined colors.
    • Surface methods can accept ColorRGB etc. for colors.
    • Automatic lookup of color names when a string or symbol is passed for a color to Surface methods.
  • Add: Surface#set_at().
  • Add: Screen#icon=().

Bug Fixes

  • Fix: Surface#draw_arc was incorrectly documented as Surface#draw_pie

Improvements

  • Rect#collide_rect? is now faster.
  • Sprites::Group#collide_group can take a block; arguments are deprecated.

Other Stuff

  • Build system correctly recompiles if source has changed.
  • Build system option syntax has changed. See the README: Advanced Install.
  • Build system will correctly exit with an error status if it can‘t compile; fixes Rubygems trying to install even when compile failed.

Acknowledgements

  • Michael Swiger (mokkan) for Screen#icon=.
  • ippa for optimizing Rect#collide_rect?.

Rubygame 2.1.0

Features

  • Add: Mixer::Music module.
  • Add: Mixer.driver_name method.
  • Add: Depth sorting for sprites.
  • Add: Sprite#undraw.
  • Add: TTF#size_utf8 and TTF#size_unicode.
  • Add: Rubygame.key_name.

Bug Fixes

  • Fix: Bug with dirty rectangles in UpdateGroup.
  • Fix: Incorrect docs for joy-hat direction value.
  • Fix: Segfaults when Joysticks are garbage-collected after Rubygame has quit.
  • Fix: Segfaults when using Surface#convert, to_display, or to_display_alpha when no video mode has been set.
  • Fix: Surface#get_at returning [0,0,0,0] when it shouldn‘t.
  • Fix: Sprites::Group#collide_group behaving incorrectly (again).
  • Fix: Build system doesn‘t correctly handle quoted spaces in —cflags/—lflags. (NOTE: Use CFLAGS/LDFLAGS environment variables now, instead.)

Known Issues

  • Build system won‘t detect changed source files and recompile as necessary; you must "rake clobber build" after a change.

Other Stuff

  • Added argument checks to several Rect methods.
  • Surfaces can be created with no Screen mode set.
  • Mixer.open_audio has default values.
  • TTF style getting/setting refactored under the hood.
  • Added demo_music.rb and a sample song.ogg to try out music.

Acknowledgements

  • Johan Berntsson for adding Mixer::Music.
  • Daniel Neis Araujo for adding Sprite#undraw.
  • Roger Ostrander (denor) for and bug fixes and adding Rubygame.key_name.
  • Bjorn De Meyer (beoran) for numerous patches and improvements.

Rubygame 2.0.1

Bug Fixes

  • Fix: Segfaults in several C methods when passed an unexpected argument type.
  • Fix: Segfaults in Screen#update and Screen#update_rects when the Rect(s) extended out of the Screen bounds.
  • Fix: Ftor#magnitude= behaving incorrectly.
  • Fix: Rect#clip! behaving incorrectly.
  • Fix: Sprites::Group#collide_group behaving incorrectly.
  • Fix: Surface#savebmp wanting too many arguments.

Other Stuff

  • Argument handling for C methods is now more robust under the hood.
  • C methods which expect Array arguments will now also work with objects that can be converted to an Array (with to_ary), such as Ftor.

Rubygame 2.0.0:

NOTICE: version 2.0.0 is not totally backward-compatible with 1.1.0. You may have to update existing applications to the new syntax. (Hence the major version number going up.)

API Changes

Basic audio playback with SDL_mixer

Event management system revamped

Surface swallows Draw, Transform, and Image methods

  • Updated: Rubygame::Surface class
    • Add: Surface.load_image() (migrated from Image).
    • Add: #savebmp (migrated from Image).
    • Add: #draw_* (migrated from Draw).
    • Add: #rotozoom, #zoom (migrated from Transform).
    • Add: #zoom_to method.
  • Retire: Draw module (methods merged into Surface).
  • Retire: Transform module (methods merged into Surface).
  • Retire: Image module (methods merged into Surface).

Clock class improved

  • Updated: Rubygame::Clock class
    • Clock is now directly under Rubygame (not Rubygame::Time).
    • Clock.new() takes no arguments, but yields self if a block is given.
    • framerate limiting with #tick is now much more accurate.
    • Add: Clock.runtime(), Clock.wait(), Clock.delay() (migrated from Time)
    • Rename: #fps to #framerate.
    • Rename: #desired_fps to #target_framerate.
    • Rename: #desired_mspf to #target_frametime.
    • Rename: #time to #lifetime.
  • Retire: Time module (methods merged into Clock).

Experimental classes/modules

New system for version and capability detection

  • Rubygame::VERSIONS: a hash table with the version numbers of rubygame, SDL, and any SDL_* libraries that were compiled in.
  • Methods which are not supported will no be defined in the namespace; formerly, they would be defined but nonfunctional (issued a warning and returned nil).

Miscellaneous other changes and additions

  • Add: Rubygame.quit (cleanly exit SDL; resets resolution after fullscreen).
  • Updated: Rubygame::Surface class
    • Argument list for Surface.new() has changed.
    • Add: #clip and #clip=.
    • Add: #convert, #to_display, and #to_display_alpha.
  • Updated: Rubygame::Screen class
    • Rename: Screen.set_mode() to Screen.new().
    • Add: Screen.set_mode() and Screen.instance() (aliases for Screen.new()).
    • Add: #title, #title= (replaces #caption and #set_caption)
  • Updated: Rubygame::TTF class
    • Add: #render_utf8 and #render_unicode methods.
    • Add: #size_text method.

Bug Fixes

  • Fix several erroneous Rect methods.
  • Fix "bignum out of range of unsigned long (RangeError)" when using Rubygame::FULLSCREEN.

Other Stuff

  • New build/install system with Rake.
  • Split the monolithic rubygame extension into modules:
    rubygame_core:main SDL interface.
    rubygame_gfx:SDL_gfx interface.
    rubygame_image:SDL_image interface.
    rubygame_mixer:SDL_mixer interface.
    rubygame_ttf:SDL_ttf interface.

[Validate]