Your First Game keeps giving me a blank screen?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By User457654654

Apologies for the newbie question. I just started working on Godot, and this happened to me twice. I was working on the tut “Your First Game” in the docs. I made it up to the point where I was working on the Main Node, and was about to start the HUD. I tested the game, as instructed, and I get a blank screen? I removed that project yesterday, and redid it today and got the same result. No Player, no Mobs. I am using the latest stable release of Godot. Here is the code for Main, as this one is most likely the issue.I wish I could tell you more, but I don’t have a clue what I did. Any help, please? Thanks.

extends Node

export (PackedScene) var Mob
var score

# Called when the node enters the scene tree for the first time.
func _ready():

# Called every frame. 'delta' is the elapsed time since the previous frame.
#func _process(delta):
#	pass

func game_over():

func new_game():
	score = 0

func _on_StartTimer_timeout():

func _on_ScoreTimer_timeout():
	score += 1

func _on_MobTimer_timeout():
	$MobPath/MobSpawnLocation.offset = randi()
	var mob = Mob.instance()
	var direction = $MobPath/MobSpawnLocation.rotation + PI / 2
	mob.position = $MobPath/MobSpawnLocation.position
	direction += rand_range(- PI / 4, PI / 4)
	mob.rotation = direction
	mob.linear_velocity = Vector2(rand_range(mob.min_Speed, mob.max_speed), 0)
	mob.linear_velocity = mob.linear_velocity.rotated(direction)

Are you sure you’re starting the correct scene? You can start either the scene designated as the “Main” scene via F5 or the Play button, or you can start the current scene via F6 or the Play Scene button.

I’d guess that you’re starting the wrong scene, either because you’ve designated the wrong scene as Main or you’re starting some other (incomplete?) scene via F6.

You can see/change the designated Main scene via:

Project | Project Settings | Application | Run | Main Scene

jgodfrey | 2020-06-08 14:35

:bust_in_silhouette: Reply From: User457654654

Jgodfrey, you were right. Thanks. For some reason, when I pressed Play, it kept starting Player.