The version you uploaded to github does not have types set for the variables. It makes it much harder to decipher what your intent is with these variables.
However:
I am able to replicate the error if I let the GodotScreen time out and then hit the about screen and come back.
If I short circuit the screen by clicking on it and then go to about and come back I don’t get the error.
I haven’t found the culprit yet but there is some stuff that needs fixing.
There is a big issue here in ScreensCore.gd
ScreensCore.gd - Line 1939
If you put that print line in you will find this gets run 100’s of times.
if (ScreenToDisplay != PlayingGameScreen):
print("x")
InterfaceCore.DrawAllButtons()
InterfaceCore.DrawAllArrowSets()
Worse than that though is that if you put a breakpoint on line 1920 you will see that this code gets run in what appears to be every process frame.
elif ScreenToDisplay == TitleScreen:
DisplayTitleScreen() #line 1920
That needs to be fixed for sure.
It looks like you are using ScreenDisplayTimer as an old fashioned loop count down effectively creating a timer by making the system loop until.
If so, this is wildly backwards. It will not be consistent across different systems.
Godot has a built in timer node that is designed for this purpose. Use that.
There are a number of places where you have an equation rather than a value.
For example ScreensCore.gd - line 275 - use a named constant instead of calculation
ScreenDisplayTimer = (120*2)
This makes the system work harder than it needs to and makes reading your code more difficult.
In these places use a name constant instead.
const GODOT_SCREEN_DISPLAY_TIME:int = 240
const FAS_SCREEN_DISPLAY_TIME:int = 120 # or whatever time it actually is
...
ScreenDisplayTimer = GODOT_SCREEN_DISPLAY_TIME
There is a code block that sets ScreenToDisplayNext to FASScreen.
That is index 7 of Sprites.SpriteImage
Sprites.SpriteImage[7] is set to -1 and never changes.
What is FASScreen?
This screen is never used. I guess it is some fading thing you might implement later?
Line 287 ScreensCore.gd
elif ScreenDisplayTimer == 1:
ScreenToDisplayNext = FASScreen
ScreenFadeStatus = FadingToBlack
ScreenDisplayTimer = -1
if InputCore.MouseButtonLeftPressed == true || InputCore.KeyboardSpacebarPressed == true || InputCore.JoyButtonOne[InputCore.InputAny] == InputCore.Pressed: AudioCore.PlayEffect(1)
My guess is that none of this is being used yet except for the mouse click sound.
This isn’t causing an issue as far as I can tell. I am just trying get in tune with what is happening.