Best object for animated game?

Put problem concerning Views, Layouts and other XML-Resources (like AndroidManifest) here.

Best object for animated game?

Postby raggedtoad » Thu Apr 30, 2009 1:28 am

I am working on a game app and have hit a roadblock. I was wondering if anyone has a good suggestion on the best way to handle the following situation.

I have a surfaceview with a separate thread containing a game loop, and i want to draw a simple background and some simple objects on the screen. I want to be able to use android's build in animation functionality on these objects. Is there any easy way to do this? I have tried making the objects I want to draw over my background extend Drawable, but there is no animation support. And if I make them extend ImageView, which has animation support, there doesn't seem to be an easy way to actually update their permanent position on the screen.

I hope that makes sense, and thanks for any help.
User avatar
raggedtoad
Freshman
Freshman
 
Posts: 8
Joined: Fri Feb 06, 2009 6:04 pm

Top

Postby padde » Thu Apr 30, 2009 6:07 am

Does a invalidate call of the imageview not work?
padde
Master Developer
Master Developer
 
Posts: 443
Joined: Wed Apr 08, 2009 4:52 pm

Postby raggedtoad » Thu Apr 30, 2009 6:09 pm

No, calling invalidate within my class that extends ImageView does nothing.
User avatar
raggedtoad
Freshman
Freshman
 
Posts: 8
Joined: Fri Feb 06, 2009 6:04 pm

Same Issue!

Postby 298sam » Mon May 18, 2009 10:24 pm

Hi, I am currently experiencing this issue also (based my learning experience game on lunarlander code!)
Did you ever manage to find a way forward with this?

cheers
298sam
Once Poster
Once Poster
 
Posts: 1
Joined: Mon May 18, 2009 10:17 pm

Top

Return to View, Layout & Resource Problems

Who is online

Users browsing this forum: Majestic-12 [Bot] and 4 guests