Hello Guest

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - tyapichu

Pages: [1]
1
the problem is in DPI. for example i have a button. it has size 64x64 pixel and on Tab with 1280x800 10.1 inch screen (DPI about 150) it is suitable for finger touch. but on phone with 1280x768 4.5 screen (DPI about 300) 64x64 button is more than 2 times smaller - it's not suitable for finger. i'm checking DPI on start of game and changing CurrentPlatform to "2x" if DPI is more than 250 so game will use 128x128 art for my button on phone. but sprite size stays 64x64 meters which are not good for phone. my button becomse 2 pixels per meter but camera stays 1 pixel per meter. i have two ways to solve this problem: 1) change camera size to 2 pixel per meter (not usable in runtime, didn't find haw) or 2) change sprite size and position checking current CurrentPlatform. so i used second way - by changing button size it becomed like 128x128 meters and suitable for finger. but i'm not shure this way is good enought. first way whould be better i think. or you have another way to solve my problem i didn't find.

2
Have you looked at the tk2d camera override feature - this is meant to solve this very problem by rescaling the camera to fit. You design your game for one resolution, then have the override rescale it to fit other resolutions and aspect ratios. That totally decouples the 2 issues of resolution management, and detail management.

can you explain what should i do if difference between planforms is in DPI? i've got a Tab with 1280x800 resolution 10.1 inches and a phone 1280x768 4.5. i set tk2dSystem.CurrentPlatform = "2x" on smaller device accordingly DPI. but camera stays the same. i can't use camera override cause matching by Resolution or Aspect doesn't mutch to me. so i have to change sprite size. may be you've got better solution.

Pages: [1]