I am developing a Windows Phone 7 game using XNA 4.0 which I plan to later port to iOS and android using Monotouch and Monodroid. My question is how to determine what texture size should I include? This is because the in-game objects that utilize the textures dont care about the actual texture size and just re-size them. Windows phone by its own exists in multiple resolution variants. Should I pick the highest resolution emulator and then measure the sizes of my in-game objects, and then re-size their respective textures to be the same?
|
|
Going from the emulator to an actual mobile device, keep in mind that the mobile device's performance characteristics will not match. In your particular case, keep in mind that texture-fetch on a mobile GPU is relatively slow. Therefore you want to minimise the amount of texture data that you are accessing for each pixel. Ideally you want the texture to be drawn at 1:1 scale on screen. For example, if you have a large texture that you scale down, then a small rendering region is going to have to load up a large amount of texture data. (Even if texturing only uses a few pixels from the texture, if they're far apart, unused pixels in between will get loaded into cache.) So, basically, try and store textures in GPU memory as close to their on-screen size as possible. Or use mipmapping, which will automatically select smaller versions of your textures when needed (and also gives you higher quality when scaling down). Trilinear filtering (interpolating between two mip levels) requires more texture fetch - but is still better than substantial downscaling. As for the maximum supported texture size, WP7 has a maximum texture size of 2048 (XNA Reach profile), as does iOS (from iPhone 3GS onwards, before it was 1024). The actual size you make your textures is more of a artistic consideration - and a consideration of how much memory you can afford. |
|||||
|
|
Max texture size for WP7 is 1k x 1k and from what I remember there is only 1 physical resolution available for WP7 480x800 so really if you are looking at different texture sizes it would only be for the other platforms. Windows Phone 8 introduced larger resolutions and the capability of utilizing much larger textures. If you want the maximum detail for each platform then you will likely wind up providing different rez variants for each distinct screen resolution in order to minimize the amount of scaling that is done. |
|||||||
|