I have noticed that there are things in RGSS and RMXP that we actually don't know and that we should know. This topic is here to keep a list of all questions and answers about RGSS and RMXP that we will need to answer and implement. Feel free to edit this post when you add a new question and/or answer.
What are the max dimensions for the Table class?The maximum capacity of the Table class depends on the OS. The no single dimension can be large enough to have the Fixnum converted to a Bignum. This will vary between x86 and x64 processors, but here would be the formula to figure it out:
FIXNUM_MAX = (2**(0.size * 8 -2) -1)
FIXNUM_MIN = -(2**(0.size * 8 -2))
Other than that though, I do believe it is only limited to the computer's memory.
How exactly are Color, Tone, Rect and Table instances store in Ruby Marshal?
def _dump(d = 0)
[@red, @green, @blue, @alpha].pack('d4')
end
def self._load(s)
Color.new(*s.unpack('d4'))
end
def _dump(d = 0)
[@red, @green, @blue, @gray].pack('d4')
end
def self._load(s)
Tone.new(*s.unpack('d4'))
end
def _dump(d = 0)
[@x, @y, @width, @height].pack('l4')
end
def self._load(s)
Rect.new(*s.unpack('l4'))
end
def _dump(d = 0)
s = [3].pack('L')
s += [@xsize].pack('L') + [@ysize].pack('L') + [@zsize].pack('L')
s += [@xsize * @ysize * @zsize].pack('L')
for z in 0...@zsize
for y in 0...@ysize
for x in 0...@xsize
s += [@data[x + y * @xsize + z * @xsize * @ysize]].pack('S')
end
end
end
s
end
def self._load(s)
size = s[0, 4].unpack('L')[0]
nx = s[4, 4].unpack('L')[0]
ny = s[8, 4].unpack('L')[0]
nz = s[12, 4].unpack('L')[0]
data = []
pointer = 20
loop do
data.push(*s[pointer, 2].unpack('S'))
pointer += 2
break if pointer > s.size - 1
end
t = Table.new(nx, ny, nz)
n = 0
for z in 0...nz
for y in 0...ny
for x in 0...nx
t[x, y, z] = data[n]
n += 1
end
end
end
t
end
Does Table limit x, y, z if they are specified out of bounds or does it throw an error?If access is attempted outside the bounds of the table, the return value is nil.
How exactly is Table serialized as Marshal object?http://forum.chaos-project.com/index.php/topic,9103.msg140249.html#msg140249
What happens with Sprite#src_rect when Sprite#bitmap is set to a Bitmap instance or nil?The src_rect updates to the size of the bitmap bigger or smaller, when the bitmap is set to nil the src_rect is not changed.
What happens when you set Sprite#src_rect while Sprite#bitmap is nil?Nothing, the src_rect is set as normal.
What happens when you set Sprite#src_rect outside of the boundaries of Sprite#bitmap?Nothing, the src_rect is set as normal.
What is the z offset for the cursor, the bitmap size arrows, the pause graphic and the contents sprite?It's 2.
Window#viewport returns nil by default. What is it for? Is there a way to make it return something else or is this unused?Passing a viewport in a window does exactly the same like it does in a Sprite. It's just that this feature isn't used in RMXP.
What's the max value for number of frames in a transition?Only Fixnum values can can be used. If they number is large enough to be converted to a Bignum, it will throw a RangeError.
The exact value will vary depending on the processor.
What is the pixel color formula for the color blending used by plane, sprite and viewport?-
What is the pixel color formula for the tone blending used by plane, sprite and viewport?-
What are the formulas for calculating the Quick Settings (A, B, C, D, E) for actor parameters?-
What is the proper formula for the calculation of the new color value when using Bitmap#blt when any kind of opacity or alpha blending is involved?-
What does Graphics#frame_reset do?-