I'm having this problem, as well.
Really bummed to see there is no solution. I had planned to add a texture to the blocks.
Nz0, do you think if I made boxes in blender and textured them there I would still get the "lines"? Its pretty essential that I have them as blocks and not joined as an object, so I can randomly create decor.
Below is code to my mini-not-so-random dungeon generator(its not complete I have yet to add decor or textures). You can see the lines are pretty horrific, and zooming in does not work.
Setvirtualresolution(640,480)
ResetTimer()
type tiles
room as integer
roomx as integer
roomy as integer
roomz as integer
wall as integer
door as integer
corridor as integer
chest as integer
endtype
dim cloneIDs[20, 100, 100] as tiles
dim GPS[20] as tiles
global wallObjID
global floorObjID
global corridorObjID
global doorObjID
global chestObjID
global dng_gen_rooms
GPS[1].roomx = 0
GPS[1].roomy = 0
GPS[1].roomz = 0
dng_gen_rooms = 6
function restartdungeon()
if GetObjectExists( wallObjID ) then DeleteObject( wallObjID )
if GetObjectExists( floorObjID ) then DeleteObject( floorObjID )
if GetObjectExists( corridorObjID ) then DeleteObject( corridorObjID )
if GetObjectExists( doorObjID ) then DeleteObject( doorObjID )
if GetObjectExists( doorObjID ) then DeleteObject( chestObjID )
if GetImageExists( level_texture ) then DeleteImage ( level_texture )
for t = 0 to 20
for n = 0 to 100
for x = 0 to 100
if GetObjectExists( cloneIDs[t, n, x].room ) then DeleteObject( cloneIDs[t, n, x].room )
if GetObjectExists( cloneIDs[t, n, x].wall ) then DeleteObject( cloneIDs[t, n, x].wall )
if GetObjectExists( cloneIDs[t, n, x].door ) then DeleteObject( cloneIDs[t, n, x].door )
if GetObjectExists( cloneIDs[t, n, x].corridor ) then DeleteObject( cloneIDs[t, n, x].corridor )
if GetObjectExists( cloneIDs[t, n, x].chest ) then DeleteObject( cloneIDs[t, n, x].chest )
next x
next n
next t
floorObjID = CreateObjectBox( 2, .25, 2 )
wallObjID = CreateObjectBox( 2, 7, 2 )
corridorObjID = createobjectbox( 2, 1, 2 )
doorObjID = createobjectbox( 2, 4.8, 2 )
chestObjID = LoadObject( "Chest_A.obj" )
level_texture = LoadImage( "FG_Assets01_Low_D.png" )
SetObjectImage ( chestObjID, level_texture, 0 )
SetObjectColor( corridorObjID, 75, 155, 75, 255 )
SetObjectColor( wallObjID, 155, 100, 200, 255 )
SetObjectColor( doorObjID, 255, 0, 0, 255 )
SetObjectPosition( floorObjID, 3000, 8000, 3000 )
SetObjectPosition( wallObjID, 3000, 8000, 3000 )
SetObjectPosition( corridorObjID, 3000, 8000, 3000 )
SetObjectPosition( doorObjID, 3000, 8000, 3000 )
SetObjectPosition( chestObjID, 3000, 8000, 3000 )
undim GPS[]
undim cloneIDs[]
dim GPS[20] as tiles
dim cloneIDs[20, 100, 100] as tiles
endfunction
function room(t as integer) //create rooms
x_dir = 1
z_dir = 1
z_offset = 0
x_offset = 0
if t > 1
GPS[t].roomx = GetobjectX( cloneIDs[t,1,0].door )
GPS[t].roomz = GetobjectZ( cloneIDs[t,1,0].door )
rm_x_axis_dir = (GetobjectX( cloneIDs[t,1,0].door ) - GetobjectX( cloneIDs[t-1,2,0].door ))
rm_z_axis_dir = (GetobjectZ( cloneIDs[t,1,0].door ) - GetobjectZ( cloneIDs[t-1,2,0].door ))
if rm_x_axis_dir < 0 or rm_z_axis_dir < 0
x_dir = -1
z_dir = -1
endif
if rm_x_axis_dir <> 0 and x_dir = 1
z_offset = 4
elseif rm_z_axis_dir <> 0 and z_dir = 1
x_offset = 4
elseif rm_x_axis_dir <> 0 and x_dir = -1
z_offset = -4
elseif rm_z_axis_dir <> 0 and z_dir = -1
x_offset = -4
endif
endif
x=1
z=0
w = random2(5,10)
h = random2(5,10)
For x = 1 to w+2 //w
if z <> 0 and x <> w+2
cloneIDs[t,x,z].room = CloneObject( floorObjID )
SetObjectPosition( cloneIDs[t,x,z].room, GPS[t].roomx+((x*2)*x_dir)-x_offset, 0, GPS[t].roomz-z_offset )
endif
For z = 1 to h+1
cloneIDs[t,x,z].room = CloneObject( floorObjID )
SetObjectPosition( cloneIDs[t,x,z].room, GPS[t].roomx+((x*2*x_dir)-(x_dir*2))-x_offset, 0, GPS[t].roomz+(z*(z_dir*2))-z_offset )
Next z
Next x
//wall
x=0
z=0
For x = 0 to w //bottom //w
cloneIDs[t,x,z].wall = CloneObject( wallObjID )
SetObjectPosition( cloneIDs[t,x,z].wall, GPS[t].roomx+(x*2*x_dir)-x_offset, 3.5, GPS[t].roomz-z_offset )
Next x
x = w+1 //w+1
For z = 0 to h+1 //right side // h+1
cloneIDs[t,x,z].wall = CloneObject( wallObjID )
SetObjectPosition( cloneIDs[t,x,z].wall, GPS[t].roomx+(x*2*x_dir)-x_offset, 3.5, GPS[t].roomz+(z*2*z_dir)-z_offset )
Next z
z=w+1 //w+1
x=w+2 //w+2
For z = w+1 to w+h+1 //left w+1 to w+h+1
cloneIDs[t,x,z].wall = CloneObject( wallObjID )
SetObjectPosition( cloneIDs[t,x,z].wall, GPS[t].roomx-x_offset, 3.5, GPS[t].roomz+((z-w-1)*2*z_dir)-z_offset )
Next z
z = w+h+2 //top w+h+2
For x = w+3 to w+w+4 //w+3 to w+3+w+1
cloneIDs[t,x,z].wall = CloneObject( wallObjID )
SetObjectPosition( cloneIDs[t,x,z].wall, GPS[t].roomx+((x-w-3)*2*x_dir)-x_offset, 3.5, GPS[t].roomz+((z-w-1)*2*z_dir)-z_offset )
Next x
if t >= 1 and t < dng_gen_rooms
corridorfill( w, h, t, rm_x_axis_dir, rm_z_axis_dir )
chest_chance = Random2(1,100)
if chest_chance >= 20 and chest_chance <= 25
x = random2( 2, w )
z= random2( 2, h )
cloneIDs[t,1,1].chest = CloneObject( chestObjID )
SetObjectPosition( cloneIDs[t,1,1].chest, GetObjectX( cloneIDs[t,x,z].room ), 1, GetObjectZ( cloneIDs[t,x,z].room ) )
endif
endif
if t = dng_gen_rooms
//chest_chance = Random2(1,100)
//if chest_chance >= 20 and chest_chance <= 40
x = random2( 2, w )
z= random2( 2, h )
SetObjectPosition( chestObjID, GetObjectX( cloneIDs[t,x,z].room ), 1, GetObjectZ( cloneIDs[t,x,z].room ) )
endif
wallID = objectspherecast(0, GetObjectX( cloneIDs[t,1,0].door ), 5.5, GetObjectZ( cloneIDs[t,1,0].door ), GetObjectX( cloneIDs[t,1,0].door ), 5.5, GetObjectZ( cloneIDs[t,1,0].door ), 1)
if GetObjectExists(wallID) then DeleteObject(wallID)
endfunction
function corridorfill( w as integer, h as integer, t as integer, rm_x_axis_dir as integer, rm_z_axis_dir as integer )
if Last_Corridor_Direction = 1 or Last_Corridor_Direction = 3
if Prvs_Last_Corridor_Direction = 2 or Prvs_Last_Corridor_Direction = 4
repeat
Current_Corridor_Direction = random2(1,4)
until Current_Corridor_Direction <> Last_Corridor_Direction and Current_Corridor_Direction <> 2 and Current_Corridor_Direction <> 4
elseif Prvs_Last_Corridor_Direction = 1
repeat
Current_Corridor_Direction = random2(1,4)
until Current_Corridor_Direction <> Last_Corridor_Direction and Current_Corridor_Direction <> 2
else
repeat
Current_Corridor_Direction = random2(1,4)
until Current_Corridor_Direction <> Last_Corridor_Direction
endif
elseif Last_Corridor_Direction = 2 or Last_Corridor_Direction = 4
if Prvs_Last_Corridor_Direction = 1 or Prvs_Last_Corridor_Direction = 3
repeat
Current_Corridor_Direction = random2(1,4)
until Current_Corridor_Direction <> Last_Corridor_Direction-1 and Current_Corridor_Direction <> Prvs_Last_Corridor_Direction - 1 and Current_Corridor_Direction <> Prvs_Last_Corridor_Direction
else
repeat
Current_Corridor_Direction = random2(1,4)
until Current_Corridor_Direction <> Last_Corridor_Direction-1 and Current_Corridor_Direction <> Prvs_Last_Corridor_Direction-1
endif
else
Current_Corridor_Direction = random2(1,4)
endif
cloneIDs[t,2,0].door = CloneObject( doorObjID )
if Current_Corridor_Direction = 1 //south
x = random2(2,w-1)
z = 0
SetObjectPosition( cloneIDs[t,2,0].door, GetObjectX( cloneIDs[t,x,z].wall ), 2.4, GetObjectZ( cloneIDs[t,x,z].wall ) )
DeleteObject( cloneIDs[t,x,z].wall )
z_dir = 1
elseif Current_Corridor_Direction = 2 //north
x = random2(w+4,w+w+3)
z = w+h+2
SetObjectPosition( cloneIDs[t,2,0].door, GetObjectX( cloneIDs[t,x,z].wall ), 2.4, GetObjectZ( cloneIDs[t,x,z].wall ) )
DeleteObject( cloneIDs[t,x,z].wall )
z_dir = -1
elseif Current_Corridor_Direction = 3 //west
x = w+2
z= random2(w+2,w+h)
SetObjectPosition( cloneIDs[t,2,0].door, GetObjectX( cloneIDs[t,x,z].wall ), 2.4, GetObjectZ( cloneIDs[t,x,z].wall ) )
DeleteObject( cloneIDs[t,x,z].wall )
x_dir = 1
elseif Current_Corridor_Direction = 4 //east
x = w+1
z= random2(1,h)
SetObjectPosition( cloneIDs[t,2,0].door, GetObjectX( cloneIDs[t,x,z].wall ), 2.4, GetObjectZ( cloneIDs[t,x,z].wall ) )
DeleteObject( cloneIDs[t,x,z].wall )
x_dir = -1
endif
counter = random2(4,7) //corridor length
if rm_x_axis_dir < 0 or rm_z_axis_dir < 0
x_dir = x_dir*-1
z_dir = z_dir*-1
endif
z=0
x=0
n = 1
repeat
select Current_Corridor_Direction
case 1: //south
cloneIDs[t,x,z+n].corridor = CloneObject( corridorObjID )
SetObjectPosition( cloneIDs[t,x,z+n].corridor, GetObjectX( cloneIDs[t,2,0].door ), 2.4, GetObjectZ( cloneIDs[t,2,0].door )-(z_dir*(n*2)) )
if n = counter-1
cloneIDs[t+1,1,0].door = CloneObject( doorObjID )
SetObjectPosition( cloneIDs[t+1,1,0].door, GetObjectX( cloneIDs[t,2,0].door ), 2.4, GetObjectZ( cloneIDs[t,2,0].door )-(z_dir*((n+1)*2)) )
endif
endcase
case 2: //north
cloneIDs[t,x,z+n].corridor = CloneObject( corridorObjID )
SetObjectPosition( cloneIDs[t,x,z+n].corridor, GetObjectX( cloneIDs[t,2,0].door ), 2.4, GetObjectZ( cloneIDs[t,2,0].door )-(z_dir*(n*2)) )
if n = counter-1
cloneIDs[t+1,1,0].door = CloneObject( doorObjID )
SetObjectPosition( cloneIDs[t+1,1,0].door, GetObjectX( cloneIDs[t,2,0].door ), 2.4, GetObjectZ( cloneIDs[t,2,0].door )-(z_dir*((n+1)*2)) )
endif
endcase
case 3: //west
cloneIDs[t,x+n,z].corridor = CloneObject( corridorObjID )
SetObjectPosition( cloneIDs[t,x+n,z].corridor, GetObjectX( cloneIDs[t,2,0].door )-x_dir*(n*2), 2.4, GetObjectZ( cloneIDs[t,2,0].door ) )
if n = counter-1
cloneIDs[t+1,1,0].door = CloneObject( doorObjID )
SetObjectPosition( cloneIDs[t+1,1,0].door, GetObjectX( cloneIDs[t,2,0].door )-x_dir*((n+1)*2), 2.4, GetObjectZ( cloneIDs[t,2,0].door ) )
endif
endcase
case 4: //east
cloneIDs[t,x+n,z].corridor = CloneObject( corridorObjID )
SetObjectPosition( cloneIDs[t,x+n,z].corridor, GetObjectX( cloneIDs[t,2,0].door )-x_dir*(n*2), 2.4, GetObjectZ( cloneIDs[t,2,0].door ) )
if n = counter-1
cloneIDs[t+1,1,0].door = CloneObject( doorObjID )
SetObjectPosition( cloneIDs[t+1,1,0].door, GetObjectX( cloneIDs[t,2,0].door )-x_dir*((n+1)*2), 2.4, GetObjectZ( cloneIDs[t,2,0].door ) )
endif
endcase
endselect
n=n+1
until n = counter
Prvs_Last_Corridor_Direction = Last_Corridor_Direction
Last_Corridor_Direction = Current_Corridor_Direction
if GetObjectExists( cloneIDs[6,1,0].door ) then SetObjectColor( cloneIDs[6,1,0].door, 255, 150, 75, 255 )
global Current_Corridor_Direction
global Last_Corridor_Direction
global Prvs_Last_Corridor_Direction
dim crd[20] as tiles
crd[t].room = Current_Corridor_Direction
endfunction
restartdungeon()
for t = 1 to dng_gen_rooms
room(t)
next t
do
PrintC(Current_Corridor_Direction)
Printc(Last_Corridor_Direction)
Print(Prvs_Last_Corridor_Direction)
t=1
for t =1 to dng_gen_rooms
PrintC(t)
PrintC(": ")
Print(crd[t].room)
next t
SetCameraPosition( 1, GPS[5].roomx, 150, GPS[5].roomz)
SetCameraLookAt( 1, GPS[5].roomx, 0, GPS[5].roomz, 0 )
Sync()
loop