replacing sprites with smaller version possible?

Discussion and feedback on Construct 2

Post » Tue Jun 25, 2013 8:24 am

Just checking, because I do not think it is possible in Construct yet. However, the current game I am working on uses too much memory for mobile. A simple solution is to replace the current sprites with lower resolution ones. However, Construct does not keep the original's relative scale, and scales it down.

It would be great to have an option that we could replace assets with lower or higher resolution versions, and all the instances in our project would update without changing the relative scale.

For example, suppose I change a sprite to a 50% version. Construct would then automatically calculate that all instances used are relatively scaled up by that value, no matter their actual size in the layout.

Win7 64- i7 [email protected], p6t Deluxe v1, 48gb, ATI 7970 3gb, EVGA 590 3GB, Revodrive X2 240gb, e-mu 1820. Screens: 2 x Samsung s27a850ds 2560x1440, HP 1920x1200 in portrait mode
B
30
S
10
G
8
Posts: 170
Reputation: 7,074

Post » Tue Jun 25, 2013 8:52 am

Agreed, it has been asked for before so here is hoping it is on Ashley's list
B
37
S
9
G
5
Posts: 437
Reputation: 6,094

Post » Wed Aug 21, 2013 6:59 pm

I found a simple workaround: open the generated javascript file, and use the editor's find function to look for the object definition's image name to replace (name of image in images folder). Scale down the image, and replace the original. Then replace the width and height values with new ones.

Full sprite sheets take more effort.

This method only works well for sprite objects with just one single frame, or perhaps a couple of frames. A larger spritesheet would take more work - though someone could potentially write a small utility to scour the source code for sprite objects, and change the values accordingly in one go. Luckily enough image points are set in percentages, and not absolutely.
Win7 64- i7 [email protected], p6t Deluxe v1, 48gb, ATI 7970 3gb, EVGA 590 3GB, Revodrive X2 240gb, e-mu 1820. Screens: 2 x Samsung s27a850ds 2560x1440, HP 1920x1200 in portrait mode
B
30
S
10
G
8
Posts: 170
Reputation: 7,074


Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 7 guests