This is what I have but it never fades to the title scene. The titlescene flickers into view when the logo scene begins. I'm trying to get a simple template working which allows me to fade between scenes as if they were sections of the game.
// Project: Template
// Created: 19-04-12
// show all errors
SetErrorMode(2)
// set window properties
SetWindowTitle("Template")
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(60, 0) // 30fps instead of 60 to save battery
SetScissor(0, 0, 0, 0) // use the maximum available screen space, no black borders
UseNewDefaultFonts(1)
#insert "klogo.scene"
#insert "title.scene"
klogo_setup()
title_setup()
global kfader as float = 100
global kfadetimer as float
global beginklogo as integer = 1
kfadetimer = timer()
global beginTitle as integer = -1
global titlefader as float = 0
global titlefadetimer as float
titlefadetimer = timer()
do
if beginklogo = 1
if Timer() > kfadetimer + 0.01
kfadetimer = Timer()
kfader = kfader - 0.8
klogo_fade(kfader)
endif
if kfader > 0
klogo_sync()
elseif kfader = 0
klogo_cleanup()
kfader = -1
beginTitle = 1
titlefadetimer = timer()
beginklogo = 0
endif
endif
if beginTitle = 1
beginTitle = 0
endif
if beginTitle = 0
if Timer() > titlefadetimer + 0.01
titlefadetimer = Timer()
titlefader = titlefader + 0.8
title_fade(titlefader)
endif
title_sync()
endif
Print(ScreenFPS())
Sync()
loop
Win 10 Pro - AMD RYZEN 7 Octacore 3.8ghz - 32GB DDR4 - RTX 2070 8GB