Module: Graphics

Defined in:
lib/graphics.rb

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.frame_countObject

The screen’s refresh rate count. Set this property to 0 at game start and the game play time (in seconds) can be calculated by dividing this value by the frame_rate property value.



15
16
17
# File 'lib/graphics.rb', line 15

def frame_count
  @frame_count
end

.frame_rateObject

In [Smooth Mode], the number of times the screen is refreshed per second. The larger the value, the more CPU power is required. Normally set at 40. When not in [Smooth Mode], the refresh rate is halved, and graphics are drawn in every other frame.

Changing this property is not recommended; however, it can be set anywhere from 10 to 120. Values out of range are automatically corrected.



10
11
12
# File 'lib/graphics.rb', line 10

def frame_rate
  @frame_rate
end

Class Method Details

.frame_resetObject

Resets the screen refresh timing. After a time-consuming process, call this method to prevent extreme frame skips.



53
54
55
# File 'lib/graphics.rb', line 53

def self.frame_reset()
  raise "not implemented"
end

.freezeObject

Fixes the current screen in preparation for transitions.

Screen rewrites are prohibited until the transition method is called.



30
31
32
# File 'lib/graphics.rb', line 30

def self.freeze()
  raise "not implemented"
end

.transition(duration = 8, filename = nil, vague = 40) ⇒ Object

Carries out a transition from the screen fixed in Graphics.freeze to the current screen.

duration is the number of frames the transition will last. When omitted, this value is set to 8.

filename specifies the transition graphic file name. When not specified, a standard fade will be used. Also automatically searches files included in RGSS-RTP and encrypted archives. File extensions may be omitted.

vague sets the ambiguity of the borderline between the graphic’s starting and ending points. The larger the value, the greater the ambiguity. When omitted, this value is set to 40.



47
48
49
# File 'lib/graphics.rb', line 47

def self.transition(duration = 8, filename = nil, vague = 40)
  raise "not implemented"
end

.updateObject

Refreshes the game screen and advances time by 1 frame. This method must be called at set intervals.

If this method is not called in 10 seconds or more, the program will view the script as having run out of control and will force a quit.



23
24
25
# File 'lib/graphics.rb', line 23

def self.update()
  raise "not implemented"
end