Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Tile Engine Difficulties

Status
Not open for further replies.

DelphiUniverse

Programmer
Sep 19, 2009
1
NO
Hi.

I am creating a map editor. I have some 127,000 unique tiles to choose from to form up the terrain. Each tile is 32 x 32 pixels big and uses 256 colors.

I need to have those tiles in memory at all times so that the the scrolling through the map happens smoothly. But my problem is how to implement them in memory. Should I use DIB Sections, DDB or DIB's?

I find that the GDI gets cranky at 10,000 objects per process. If i melt tiles together into big bitmaps, like maybe 64 bitmaps in each big bitmap, I can get away with the 10,000 GDI objects per process. But im still limited to the video memory. Should I use TMemoryStreams and load the tiles as I need them into the video memory?

I need tips how to implement those bitmaps into memory. It is a huge problem to me. Thanks for all help.
 
I would suggest offering up the tiles in pages. If you can categorize the tiles then you can show them to the user by category. Then you can load up the tiles when a category is selected.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top