A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: optimizing tilemapping? any ideas or links or whatever

  1. #1
    Senior Member realMakc's Avatar
    Join Date
    Oct 2002
    Posts
    927

    optimizing tilemapping? any ideas or links or whatever

    for tile map 100x100 and more, to be drawn by beginBitmapFill()/drawRect(), I made an optimization routine that combines tiles with same fill into larger rectangles to have less drawRect() calls. however, my algorithm is suboptimal, as you can see here; I would like any pointers for existing solutions and/or ideas, anyone. even appropriate search terms could help. thanks
    Last edited by realMakc; 06-30-2010 at 02:08 PM.
    who is this? a word of friendly advice: FFS stop using AS2

  2. #2
    Junior Member
    Join Date
    Dec 2009
    Posts
    15
    This smells like an NP-complete problem to me. No real help to offer other than to suggest looking at packing problems and their solutions to see if those offer or lead to any insight. You may have already tried this, though.

    I'd be interested in whatever solutions you come up with, though.

  3. #3
    Senior Member realMakc's Avatar
    Join Date
    Oct 2002
    Posts
    927
    well... after short discussion elsewhere I found that, even if I manage to solve this with some kind of search algorithm, there are still show-stopper cases like checkerboard or noise patterns. so I went in totally different direction with pixel bender
    who is this? a word of friendly advice: FFS stop using AS2

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center