Camera Following Character and Oversized backgound

Making a top down game and have made a map up in tiler and imported it in via Lime.

I also have a background image that is 1440x960 (this is the size of my map). When the game loads the background image is automatically scaled down to fit the actual screen size, im probably missing something simple to keep it the right size?

My main question thought is regarding tracking the player with a camera. I want the player to move around the map and the camera to follow them as they walk around the full size (the 1440x960 map). Is it possible to do this and is it possible to do it without having the player in the centre of the screen and scrolling the background instead? I would rather have it focus on wherever the player is and move with him as needs be. So he can walk left until a certain point and then the camera will move with him.

Thanks

You could still move the map - what you'd do is check the map coords and if it was far enough up, down, left or right then you'd move the player instead.

I wrote something like this when I first started using Corona :)

As to resizing of the map, possibly something in config.lua? What dimensions and zoom are you set up for?

Peach :)

Using this in the config settings

width = 320,
height = 480,
scale = "letterbox"

That sounds fine - I'm unsure why it would resize the map. You're simulating an iPhone, or another device?

If you happen to have a sample handy demonstrating your resizing issue that you might put up I can try to take a look at it tomorrow.

Peach :)

views:1958 update:2012/2/10 9:26:24
corona forums © 2003-2011