How do I use 2 sets of textures ?

Get help using Construct 2

Post » Wed Nov 06, 2013 7:59 pm

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 ?
B
49
S
15
G
6
Posts: 531
Reputation: 7,189

Post » Wed Nov 06, 2013 8:12 pm

You could use a different animation to store the frames and select the fitting animation depending on the resolution.
Visual Novel 'Engine' in 100 Events
if you ever have to choose between buying Construct 2 on scirra.com or on Steam, read this: Review
B
22
S
9
G
1
Posts: 787
Reputation: 3,786

Post » Wed Nov 06, 2013 9:07 pm

@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.
B
49
S
15
G
6
Posts: 531
Reputation: 7,189

Post » Wed Nov 06, 2013 9:24 pm

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.
Scirra Founder
B
387
S
230
G
87
Posts: 24,249
Reputation: 192,240

Post » Wed Nov 06, 2013 11:35 pm

@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 "" and check if resolution is bigger or less then HD Ready.
- If resolution is bigger, then the value for isHD will be "HD"
- All the events that have the instructions to change the animation will have the following structure: "AnimationName" & isHD

I also want to add stuff like particles if isHD = "HD".

Please correct me if I am wrong or if there is a better way to do what I want TGeorgeMihai2013-11-06 23:36:15
B
49
S
15
G
6
Posts: 531
Reputation: 7,189

Post » Thu Nov 07, 2013 8:35 pm

Anybody ?
B
49
S
15
G
6
Posts: 531
Reputation: 7,189


Return to How do I....?

Who is online

Users browsing this forum: marcoscodas and 14 guests