I would personally use
JRuby so I can load the RPG::Map object from the map files.
I suggest you check out RPG::Map and Tilemap in the help file.
It does not have all the information you need, but it does have some ^_^
RPG::MapInfo contains the information needed to build up the tree of maps in the editor which includes the name of the map. (MapInfos.rxdata)
If you cannot use JRuby (licensing issues?) I would instead write a Ruby script which reads the MapXXX.rxdata files and converts them into a format which is easier to write a Java parser for.
Here is my
Table.to_s implementation which hopefully can give you ideas on how to structure the 3-dimensional table should you go this way.
class Table
##
# Gives a special string representation. (For debugging purposes mostly)
#
def to_s
if ysize == 1
begin
return to_s_1d
rescue # In the rare case where you have a 2- or 3-dimensional
end # table with ysize = 1
end
if zsize == 1
begin
return to_s_2d
rescue # In the rare case where you have a 3-dimensional table
end # with zsize = 1
end
return to_s_3d
end
##
# Returns a representation of the 1-dimensional table as a string
# Assumes that the table is 1-dimensional. Will throw an error otherwise
#
def to_s_1d
str = '['
for i in 0...(xsize-1)
str += self[i].to_s + ', '
end
str += self[xsize-1].to_s + ']'
return str
end
##
# Returns a representation of the 2-dimensional table as a string
# Assumes that the table is 2-dimensional. Will throw an error otherwise
#
def to_s_2d
str = '['
for j in 0...ysize
str += "\n["
for i in 0...(xsize-1)
str += self[i,j].to_s + ', '
end
str += self[xsize-1,j].to_s + ']'
end
str += "\n]"
return str
end
##
# Returns a representation of the 3-dimensional table as a string
# Assumes that the table is 3-dimensional. Will throw an error otherwise
#
def to_s_3d
str = '{'
for k in 0...zsize
str += '['
for j in 0...ysize
str += "\n["
for i in 0...(xsize-1)
str += self[i,j,k].to_s + ', '
end
str += self[xsize-1,j,k].to_s + ']'
end
str += "\n]"
end
str += '}'
return str
end
end
Quote from: ForeverZer0 on March 06, 2011, 07:02:04 pm
It is already drawn off screen. Moving just causes the viewport to change and you see a different section of the bitmap.
The main reason why custom resolution scripts don't fare well with big maps.
The default tilemap draw just what's needed plus some buffer around the visible area.
Take any custom resolution script and remove the Tilemap part from it. Increase the resolution and how the default tilemap works will be painfully obvious.
*hugs*