Using a large background for scrolling

Hi All!
I've done some searching through the forums for how to do a scrolling background but I'm still having trouble.

Basically, I have created a large background image with dimensions 10,240px x 768px. (yes that is 10x wider than 1024px to allow for 10 times the screen area for scrolling.)

Question 1) Is there a best practice for recommended image sizes to allow for easy scaling to the majority of mobile devices? I'm assuming I should import my images in the size of the largest iPad/tablet display resolution and then allow GameSalad to reduce the size for other devices. That way, if someone plays my game on a tablet the graphics will still look good. Or?

Question 2) When I place an instance of the background image (10,240 x 768) and and place the farthest left side in the viewable area and press play, the screen is just black.

I think it is because the Actor's X position is >1000. How do I get GS to allow the actors to move far far off the screen? I want the background to move from right to left. The background image is 10x wider than the viewable area.

I'm sure tons more questions to come later :)
Muchas gracias hehe
Aguazul

Comments

  • mataruamatarua Auckland, New ZealandMember Posts: 854
    That is not the way to do it unfortunately you will use so much memory up with an image that size I would be surprised if there's much left for the game.

    You need to tile your background. If it is repeating you can do this using gamesalads tile function in graphics.

    Depending on the type of background you can scale it too. I am pixel perfect and I still scale things like clouds and sky as they are soft and they can handle it fine. But it's a bit tricky to answer this without seeing the game or it's mechanic.

    To be honest usually the background does not scroll if done cheaply it's the foreground scrolling that gives the idea of parallax anyway. Other than that you use true parallax which is what I use. Or you have a flat stage.

    You also need to design your stage so you use tiles that work for best memory usage. So tiles should be 1024 x 1024 or 512 x 512 for example. Then depending on your stage you make up the tiles and can lay them out according to accurate data.

    Looks like you are aiming for ipad so you could make your tiles 1024 x 768 and that would be your best option, You only have 10 tiles then.
  • alexconsincalexconsinc Member Posts: 54
    i like turtles
  • thumbfrenzylabzthumbfrenzylabz Member, PRO Posts: 50
    @matarua. Good point about the memory use. The size of one of my background images was 1.4MB, which initially I thought wasn't really that big. But, if I multiply that by the number of planned levels, I quickly see it would be too big.

    @alexconsinc... thanks too for your insight :P
Sign In or Register to comment.