Verticle game scrolling

Make sure the background size isn’t over the max texture size for the device:

[lua]print(system.getInfo(“maxTextureSize”))[/lua]

This must be done on a device, or you’ll get your computer’s max texture size. And you’ll need to be able to view the print visually - try this:

http://developer.coronalabs.com/code/visual-loggingprinting-events

If that doesn’t work, you might try cutting your image into smaller ones and using them separately.

Caleb [import]uid: 147322 topic_id: 35062 reply_id: 139907[/import]

Thanks for your help Caleb!

The max texture size is 8192. My background is now 320 x 2048. It still doesn’t fill the screen. If I use multiple backgrounds, will it fill the screen? Also, how do you use multiple wallpapers?

Thanks again! [import]uid: 188277 topic_id: 35062 reply_id: 139913[/import]

Using multiple backgrounds would simply be a matter of creating separate images and using them together instead of one image and using it as the only image.

Caleb [import]uid: 147322 topic_id: 35062 reply_id: 140250[/import]

I just found Caleb’s library and I am using it in my game… I get no errors and it mostly seems to be working; however, the collisions are totally off.  My player is colliding with objects that are visually in a completely different spot on the screen.  Any ideas?

More then likely the physics/display groups issue - I recommend searching the forums for those issues and you’ll find the situation. To sum it up, Box2D doesn’t like display objects being in multiple display groups. I’m not sure how Perspective handles groups/physics, but knowing Caleb I’m sure he’ll be able to help. Simple solution: make sure there’s only one display group.

Thanks SegaBoy!  Sure enough the player and the ‘targets’ were in two different groups.  Issue fixed!

I just found Caleb’s library and I am using it in my game… I get no errors and it mostly seems to be working; however, the collisions are totally off.  My player is colliding with objects that are visually in a completely different spot on the screen.  Any ideas?

More then likely the physics/display groups issue - I recommend searching the forums for those issues and you’ll find the situation. To sum it up, Box2D doesn’t like display objects being in multiple display groups. I’m not sure how Perspective handles groups/physics, but knowing Caleb I’m sure he’ll be able to help. Simple solution: make sure there’s only one display group.

Thanks SegaBoy!  Sure enough the player and the ‘targets’ were in two different groups.  Issue fixed!