Hi there ... As we are at Christmas, here's a timelapse code .
// Project: Let it snow
// Created: 2018-12-23
// show all errors
SetErrorMode(2)
// set window properties
SetWindowTitle( "let it snow" )
SetWindowSize( 1024, 768, 0 )
SetWindowAllowResize( 1 ) // allow the user to resize the window
// set display properties
SetVirtualResolution( 1024, 768 ) // doesn't have to match the window
SetOrientationAllowed( 1, 1, 1, 1 ) // allow both portrait and landscape on mobile devices
SetSyncRate( 30, 0 ) // 30fps instead of 60 to save battery
SetScissor( 0,0,0,0 ) // use the maximum available screen space, no black borders
UseNewDefaultFonts( 1 ) // since version 2.0.22 we can use nicer default fonts
`our Sky
createobjectcylinder(4000,1000,180,40)
SetObjectCullMode(4000,2)
SetObjectColoremissive(4000,100,100,255)
`main floor
createobjectbox(100,100,1,100) :setobjectcolor(100,0,255,0,0)
setobjectvisible(100,0)
setcameraposition(1,-70,30,-70)
SetCameraLookAt(1,0,0,0,0)
`*************************************************************
`building floor
for i= 1 to 20
createobjectbox(i,5,1,100)
setobjectposition(i,-52.5+i*5,0,0) :sleep(10)
sync()
next i
for i= 1 to 20
setobjectcolor(i,0,255,0,0): sleep(10)
sync()
next i
for i= 1 to 20
deleteobject(i)
next i
setobjectvisible(100,1)
`**************************************************************
`making fence
for i=1 to 20
createobjectbox(i,2,10,0.1)
setobjectposition(i,-20+i*2,5,40) :sleep(10)
sync()
next i
`coloring fence
for i= 1 to 20
setobjectcolor(i,255,255,0,0) : sleep(10)
sync()
next i
`changing mesh object and deleting fence parts
createobjectbox(101,40,10,0.1)
setobjectposition(101,1,5,40) :setobjectcolor(101,255,255,0,0)
for i= 1 to 20
deleteobject(i)
next i
`making right fence
for i= 1 to 20
createobjectbox(i,0.1,10,2)
setobjectposition(i,21,5,41-i*2 ) :sleep(10)
sync()
next i
`coloring fence
for i= 1 to 20
setobjectcolor(i,255,255,0,0): sleep(10)
sync()
next i
`changing fence mesh and deleting fence parts
createobjectbox(102,0.1,10,40)
setobjectposition(102,21,5,19.5) :setobjectcolor(102,255,255,0,0)
for i= 1 to 20
deleteobject(i)
next i
`making litle house
for i= 1 to 15
createobjectbox(i,20,1,20)
setobjectposition(i,0,i,20) :sleep(10)
sync()
next i
`change house mesh and deliting house parts
createobjectbox(103,20,15,20)
setobjectposition(103,0,8,20)
for i= 1 to 15
deleteobject( i)
next i
sz=0
for i= 200 to 206
inc sz
createobjectbox(i,22-sz*3,1,20)
setobjectposition(i,0,15+sz,20) :sleep(10)
sync()
next i
setobjectcolor(103,255,190,175,0)
for i= 200 to 206
setobjectcolor(i,255,190,175,0) :sleep(10)
sync()
next i
`roof ***************************************************************
for i= 1 to 12
createobjectbox(i,1,1,20)
setobjectposition(i,-20+i,2,-5) :sleep(10)
sync()
next i
for i= 1 to 12
setobjectcolor(i,255,0,0,0) :sleep(10)
sync()
next i
createobjectbox(104,12,1,20)
setobjectposition(104,-13.5,2,-5)
setobjectcolor(104,255,0,0,0)
for i= 1 to 12
deleteobject( i)
next i
`positioning roof in its place *****************************************
for i= 1 to 16
setobjectposition(104,-13.5,2+i*1.1,-5) :sleep(10)
setobjectrotation(104,0,0,i*1.8)
sync()
next i
for i= 1 to 10
moveobjectlocalz(104,2.2) :sleep(10)
sync()
next i
for i= 1 to 3
setobjectposition(104,getobjectx(104)+i,getobjecty(104),getobjectz(104))
sleep(10)
sync()
next i
cloneobject( 105,104)
for i= 1 to 7
MoveObjectLocalX(105,1.5) :sleep(10)
setobjectrotation(105,0,0,-i*5)
MoveObjectLocalY(105,i/6)
next i
for i= 1 to 40
createobjectbox(i,2,1,2)
setobjectposition(i,20,i,-10) :sleep(10)
setobjectrotation(i,0,i*5,0)
sync()
next i
`tree trunk *******************************************************
for i= 20 to 40
setobjectrotation(i,0,random(0,180),0)
setobjectscale(i,11-(i/4),2,11-(i/4) ) :sleep(10)
sync()
next i
`joining parts of the tree
createobjectbox(300,0,0,0)
for i= 1 to 40
FixObjectToObject(i,300)
next i
for i= 1 to 19
setobjectcolor(i,80+random(0,70),10,10,0) :sleep(10)
sync()
next
for i= 20 to 40
setobjectcolor(i,0,150+random(0,100),0,0) :sleep(10)
sync()
next i
for i= 1 to 40
cloneobject(i+300,i)
setobjectposition(i+300,-20,getobjecty(i),30)
next
for i= 1 to 350
seterrormode(0)
setobjectcolor(i,255,255,255,0)
sync()
next
`snow
o=1000
for i= 1001 to 1300
createobjectsphere(i,5,3,3)
setobjectposition(i,-100+random(0,200),-100+random(0,200),-100+random(0,200))
SetObjectTransparency(i,1)
setobjectalpha(i,140)
next
do
`snow animation
for i= 1001 to 1300
moveobjectlocaly(i,-2)
if getobjecty(i)<-100 then setobjectposition(i,getobjectx(i),100,getobjectz(i))
next
Sync()
loop
Cheers.
I'm not a grumpy grandpa