I searched everything on the internet but I cannot find a way to make a simple parallax background for my title screen.
In general, a way to show a horizontally repeating background that should work with any library capable of showing images:
image is a background image.
image2 is a second copy of the background.
On update:
// Move the background to the left.
image.x -= PerUpdateDeltaX;
// If the background is off the screen, move it back on.
// You can use modulo/remainder to do this better.
if (image.x < -image.width)
image.x = image.width;
// Put the second image to the right of the first.
image2.x = image.x + image.width;
To make this look good, the edges of the background image that touch need to be seamless.
Then, to make parallax (where there appear to me multiple layers moving in 3D), just add in a few more things:
PerUpdateDeltaX
values for each layer. To look good, the higher/closer layers should move faster than lower layers.