Jump to content

Retina graphics?


enpu
 Share

Recommended Posts

Not sure if there is an example out there, but I've got multiple graphic scales in my game. One for desktop and one for mobile.
In my case I used user agent sniffing, but I think the correct way is to look at the devicePixelRatio property and then change your resource path based on that.

 

Then of course use percentages for your layout.

Link to comment
Share on other sites

Yeah, using devicePixelRatio to check is the way to go. It also depends on the framework that you are using.

 

In my last game, I took the same approach as the one in coco2d, which is working with the position in term of point instead of pixel, and multiply the point by a scale multiplier depending on the device's pixel ratio.

 

What suck is that an iPod Touch 4th gen, while it is a retina graphic device, doesn't seem to handle all the large graphic quite well. I think it's the only device that has this problem so maybe you can ignore it and focus on other high end models.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...