Include "func_stars.bb"Graphics3D 1024,768,32,1Light=CreateLight()cam=CreateCamera()CameraRange cam, .01, 10000land = CreatePlane()tex = create_checker_tex(64,96,64,128,192,128,1,1)EntityTexture land, texEntityAlpha land, 0.5mirror=CreateMirror() sens# = 0.25centerofworld = CreatePivot () : PositionEntity centerofworld, 0,1,0PositionEntity cam,0,1,0For i = 1 To 1000 : AnimateStarfield() : Next ; let it create and move stars for 1000 cyclesWhile Not KeyDown(1) x# = x + sens : z# = z + sens PositionEntity centerofworld,Sin(x),1,Cos(z) PointEntity cam, centerofworld AnimateStarfield() ; cycling through the starfield algorythm RenderWorld () Color 0,255,0 Text 0,0, "PRESS [ESC] TO EXIT" FlipWendDeleteAllStars() ; deletes all star entitiesEndFunction create_checker_tex(red1,green1,blue1,red2,green2,blue2,scale_u#,scale_v#) texture_handle = CreateTexture(32,32,256) SetBuffer TextureBuffer(texture_handle) Color red1,green1,blue1 : Rect 0,0,32,32 : Color red2,green2,blue2 : Rect 0,0,16,16,1 : Rect 16,16,16,16,1 ScaleTexture texture_handle,scale_u#,scale_v# SetBuffer BackBuffer() Return texture_handleEnd Function