Tile Object as a background

Hello Dev. team,

i am working on a platformer game in which the platformer object does not move and the Tile BG is moving,

i used move Tile object with permanent force on x axis.

The game testing works fine on laptop,

when I exported it for android (apk), the bg got blurr pixel

wish if some one can help me with this.

Thanks
Stormer.

Hi,
That’s quite a blur, indeed. You have no effects set up, right?
Can you confirm if this is Tiled Sprite or Tilemap?
Can you confirm the pixel size of your asset?

Thanks @Gruk for your reply,
No effects for the BG tile sprite and yes it is a tile sprite not map.

The pixel size from piskel is 1920 W and 1080 Height.
Yet i did a custom size in sprite property to 4174 W and 1081 H,

In order to make sure it would last till the game is solved, i used change the width set to 1000*BG.width()
And change x position to -200000, the tile sprite move from left to right.

Thanks

I’m afraid that’s too big for mobiles to handle, try a smaller size, see if that fixes your issue.

You can probably do a background loop with the parallax extension (with a coefficient of 1 if you don’t want any parallax)
https://wiki.gdevelop.io/gdevelop5/extensions/parallax/reference

Keep in mind many mobile devices can only handle sprites that are 1000x1000, and newer ones can only handle 2000x2000 (Well, 1024x1024 and 2048x2048 to be precise).

I would put your BG tile sprite on it’s own layer, so it isn’t impacted by the camera movement. Then I would just use the “Change X offset” action to scroll the image. Set the tilesprite to be the same size as your resolution, and it should work more efficiently that way.

1 Like

My game resolution is 1360x 600 also i am making a zoom out for camera when the length of the word is too much.
that is why i cant reduce the sprite size itself, I have changed the actions to 30xBG.Width() and I will check.

@Gruk You mean to change sprite size or width from events??

I will check and let you all know.

thanks for your support

I was able to identify the problem and it is not the size of the sprit, it is the width selected.

I have the BG exactly the same with no movement or width modification and exported the game and it was perfect, I add movement and it was also working.

I had my BG width increased from properties to 38000 and set the BG x from properties to -38000and moved the object, at the start it was pixlated but it started to get better till it was near its end it was perfect.

so the main issue here is width, but I need help in making a scene long enough for a player to run (player is in the same position, it is the background that moves), I though of creating sprite tile object when tile is out of camera, but i wont be able to synchronize the shapes,

wish if you can support me with this.

Stormer

I didnt fine any information on the link shared, I am interested in making a BG loop.

Thanks Silver, Actually I did use a camera zoom only but I didn’t use a camera to move the objects, I just used change x for the BG, but I could try camera movement for each BG, yet it will still be a huge width.

[Solved] , What i came up with, I created a loop where I change the x of BG when its off my camera to start over from before the camera. i used 3 instance of bg for this so i have one at the scene, one after and one before.

the condition I used is if BGG>3707,change x position of BG to -1707. it works fine now.

Thanks

3 Likes