1) use a tile map, not a big bitmap! It will probably rise above 100mb when you want a big map. So you'll probably want to look at 2)
2) Well, assuming you want a tile map, you can try this:
Make several tiles:
Now you need to load them:
load image "tile1.jpg", 1
load image "tile2.jpg", 2
Then make an array that will hold the map info:
dim hexmap(500,500)
Here's an example of the map:
The lowest tile is tile X0,Y0
Now you will need a map routine:
function drawmap(camera_x,camera_y)
rem this will draw 2500 tiles, you might want to optimize this, by calculating which tiles are visible.
for a = 0 to 50
for b = 0 to 50
if hexmap(a,b)>0
x = (a * 96)-(b * 96)
y = 0-((a * 32)+(b * 32))
paste image hexmap(a,b),x-camera_x,y-camera_y,1
endif
next b
next a
endfunction
Now call this function when you've filled the array, like:
hexmap(0,0)=1
hexmap(1,0)=1
hexmap(0,1)=1
hexmap(1,1)=2
Camera_x and camera_y are the "camera" positions within the map, this way you can scroll the map.
so it could look like this:
sync on
sync rate 60
load image "tile1.jpg", 1
load image "tile2.jpg", 2
dim hexmap(50,50)
hexmap(0,0)=1
hexmap(1,0)=1
hexmap(0,1)=1
hexmap(1,1)=2
do
cls
cx = cx - leftkey() + rightkey()
cy = cy - upkey() + downkey()
drawmap(cx,cy)
sync
loop
function drawmap(camera_x,camera_y)
rem this will draw 2500 tiles, you might want to optimize this, by calculating which tiles are visible.
for a = 0 to 50
for b = 0 to 50
if hexmap(a,b)>0
x = (a * 96)-(b * 96)
y = 0-((a * 32)+(b * 32))
paste image hexmap(a,b),x-camera_x,y-camera_y,1
endif
next b
next a
endfunction