When i run this code
Remstart
Aurthor: Beehive Studios
Date Started: 08/07/2004
Date Last modified: 08/07/2004
Product Name: 3D Pacman
Product Version: v0.1
Remend
Rem Initialization
Set Display Mode 800,600,32
Hide Mouse : Sync On : Sync Rate 40
Backdrop On : Color Backdrop RGB(0,0,0) : CLS
Rem Setup map vairables
Mapsize=23
Dim Map$(Mapsize,Mapsize)
MapObjectNumber=1
LevelCreated=0
Rem Make a light
Make Light 1
Position Light 1,368,150,368
Point Light 1,368,0,368
Rem load textures
Load image "Wall.jpg",1,1
Load image "Floor.jpg",2,1
Do
LoadMap("Level1.txt",Mapsize)
If levelCreated=0
For x=1 to Mapsize
For z=1 to Mapsize
If Map$(z,x)="#"
Make Object Cube MapObjectNumber,32
Position Object MapObjectNumber,x*32,0,z*32
Texture Object MapObjectNumber,1
MapObjectNumber=MapObjectNumber+1
endif
next z
next x
For x=1 to Mapsize
For z=1 to Mapsize
If Map$(z,x)="."
Make Object Plain MapObjectNumber,32,32
Position Object MapObjectNumber,x*32,0,z*32
Texture Object MapObjectNumber,2
MapObjectNumber=MapObjectNumber+1
endif
next z
Next x
levelCreated=1
Endif
If EscapeKey()=1 then end
Position Camera 1000,400,1000
Point Camera 368,0,368
Sync
Loop
Function LoadMap(Filename$,Size)
Open to read 1,Filename$
For x=1 to Size
For y=1 to Size
Read Byte 1,tmp
map$(x,y)=chr$(tmp)
next y
next x
Close File 1
Endfunction
my cubes and plains do not position them selves in the right place. what am i doing wrong?
here is the map file
#######################
#..........#..........#
#.###.####.#.####.###.#
#.# #.# #.#.# #.# #.#
#.###.####.#.####.###.#
#.....................#
#.###.#.#######.#.###.#
#.....#....#....#.....#
#####.####.#.####.#####
#.#.........#.#
#####.#.#######.#.#####
........# #........
#####.#.#######.#.#####
#.#.........#.#
#####.#.#######.#.#####
#..........#..........#
#.###.####.#.####.###.#
#...#.............#...#
###.#.#.#######.#.#.###
#.....#....#....#.....#
#.########.#.########.#
#.....................#
#######################
I also have a screenshot.