Jump to content

Retina / Auto Image Loading


Ninjadoodle
 Share

Recommended Posts

Hi Guys

 

I really like the look of Panda.js but I have a question ...

 

On the website it states that one of the features is ... Retina / Hi-res - Auto Image Loading.

 

I am really interested in how this feature works (I assume that it's the same as Corona SDK / Gideros ), but I can't find any documentation on it.

 

Could someone please help me out?

 

Thank you in advance!

Link to comment
Share on other sites

Hi fuzzee

 

Thanks for letting me know :)

 

It seems like this works the same way as Corona and Gideros.

 

Is there a setting somewhere that allows us to set the ratio for when the engine switches over to @2x gfx?

 

Also, can we also add @4x graphics for ultra hi res devices?

 

Thank you in advance!

Link to comment
Share on other sites

Thanks again for the reply!

 

I'm actually pretty impressed by Panda.js

 

It seems to be pretty easy to pick up and use.

 

The @2x graphics option is brilliant and I'm surprised that more engines don't take this approach.

 

I seems like it wouldn't be to much of a stretch, to also allow higher resolution images (for example @4x).

 

Perhaps the engines creator could let us know whether this would be feasible for the future?

 

Thanks for an awesome engine :)

Link to comment
Share on other sites

I'm still a little confused with the retina/hires setting.

 

The way I assume it works, is that you would select a base revolution and the engine will swap the images for @2x versions.

 

Eg. I work at 480x320, so the retina setting would load up higher resolution files but the dimensions would stay the same.

 

When I enable retina, the scene/canvas get made larger (but not quite double).

 

From what I can see, the resolution is increased but the sprite positions are not updated.

 

Is this something that has to be done manually?

 

I would really appreciate any help :)

Link to comment
Share on other sites

So, my base resolution is 480x320

 

With hires and retina enabled - the game is transformed into 960x640 while the object coordinates I set for the 480x320 screen remain the same.

 

if I do ...

 

if (game.system.width == 960) {
          var r = 2;
} else {
          var r = 1;
}
 
I can set object co-ordinates for a 480x320 resolution and multiply by 'r' in case the game is on a hires device. This will put all the actors in their correct positions.
 
Is there a way, the engine could do this automatically?
Link to comment
Share on other sites

  • 11 months later...

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...