You have no
SYNC. The screen is only updated when you
SYNC (because you staretd with
SYNC ON)
sync on
hide mouse ;`hide the mouse
`create a sky
sky=1000
make object sphere sky,300
scale object sky,-100,-100,-100
`fog properties
fog on ;`turn the fog on
fog distance 200
fog color RGB(58,216,5)
`the number of boxes I want to use
maxBox=100
`create something to show depth
for boxVal=1 to maxBox
make object cube boxVal,5
position object boxVal, rnd(100), rnd(100), rnd(100)
next boxVal
`position the camera
position camera 50,50,0
SYNC
suspend for key ;`wait for a key to be pressed
end ;`end the program
or better still...
sync on
hide mouse ;`hide the mouse
`create a sky
sky=1000
make object sphere sky,300
scale object sky,-100,-100,-100
`fog properties
fog on ;`turn the fog on
fog distance 200
fog color RGB(58,216,5)
`the number of boxes I want to use
maxBox=100
`create something to show depth
for boxVal=1 to maxBox
make object cube boxVal,5
position object boxVal, rnd(100), rnd(100), rnd(100)
next boxVal
`position the camera
position camera 50,50,0
repeat
SYNC
until inkey$() <> ""
end ;`end the program
The second example introduces a loop, which is where you will eventually get to with your programming. In this case, you can do other stuff and keep refreshing the screen. For example, you can have a counter, just to prove it's continually updating...
sync on
hide mouse ;`hide the mouse
`create a sky
sky=1000
make object sphere sky,300
scale object sky,-100,-100,-100
`fog properties
fog on ;`turn the fog on
fog distance 200
fog color RGB(58,216,5)
`the number of boxes I want to use
maxBox=100
`create something to show depth
for boxVal=1 to maxBox
make object cube boxVal,5
position object boxVal, rnd(100), rnd(100), rnd(100)
next boxVal
`position the camera
position camera 50,50,0
repeat
text 20,20, str$(myCount)
inc myCount, 1
SYNC
until inkey$() <> ""
end ;`end the program