Hello, after updating to cocos 3.13 my app crashes because of something to do with design resolutions and content scale factors. I have never used those features nor am I intending to use them. Have they became mandatory since 3.13?
And thats it. On all screens it will always take the same amount of “space” and will always be in the same relative position.
As for resources, I select the appropriate ones like this, where “high” is something like an iPad resolution and “medium” is 50% of “high”, and “low” is 50% of “medium”. So the scale of the sprites is always between 0.8f-ish and 1.2f-ish, which does not cause any distortion or some other bad stuff.
I do not understand why you want to calculate the position and the scale manually.
Design Resolution is here to allow you to set the position in absolute or relative coordinates. And you do not need to scale the position coordinates.
Because by using relative position (getContentSize().width or heigh * some_percentage) i know exactly where my objects will be no matter the orientation, size or anything. On the other hand design resolution constrains me to some fixed aspect ratio, size…
Anyway, I’m not saying that my approach is better or that design resolution should be removed or something similar. I was simply surprised that it became mandatory.
This is my current work-around if anyone needs this:
It is FAR easier to work with floats that range from 0.0f to 1.0f than, say, having some size that you made up (like 800x480) and working with that.
I would much rather see my position as {0.25f, 0.1f} than {200, 48}, because no matter the screen I’m running at I always know approx. where my object will be.
And {200, 48} just doesn’t make sense if i would be be porting some game i made for 800x480 phone to Apple TV (<- just an example!!!).
OK. I understood you. Apparently it’s a matter of preference which to use. getVisivleSize() is a good choice for me because I prefer to work in the 480x800 coordinates. But it is not so attractive for you.
In any case, you have already found the work-around.