Basic and simple 2D drawing / animation

Basic Tutorials concerning: GUI, Views, Activites, XML, Layouts, Intents, ...

Postby dsgraham » Tue Feb 16, 2010 12:22 am

Thanks for this wonderful tutorial. I am running into a strange issue though.

I am creating a tiled map for a game with 20px by 20px tiles. When I place them with drawBitmap using X and Y's that are intervals of 20 I am getting overlapping tiles. Not by much but it is cutting the tiles short slightly.

Am I misunderstanding how the drawBitmap is working? or is there some scaling happening to the tiles that I need to know about.
dsgraham
Freshman
Freshman
 
Posts: 2
Joined: Mon Feb 15, 2010 11:24 pm

Top

Postby dsgraham » Wed Feb 17, 2010 5:21 pm

I figured it out. If anyone else reads this and is seeing the same issue here is the solution.
I had to copy all of my content from res/drawable into res/drawable-hdpi
this will keep the images from being scaled on a higher resolution platform.
dsgraham
Freshman
Freshman
 
Posts: 2
Joined: Mon Feb 15, 2010 11:24 pm

Re: Basic and simple 2D drawing / animation

Postby CodaBrink » Fri Feb 25, 2011 4:07 am

Marchu, I registered simply to say I love you.
CodaBrink
Once Poster
Once Poster
 
Posts: 1
Joined: Fri Feb 25, 2011 4:05 am

Re: Basic and simple 2D drawing / animation

Postby Shereef » Sun Mar 27, 2011 4:01 am

just wanted to say thanks for this example
and for some reason it didn't work at the begging so i had to re-create the project, some newbies may not be able to do so so i am attaching the re-created project
Attachments
Ballz.rar
same project re-created
(72.55 KiB) Downloaded 151 times
Shereef
Once Poster
Once Poster
 
Posts: 1
Joined: Sun Mar 27, 2011 3:58 am

Re:

Postby tanu10 » Wed Jan 25, 2012 10:39 am

:roll: :roll:
nithin.warier wrote:I said, i like the way you coded, its not sarcasm, its appreciation buddy...
like
tanu10
Freshman
Freshman
 
Posts: 2
Joined: Wed Jan 25, 2012 8:45 am

Top
Previous

Return to Novice Tutorials

Who is online

Users browsing this forum: No registered users and 4 guests