[android-developers] Re: scaling game images according display sizes

2010-01-07 Thread Andrea
Hi Jason, On 7 Gen, 05:11, Jason Arora jaso...@gmail.com 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

[android-developers] Re: scaling game images according display sizes

2010-01-07 Thread tobias429
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

Re: [android-developers] Re: scaling game images according display sizes

2010-01-07 Thread Dianne Hackborn
If you are loading your images as drawables, the framework will pre-scale the bitmap for you so it shouldn't need to be scaled at draw time. If you are using the lower-level APIs to load bitmaps, you will need to use these appropriately to have them scaled for you. You can look at the various

[android-developers] Re: scaling game images according display sizes

2010-01-06 Thread Robert Green
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 andrea.pai...@gmail.com 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

[android-developers] Re: scaling game images according display sizes

2010-01-06 Thread Andrea
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

[android-developers] Re: scaling game images according display sizes

2010-01-06 Thread Jason Arora
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. Also, I don't believe you should be seeing a slow-down in compatibility mode... In my experience, it has worked pretty well. Are you testing this