// Project: Invisible
// Created: 20-05-03
// show all errors
SetErrorMode(2)
// set window properties
SetWindowTitle( "Invisible" )
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 )
SetSunDirection(0.5, -1, 0.5)
SetAmbientColor(0x80, 0x80, 0x80)
SetSunColor(0x60, 0x60, 0x60)
SetShadowMappingMode( 3 )
SetShadowSmoothing( 1 ) // Random sampling
SetShadowMapSize( 2048, 2048 ) // Shadow map size
SetShadowRange( 10000) // Use a short range for better shadows
SetShadowBias( 0.0012 ) // Offset shadows slightly to avoid shadow artifacts
ball = createobjectsphere(5, 12, 12)
SetObjectColor(ball, 0, 0xff, 0, 0xff)
SetObjectCastShadow(ball, 1)
SetObjectVisible(ball, 0)
box = CreateObjectBox(100, 1, 100)
SetObjectColor(box, 0x80, 0x80, 0x80, 0xff)
SetObjectPosition(box, 0, -10, 0)
SetObjectReceiveShadow(box, 1)
do
Sync()
loop