Hi Andrea, I also wanted to avoid compatibility mode. More for the reason of being able to actually use the higher resolution rather than out of performance concerns.
For one of my games I applied a routine to scale the images myself upon start-up of the application just like you describe (I used Bitmap drawables). As the system then does not need to resize the drawables any longer upon drawing them on the screen, this has speed up the performance of the game quite drastically. Best regards, Tobias On Jan 7, 3:38 pm, Andrea <[email protected]> wrote: > Hi Jason, > > On 7 Gen, 05:11, Jason Arora <[email protected]> wrote: > > > Are you drawing in a separate thread (like the LunarLander example)? > > If not and your game is real-time, I seriously recommend switching to > > that model. > > I don't use a SurfaceView (like LunarLander) but a normal view because > in my tests I found it much more stable then the surfaceView. Keep in > mind that android was 1.5. With 1.6/2.* things maybe changed, I have > to test it. There are no threads in the game apart the one used for > loading all the images before the game starts. > > > > > Also, I don't believe you should be seeing a slow-down in > > compatibility mode... In my experience, it has worked pretty well. > > Trust me, with the code structure explained before the frame rate > slows down, I tested it on the DROID device at last london android > lab. > > Andrea > > > On Jan 6, 11:56 am, Andrea <[email protected]> wrote: > > > > Hi Robert, thanks for the reply. > > > Ok the images are loaded as Bitmaps (not drawable) and drawed on the > > > onDraw(Canvas c) method of a view. Inside that method I invalidate() > > > all the view. So the game runs as fast as it can. The game is using > > > dirty rects technique to redraw only the portions of the screen that > > > need to be changed. Here is the simply code structure: > > > > //on a view > > > private void onDraw(Canvas c){ > > > > //do staff > > > > invalidate(); > > > > } > > > > if you need some other info, tell me it. > > > > a.p. > > > > Robert Green ha scritto: > > > > > What's your design like? How are you drawing everything? If you tell > > > > me that, I can offer some suggestions. > > > > > On Jan 6, 9:02 am, Andrea <[email protected]> wrote: > > > > > Hi > > > > > I developed a game with the g1 in my mind. Now I want to support large > > > > > screen sizes but I don't want to add in the apk different images for > > > > > different screen sizes because now the apk is 3mb and when installed > > > > > trought market it became 6mb (due to protection on). If i have to > > > > > double the images to support new screens, the apk would be too heavy > > > > > (about 13mb, i think) so I'm wondering to know if scaling images at > > > > > runtime by myself (without compatibility mode) maybe the best way for > > > > > supporting larger screens. Someone tried this solution? Compatbility > > > > > mode does a great work in scaling images but it slows down drastically > > > > > the framerate (i think because the scale operation is made every time > > > > > an image is used/moved and not only once on the load of the image > > > > > itself). > > > > > > Thanks
-- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

