Changing sprite size on android devices.

I read through some tutorials on the libgdx site, and successfully made an animated brain walk around the screen depending on where mouse pointer ( or finger press on android ) was at. It works great, but on my android device ( Galaxy S4 ) the sprite seems very small. I read that you cannot change the resolution on android since the system controls it… so is the orthographic camera the only way to get my sprite to show up at a decent size?

Was hoping for a quick and dirty method just to get it working, but it keeps coming back to that darn Orthographic camera. :-\

Okay, are you talking about actual sprites IE- something like an enemy or a player Avatar moving around on screen, or just images like the UI?

For the Enemy/Player then it’s better to use the OrthographicCamera method. This is because just resizing your images on the fly can make for wonky gameplay, unless you make sure you do other things. This is because just resizing your sprites will not change the visual distance between them, or their positions in regards to the origin (Bottom left). This will cause hit boxes to be be off visually and can cause your characters abilities to start in the wrong place compared to their positions. You have to make sure that the scale affects everything that is being painted rather than just the sprites. Easiest way is by adjusting the Z of your Orthographic camera (Basically move your camera closer or further away from your camera).

For the UI, then I believe that you can apply a scaling factor to the Stage and it’ll propagate through everything.

Sorry. Yes I was referencing my player sprites, and I just found the Stage class after I wrote this… and yes it completely borked up my movement. ;D

So stretching the screen to fit the device is not the way to go.

I will just have to rewrite it all after I finish reading on the camera, but I guess that is the best way to learn. hehe.