I've been working on a simple Space Invaders type game for my iPhone, and it's working okay so far, but it's using absolute sizing (which of course is a big no-no). So it looks great on my iPhone 5 in portrait, but if I want it to look right on my sister's iPod or my friend's Droid or a my laptop, I'll have to change that.
I've tried to use percentages, but this causes some pretty funny effects when I switch my phone to landscape. I know I could put the game area in a fixed-width div and use CSS media query to dynamically resize it based on screen width (or height) but that hasn't worked in previous attempts either. I remember seeing something ages ago where you could set up the game area to take up the whole screen in the intended orientation (i.e. portrait for Tetris and landscape for Angry Birds) and have it smaller but centered on the page when in the incorrect orientation (i.e. a portrait game in landscape would still take up the whole height of the screen but there'd be empty space to the left and right). I don't know how this could be done, but that'd kind of the effect I'd like to create.
So in other words, my question is: how do I keep the entire game area on the screen, covering as much of the screen as possible, and still look okay the orientation is not ideal? This may seem like a simple question to some (or at least I hope it is, lol), but it's one I haven't been able to figure out just yet, so any information on the subject would be greatly appreciated. Thanks.