This question is very closely related to a previous question of mine:
Scaling a game view with letterboxes?
My game runs at 480x800 right now but when the screen is smaller or bigger than that I want it to scale up/down the image while maintaining the aspect ratio to fit it as best as it can and then put black letterboxes on the top/bottom or left/right to fill in the left over space if it is of a different aspect ratio. The newly scaled game screen should be centered in the middle of the screen.
I don't know how to go about doing this at all since I want the playfield to be 480x800 because the touch controls use the X and Y coordinates of where the player touches the screen. So I have to figure out how to make it so if the display is centered then the (0,0) coordinate doesnt start in the middle of the letter box but in the top left corner of the playfield where it should be. Also I need to figure out how to make it so when the game is scaled up or down the touch screen controls still work relevant to the new position and scale of the scaled game screen.
I don't know which would be easier, having the game image rendered then scaled up or make it so the gameplay remains the same with object and item positioning but renders a higher resolution image and then have higher resolution image resources rendered on big screens and smaller ones on smaller screens so they're pre-scaled instead of scaled by the hardware or software.
I'm not sure what the best practice is or how to go about doing either method. Please help me out!