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 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 <andrea.pai...@gmail.com> 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 <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 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 android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to