Continous vertical scrolling space shooter

Godot Version



I been watching a few tutorials on YT and starting to plan my first game that, I hope, will be somewhat easy to finish.

I plan to do a space shooter like Xenon 2 on Amiga

My question is how I go about solving the continuous scrolling, that starts after a few seconds, and stops at the end. With parallax scrolling background. And of course the spaceship movement that doesn’t take the speed of the level scroll into consideration and moves same speed in all directions.

Only seen like horizontal shooters and top down that are moving in all directions based on player.

Anyone have any pointers, tutorials or something to help me get started with solving it?


extends ParallaxBackground

@export var scrollSpeed = -10;
@export var scrollSpeedY = 0;

# Called every frame. 'delta' is the elapsed time since the previous frame.
#func _process(delta):
func _physics_process(delta: float) -> void:
	scroll_base_offset.x += scrollSpeed*delta;
	scroll_base_offset.y += scrollSpeedY*delta;

It can be a little confusing to start… Y’ll need parallax backGround, parallax layer, and some sprite in this case iam using a tilemap.

The option is in the “parallax layer” / “mirroring” set the Y to the value you want, ( image height or whatever you want )

The background movement speed relative to the player Camera is in the “parallax layer” node under “Motion / scale” set it to 2 or -2 to go faster or slower then the player camera

1 Like

Thank you for your detailed answer. :smiley:

Would the process be completely different if I were to be doing the game as “2.5d”? Might be using Blender to create all the objects, and would be awesome with a 3d-background.

It should be the same process, but iam not sure… Maybe y’ll need code everything from scratch ( just the parallax backGround and parallax layer nodes )… The 3D doesnt have this nodes…
[ edit ] i dont know if the viewPort passes 3D into 2D, otherwise you could shove a viewPort into there… were the tileMap or image sould be…

1 Like

Thanks for answer! I’ll focus on 2d for now.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.