Game Development Reference
In-Depth Information
What just happened?
An entire topic could be written about this topic, although in this first example, we have a
very simple implementation on how to support multiple screen sizes since we are only tar-
geting iPads. Here we are saying: "Hey AppDelegate , I designed this game for a 768 x
1024 screen."
All the values for positioning and font size were chosen for that screen size. If the screen is
larger, make sure you grab the files from the hd folder and change the scale by which you
will multiply all my positioning and font sizes. If the screen has the same size I designed
the game for, use the files in the sd folder and set the scale to 1. (Android adds even more
complexity to this, but we'll tackle that in later in the topic.)
FileUtils will look for every file you load for your game first inside Resources | sd
(or hd ). If it doesn't find them there, it will try to find them in Resources . This is a good
thing because files shared by both versions may be added only once to the project, inside
Resources . That is what we'll do now with the sound files.
Search WWH ::




Custom Search