Module: LiteRGSS::Graphics

Defined in:


Graphics module manages the frame and window display

Constant Summary

StoppedError =

Error triggered when you use a Graphic function without starting the window display ( `Graphics.start` )
ClosedWindowError =

Error triggered when the user closes the Window

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details


Return the screen brightness (between 0 and 255)


  • (Integer)


Return the number of frames shown on the screen


  • (Integer)

.heightInteger (readonly)

Return the game screen height


  • (Integer)

.widthInteger (readonly)

Return the game screen width


  • (Integer)

Class Method Details


Freeze the Graphics by showing the current frame on top of each sprite (triggers a Graphics.update to take the current frame)

.list_resolutionsArray<Array(width, height)>

Return an array containing the possible 32 bits fullscreen resolutions



Reload the sprite stack (z_order processing)


  • (self)


Take a snapshot of the frame before the last Graphics.update



Start the Graphic display : show a window according to the LiteRGSS::Config constants and unlock the Graphics functions


Stop the Grahics display : closes the window and lock the Graphics functions

.transition(nb_frame = Config::FrameRate, bitmap = nil)

Show a transition between the frozen Graphics and the new Graphic state


  • nb_frame (Integer) (defaults to: Config::FrameRate)

    the number of frames the transition lasts

  • bitmap (LiteRGSS::Bitmap) (defaults to: nil)

    the bitmap to use to perform the transition


Show the current frame to the screen and catch every SFML Events that LiteRGSS reads (Input)


Update only the sprite display (does not increase the frame_count as well)


  • (self)