Hi, I'm new to godot engine and was trying to make a flappy bird clone for learning.
I plan to instantiate the background sprite from right going to left such that the speed at which sprite moves and the interval between instancing its copies make the background seem infinite. As of collecting the out of view sprites i came across scripting docs and found
tried to test it but it didn't work, (the node tab for sprite only shows Visibility_Changed() function only)
so my queries are:
1. how to instantiate sprite backgrounds?
2. how to manage their interval of instantiating such that they seem continous. (I've kept the sprite speed to 1)?
3. how do i code the sprite's script such that it deletes itself when exiting the view?
I'm using Godot v3, the root node is a sprite and scene contains no other node.
so far i've only manged to make the sprite move by the code:
var vel = Vector2(1, 0)
set_position(get_position() + vel)