Ide like to see more developments
Just been a day of voting and late sleepless nights lol
Quote: "Or maybe use columns, thinking underground.."
that would work well i think
i was thinking more along the lines i hope this explains
with a array of textures
1 2 3 4 5 6 7 8 9 10
1 1,1,2,2,3,3,2,2,1,1,1,1,1,1,1,1
2 1,1,2,2,3,3,2,2,1,1,1,1,1,1,1,1
3 1,1,2,2,3,3,2,2,1,1,1,1,1,1,1,1
4 1,1,2,2,3,#,#,#,#,#,#,#,1,1,1,1
5 1,1,2,2,3,#,2,2,1,1,1,#,1,1,1,1
6 1,1,2,2,3,#,2,2,1,1,1,#,1,1,1,1
7 1,1,2,2,3,#,2,2,o,1,1,#,1,1,1,1
8 1,1,2,2,3,#,2,2,1,1,1,#,1,1,1,1
9 1,1,2,2,3,#,2,2,1,1,1,#,1,1,1,1
10 1,1,2,2,3,#,#,#,#,#,#,#,1,1,1,1
11 1,1,2,2,3,3,2,2,1,1,1,1,1,1,1,1
the hash shows the actual blocks o shows your start location
when o moves to
7 1,1,2,2,3,#,o,2,1,1,1,#,1,1,1,1
then reassign the map textures to the new hash areas
you would have the same number of objects and your location
in the map would have a new o (start location) if done correctly
There would be a brief delay with it setting the blocks to new textures
and locations
1 2 3 4 5 6 7 8 9 10
1 1,1,2,2,3,3,2,2,1,1,1,1,1,1,1,1
2 1,1,2,2,3,3,2,2,1,1,1,1,1,1,1,1
3 1,1,2,2,3,3,2,2,1,1,1,1,1,1,1,1
4 1,1,2,#,#,#,#,#,#,#,1,1,1,1,1,1
5 1,1,2,#,3,3,2,2,1,#,1,1,1,1,1,1
6 1,1,2,#,3,3,2,2,1,#,1,1,1,1,1,1
7 1,1,2,#,3,3,o,2,1,#,1,1,1,1,1,1
8 1,1,2,#,3,3,2,2,1,#,1,1,1,1,1,1
9 1,1,2,#,3,3,2,2,1,#,1,1,1,1,1,1
10 1,1,2,#,#,#,#,#,#,#,1,1,1,1,1,1
11 1,1,2,2,3,3,2,2,1,1,1,1,1,1,1,1
in 2d this is kinda easy but in 3d not only do you have to change the
textures of objects but also there locations
The advantage tho is you could have a very large map and only a few
in memory and on screen
Ive been playing with this concept but i was having probs with resetting the camera pos
but with 10000 blocks i wasnt noticing much of a delay resetting the blocks
which would work fine if there is the same number of blocks on the y axis
heres something just to try
#constant KEY_LEFT = 37
#constant KEY_UP = 38
#constant KEY_RIGHT = 39
#constant KEY_DOWN = 40
#constant xMax=1024
#constant yMax=768
SetWindowSize( xMax, yMax, 0 )
SetVirtualResolution( xMax, yMax )
SetSyncRate( 1200, 0 )
createTexture()
global blockCount
dim blocks[20,20,20]
num=1
for y = 1 to 20
for x = 1 to 20
for z = 1 to 20
blocks[x,y,z]=num
CreateObjectBox(num,1,1,1)
SetObjectImage( num, random(1,20), 0)
SetObjectColor(num,255,255,255,255)
SetObjectPosition(num,(x-25),y,-(z))
//SetObjectDepthRange( num, 0,.1 )
SetObjectCullMode( num, 1 )
SetObjectLightMode(num,1)
inc num
next z
next x
next y
blockCount=num-1
setCameraPosition(1,-15,20,-35)
//setCameraLookAt(1,0,0,0,0)
repeat
if GetRawKeyPressed(KEY_LEFT)
//SetCameraPosition(1,camx#,camy#,camz#)
moveLeft()
endif
if GetRawKeyPressed(KEY_RIGHT)
moveRight()
endif
print(str(blockCount))
print(screenFPS())
sync()
until GetRawKeyPressed(27)
//fadeOut()
end
function moveLeft()
for num=1 to blockCount
if getObjectX(num)<-24
SetObjectPosition(num,getObjectX(num)+19,getObjectY(num),getObjectZ(num))
else
SetObjectPosition(num,getObjectX(num)-1,getObjectY(num),getObjectZ(num))
endif
next num
endfunction
function moveRight()
for num=1 to blockCount
if getObjectX(num)>-5
SetObjectPosition(num,getObjectX(num)-19,getObjectY(num),getObjectZ(num))
else
SetObjectPosition(num,getObjectX(num)+1,getObjectY(num),getObjectZ(num))
endif
next num
endfunction
function createTexture ()
for num = 1 to 20
r=random(50,255): g=random(50,255):b=random(50,255)
DrawBox(0,0,32,32,MakeColor(r,g,b),MakeColor(r,g,b),MakeColor(r,g,b),MakeColor(r,g,b),1)
render()
GetImage(num,0,0,32,32)
next num
endfunction
use the left and right arrows theres 8000 blocks and it should seem as tho it is never ending
I get 95 FPS
fubar