Best way to draw huge bitmaps?

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

Best way to draw huge bitmaps?

Postby Jorenm » Sat Nov 28, 2009 9:19 am

Like for an RTS game, where you have a whole map you're playing at, but you only need to render a small piece of it at a time. What would be the best approach to accomplish this?
Jorenm
Junior Developer
Junior Developer
 
Posts: 22
Joined: Sat Nov 28, 2009 9:16 am

Top

Postby padde » Sat Nov 28, 2009 12:09 pm

Usually you dont take huge images for this. You have a Tileset of smaller graphics and use them to build the map
part the user can see. Google for keywords like "Tile engine" or something like that. Maybe you find some gamedeveloper tutorials in c++.
padde
Master Developer
Master Developer
 
Posts: 443
Joined: Wed Apr 08, 2009 4:52 pm

Postby Jorenm » Sat Nov 28, 2009 9:57 pm

This is actually what I did. I did not know what it was called though. I have my tiles set to be the res of the droid so the max # I have to draw at once is 4. Is this the wrong approach? Its currently drawing the bitmaps to a canvas and is slow as hell. Any tips?
Jorenm
Junior Developer
Junior Developer
 
Posts: 22
Joined: Sat Nov 28, 2009 9:16 am

Postby padde » Sat Nov 28, 2009 10:07 pm

These tiles usually are really small .. like 64x64 pixels or even smaller.
But i am really not that experienced with game programming. Maybe
someone with mobile gaming experience will find this thread and give
some hinds. All i have ever done in this sector was a lame sokoban
clone for android :lol:
padde
Master Developer
Master Developer
 
Posts: 443
Joined: Wed Apr 08, 2009 4:52 pm

Top

Return to View, Layout & Resource Problems

Who is online

Users browsing this forum: No registered users and 10 guests