Graphics Set Questions

As a newcomer to mobile development, it’s very hard for me to understand how to solve the problem with different screen sizes. Now I have a few questions. 1 - Do I understand correctly that I have to make several sets of all used graphics for different prefixes of increase (x2, x4, etc.)? 2 - Will these kits fit if the game is running on a tablet, or do tablets need a separate version of the game? 3 - I was advised of such a config for my game (guess a movie by frame, only portrait orientation):

	content =
	{
		width = 320,
		height = 568,
		scale = "letterbox",
		fps = 60,
		
		imageSuffix =
		{
			["@2x"] = 2.0,
			["@4x"] = 4.0
		}
	},

Or is there an option that is more interested in your experience, how are you doing? 4 - The x2 prefix means a set for screens twice the size of the image. Does this mean that the original set needs to be done for some minimum screen size (which is quite widespread)? 5 - With my config settings, can I put the button so that it starts from the edge of the screen indicating its coordinate along x = 0 or when scaling it can still run a little? 6 - Graphics sets for x multiple increase, as I understand it, are the linear sizes of images, and what should be ppi, is 200 ppi enough? 7 - What size should be followed when creating sheets of images, is it possible to put all the graphics in a sheet of 2500 x 2500 px 200 ppi or do I need to break it into smaller parts?

Many thanks for your help.

Hi @neo_freeman,

Read

Have a nice day:)
ldurniat

1 Like

Thank you, I read it, but did not understand everything, so I decided to ask. In particular, if it is not difficult for more experienced comrades to explain to me:

1 - what should be the resolution of images? 200 ppi, 300 ppi?
2 - a set of images without a suffix will be used if the device screen approximately matches the width and height specified in the config, or devices with smaller screens, right?
3 - for easy scaling of the letterbox, how are the images indicated for filling black bars? I looked at my applications in the simulator on different devices, but I did not find such bands anywhere.
4 - what restrictions should be followed when creating a sheet of images. I have the temptation to arrange all the graphics in one big sheet of 2500 x 2500 which will be larger than 5 mb.

  1. PPI or DPI doesn’t really apply in this case. When you are using images in your apps/games, you load them using specific resolution, e.g. 200 pixels by 100 pixels. What resolution depends on your image, content area and intended use. For instance, I use 960x640 content area and I design my games around that.

  2. Correct. Images without any suffixes will be used until the scale factor reaches one of the points defined in your imageSuffix table, i.e. 2.0 and 4.0. Once the resolution reaches one of these points, then Solar2D will automatically load the appropriate images.

  3. There are so many different ratios and sizes for Android devices that you shouldn’t even try to create images that will “perfectly fit them all.” Here’s a great tutorial on understanding content scaling in Corona/Solar2D.

  4. When creating images/sprite sheets, you should try to adhere to power of two sizes. Also, some Android devices will have issues with requiring individual images that are above 2048x2048 pixels in size and you need to use heap memory to load them. You could create one sheet that is 2048x2048, for instance, and another one that is 1024x512 and you’d save on texture memory. Also, just in case, create separate sheets for your default, @2x and @4x variants.

3 Likes

Thank you, it became clearer. I want to clarify, so I should stick to the size of the sheets of images no more than 2000 x 2000 px. And what about a set of graphics, for example, for imageSuffix = 2.0. Should I create a 4000 x 4000 px image in this case? Or, in the case of drag coefficients from large image sheets, is it worth giving up?

If you are using any larger than 2048x2048px (regardless of what variant) on Android, then you need to look into https://docs.coronalabs.com/guide/distribution/advancedSettings/index.html#large-heap.

If you use sprite sheets and @2x and @4x variants then you could, for instance, have a default sheet the size of 512x512, @2x the size of 1024x1024 and @4x the size of 2048x2048.

The entire purpose of using sprite sheets is to minimise texture memory usage and as such you shouldn’t often need to create larger image sheets than that. Just create more of them, not larger ones.

2 Likes