Drawing in the correct location in games


Last Updated:

  1. qoncept

    qoncept Member This Topic's Starter

    Joined:
    Nov 8, 2009
    Messages:
    18
    Likes Received:
    0
    I'm playing with the Lunar Lander sample code to get a better understanding of how to draw the graphics in a 2d game (my background is more in GUI and database). One thing I've never quite understood is the positioning of an object.

    The little bit I've done in the past (on PCs) is making sure I have a set width window. Then I move my objects around on a pixel grid. What is the best practice for placing an object when the screen can be different resolutions? I want the game to be the same on every platform, so do I draw it normally and transform the entire canvas? Is there a better reference for location than pixels? Looking at the Lunar Lander code, I'm having a hard time determining how it actually sets the position and whether it would look the same at different resolutions. Thanks in advance!
     

    Advertisement

Share This Page

Loading...