autocam off
for i=2 to 900
g=rnd(5)
make object cube i,g
turn object left i,rnd(89)
position object i,200-rnd(400),g/2.0,200-rnd(400)
color object i,rgb(rnd(255),rnd(255),rnd(255))
next i
cls rgb(0,0,255)
print "sky"
print "sky"
get image 1,0,0,24,24
cls rgb(100,30,0)
for i=1 to 6
print "ground"
next i
get image 2,0,0,48,48
make object plain 1000,450,450
texture object 1000,2
pitch object up 1000,90
set object cull 1000,0
make object cube 1,2000
texture object 1,1
set object cull 1,0
set object light 1,0
position camera 0,1,0
do
control camera using arrowkeys 0,0.1,0.1
position object 1,camera position x(),0,camera position z()
loop
a big enough skybox positioned so that you are always at the middle and twice the size of your world means that wherever you go you can`t reach the sky and it cant clip your scenery, only in this example by walking off the edge of the world can you get far enough away to see the scenery clipped, and by then it`s so far away its not that noticable (you see scene clipping in commercial games, don`t waste energy trying to better something in C/Asm in basic, good games matter more than pretty visuals)
the sky is object 1 and just like the real world no matter how far you walk you can`t reach it, the ground is a plain object, number 1000, the first for next loop populates the scenery, you can alter that to what your pc can handle easily, cheers.
Mentor.
PS: don`t forget to turn off collision for the skybox object, since you are inside it you will always get collision if you don`t and that can cause issues
PC1: P4 3ghz, 1gig mem, 3x160gig hd`s, Radeon 9800pro w cooler (3rd gfx card), 6 way speakers.
PC2: AMD 2ghz, 512mb ram, FX5200 ultra, 16 bit SB.
Mini ATX cases suck.