Need Help with the Camera

I’ve just been looking at some of the Getting Started tutorials and wanted to do a bit with the first one involving the balloon. The following are my issues:

(1) I can’t seem to find anything that will move the camera. I want to make it follow the balloon after it moves more than half of the way up the screen. Also would like to know how to extend the scene in general since I want to start making a platformer at some point.

(2) How do I manage resolution throughout different devices. With the balloon game again, I noticed that as I switched between phones in the tester, in some of them the platform image at the bottom is cut off and in others you can see the background on the left and right in it. For platformers especially, I’d like to be able to control the resolution of the screen with pixel precision and maintain the exact same screen size throughout all devices.

Any help is appreciated. By the way, I’ve been working with Lua for about a year or so, such that I have a strong handle on the basics and more

Hello

  1. Generally your camera is fixed and you move the background in 2D.  So if you want the camera to move up you move your scene down. Scenes have no fixed width or height so you can have any size you want.  Do bear in mind hardware limitations on mobile devices and only load what is visible.  i.e. don’t load 100 screens wide - load maybe 2 and adapt as the player moves.

  2. This is a large subject and it really depends on the game you are trying to create.  You can zoom the screen so it always fills the device but this may lead to some stretching.  You can zoom the screen to fit one dimension (either width or height) and adapt the display accordingly.  There is not a one-size fits all solution as an iPad is wildly different dimensions to an Android phone.  Read this as it will explain the different modes

Hello

  1. Generally your camera is fixed and you move the background in 2D.  So if you want the camera to move up you move your scene down. Scenes have no fixed width or height so you can have any size you want.  Do bear in mind hardware limitations on mobile devices and only load what is visible.  i.e. don’t load 100 screens wide - load maybe 2 and adapt as the player moves.

  2. This is a large subject and it really depends on the game you are trying to create.  You can zoom the screen so it always fills the device but this may lead to some stretching.  You can zoom the screen to fit one dimension (either width or height) and adapt the display accordingly.  There is not a one-size fits all solution as an iPad is wildly different dimensions to an Android phone.  Read this as it will explain the different modes