K let me try to explain my problem better. K in my map file it looks like this "########". But when i draw the objects it looks like this
# # # #
skips a cube every time what could be the problem?
Rem Project: 1
Rem Created: Friday, July 13, 2012
Rem ***** Main Source File *****
set display mode 800,600,32
set window title "Cube Maze"
set window on
Sync on
Sync Rate 60
MapSize = 10
dim map$(MapSize,MapSize)
tileSize = 80
LoadMap("map1.txt", MapSize)
autocam off
hide mouse
make object cube 999, 2
position object 999, 250,1, 250
position camera 0,-20,0
for y=1 to MapSize
for x=1 to MapSize
if map$(x,y)="#"
id = id + 1
Make Object Cube id, 25
Position Object id, x * tileSize, 0, y * tileSize
endif
next x
next y
do
camspeed = 5
if upkey()=1 then xAng = wrapvalue(xAng-1)
if downkey()=1 then xAng = wrapvalue(xAng+1)
if leftKey()=1 then yAng = wrapvalue(yAng-camspeed)
if rightKey()=1 then yAng = wrapvalue(yAng+camspeed)
rotate camera xAng, yAng, 0
if keystate(17)=1
move camera 1
endif
print Scancode()
sync
loop
function loadmap(filename$, size)
open to read 1, filename$
for y=1 to size
for x=1 to size
read byte 1,tmp
map$(x,y)=chr$(tmp)
next x
next y
close file 1
endfunction
Jacob Gardam