Ich habe leider gerade nicht so viel Zeit, daher eine kurze Antwort, sorry dafür
So aufgebaut:
17*17 floats (4 byte) für die Höhe der Heightmap
danach 16*16 folgende Daten:
- unsigned short (noch eine höhe, wissen selber nicht was)
- unsigned short (texture ID)
- unsigned int (entity, also spezielle map teile
danach 16*16 normal data (die wir aber nicht nutzen)
und danach noch ein word, welches den start "blickwinkel" angibt
danach noch der Levelname als string
hier der Original source fürs load map:
Code:
loadmap:
filename$ = "data\map" + str$(curlevel) + cursubmap$ + ".dat"
if file exist(filename$) = 0
return
endif
`read in height data
open to read 1, filename$
for z=0 to 16
for x=0 to 16
read float 1, height#
set matrix height 1, x, z, height#
next x
next z
`read in and process tile data
i=1
for z=0 to 15
for x=0 to 15
read word 1, height
read word 1, tilegfx
set matrix tile 1, x, z, tilegfx
`process entity
read file 1, entity
entities(x+1,z+1) = entity
if entity = 0
startx = x : startz = z
endif
if entity = 1
goalx = x : goalz = z
endif
inc i
next x
next z
`read in normal data
for z=0 to 15
for x=0 to 15
read float 1, nx# : read float 1, ny# : read float 1, nz#
if nz# > 0
nx# = nx# * 0.05 : ny# = ny# * 0.05 : nz# = nz# * 0.05
else
nx# = nx# * 20.0 : ny# = ny# * 20.0 : nz# = nz# * 20.0
endif
set matrix normal 1, x, z, nx#, ny#, nz#
next x
next z
update matrix 1
`read in extra data
read word 1, initangle
read string 1, levelname$
close file 1
Der Code ist in Dark Basic Pro und meiner Meinung nach eine richtig schlimme SPrache. Aber man kann es sich zurechtwurschteln.
Zur Textur ID:
string Texture[15] = { "Space", "Grass", "Earth", "Earth", "Earth", "Earth", "Earth", "Starfield", "Lava", "Grass", "Ice", "Water", "Metal", "MetalArrowDown", "MetalArrowUp" };
So das wars erstmal

Hoffe du kannst damit was anfangen,
LG