How do I use 2 sets of textures ?

0 favourites
  • 6 posts
From the Asset Store
Ambient Atmospheric Nature Music Inspired By Planet Earth
  • How do I use 2 sets of textures depending on resolution ?

    For games that run under HD Ready resolution (1280x720 or 720x1280), there will be a set of textures and if the resolution is over HD Ready there will be another set of textures (4x size of the original ones).

    I know how to check if Window Width * Window Height < 921600, but how do I make the game to choose the set of textures that should use ?

  • You could use a different animation to store the frames and select the fitting animation depending on the resolution.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • mindfaQ

    Thanks, I know that, my animations are Default and DefaultHD or Hurt and HurtHD ... etc

    I was wondering if there is a way to make the game to auto-select animationHD when the resolution is bigger than HD Ready.

  • You could just use one set of textures, for HD, and use letterbox scale mode. Then it just scales down the textures for low-res devices.

  • Ashley

    Thanks, but I'm a little greedy, I don't want to cover only more resolutions, but also different aspect ratios. My target is from 320x480 to 1920x1080 (landscape and portrait).

    At the moment I am using Scale Inner since Letterbox Scale is bad with aspect ratios.

    Also I want to use 2 sets of textures for the following reasons:

    • It will optimize the performance on devices with smaller resolution (waste of resources)
    • Pre-rendered smaller images looks a little better than scaled down images
    • To add an option to use lower graphics on slower hardware (let's say a tablet that has a resolution of 1280x800 but a weak CPU and GPU)

    I've found the following "solution":

    • Animations will be named AnimationName and AnimationNameHD
    • At the start of the first layout create a text global variable named isHD that have the value <font color=blue>""</font> and check if resolution is bigger or less then HD Ready.
    • If resolution is bigger, then the value for isHD will be <font color=blue>"HD"</font>
    • All the events that have the instructions to change the animation will have the following structure: <font color=blue>"AnimationName" & isHD</font>

    I also want to add stuff like particles if <font color=blue>isHD = "HD"</font>.

    Please correct me if I am wrong or if there is a better way to do what I want <img src="smileys/smiley20.gif" border="0" align="middle" />

  • Anybody ? <img src="smileys/smiley4.gif" border="0" align="middle" />

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)