This is an update of the skybox code originally posted by Sixty Squares
http://forum.thegamecreators.com/?m=forum_view&t=81853&b=1#post
`----------------------------------------------------
` Make Skybox
`----------------------------------------------------
function MakeSkybox(fileN$,size#)
`Global cube maps dir
dir$=dirCubemaps$
`Make skybox size global
Global iSkyboxSize#=size#
`Load images
f=freeImage() : load image dir$+fileN$+"_f.bmp",f
b=freeImage() : load image dir$+fileN$+"_b.bmp",b
l=freeImage() : load image dir$+fileN$+"_l.bmp",l
r=freeImage() : load image dir$+fileN$+"_r.bmp",r
u=freeImage() : load image dir$+fileN$+"_u.bmp",u
d=freeImage() : load image dir$+fileN$+"_d.bmp",d
`Create plains
for i = 0 to 5
obj=freeObject()
make object plain obj,size#,size#
if i=0 then Global oSkybox_f=obj : position object obj,camera position x(),camera position y(),camera position z()+(-1*size#/2) : texture object obj,f
if i=1 then Global oSkybox_b=obj : position object obj,camera position x(),camera position y(),camera position z()+(size#/2) : texture object obj,b
if i=2 then Global oSkybox_l=obj : position object obj,camera position x()+(size#/2),camera position y(),camera position z() : texture object obj,l
if i=3 then Global oSkybox_r=obj : position object obj,camera position x()+(-1*size#/2),camera position y(),camera position z() : texture object obj,r
if i=4 then Global oSkybox_u=obj : position object obj,camera position x(),camera position y()+(size#/2),camera position z() : texture object obj,u
if i=5 then Global oSkybox_d=obj : position object obj,camera position x(),camera position y()+(-1*size#/2),camera position z() : texture object obj,d
point object obj,camera position x(),camera position y(),camera position z()
`Make skybox less boxlike
set object ambient obj,0
set object texture obj,2,0
next i
endfunction
`----------------------------------------------------
` Move Skybox With Camera
`----------------------------------------------------
function MovSkybox()
position object oSkybox_f,camera position x(),camera position y(),camera position z()+(-1*iSkyboxSize#/2)
position object oSkybox_b,camera position x(),camera position y(),camera position z()+(iSkyboxSize#/2)
position object oSkybox_l,camera position x()+(iSkyboxSize#/2),camera position y(),camera position z()
position object oSkybox_r,camera position x()+(-1*iSkyboxSize#/2),camera position y(),camera position z()
position object oSkybox_u,camera position x(),camera position y()+(iSkyboxSize#/2),camera position z()
position object oSkybox_d,camera position x(),camera position y()+(-1*iSkyboxSize#/2),camera position z()
endfunction
http://3dfolio.com