I am following the Your First Game tutorial.
Wrote the player movement as described but whenever I press F5 to test it (Or F6) it is stuck on the Godot Engine logo, also I cannot exit it from the windows I have to go to the engine and press the stop bottom.
I can minimize it, but I cannot force quit it.
I had this problem previously, then I quit and removed the project and created a new one, and after that it did work.
Is it a classic IBM error?
The code I wrote is like this:
export (int) var SPEED
screensize = get_viewport_rect()
var velocity = Vector2()
velocity.x += 1
velocity.x -= 1
velocity.y += 1
velocity.y -= 1
if velocity.length > 0:
velocity = velocity.normalized() + SPEED
position += velocity + delta
position.x = clamp(position.x, 0, screensize.x)
position.y = clamp(position.y, 0, screensize.y)