• Advertisement

Archived

This topic is now archived and is closed to further replies.

Sorting blocks of memory

This topic is 6804 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

The picture didn't make it, dude. What's the URL?

Is this for a memory handler? If it is, you probably don't want to be moving memory around that often, do you? That would be a fairly significant performance hit.

------------------
DavidRM
Samu Games

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
Sounds like a space filling problem, and i dont know if anyone has found a good solution for the general case yet. If the blocks were all squares, or other constraints it might be possible to sovle it. Failing that a brute force search perhaps using the popular A* would work.

-ddn

Share this post


Link to post
Share on other sites
This might looks like a tetris game. You have a block of memory and you have many rectangular blocks all different sizes. Each time new block arrived and i need to place it somewere in more efficient way. (as shown on picture). As all storage will be full, i need to remove last used block and reorganize all blocks again so they will take as less space, as possible. Anybody can suggest any ways to implement it?

------------------
FlyFire/CodeX
http://codexorg.webjump.com

Share this post


Link to post
Share on other sites
Yes, some problems with picture.
http://codexorg.webjump.com/images/blocks.gif .
Also you can just right click on the image box and select View Image.

I wanted to store sprites (make some kind of sprite cache) in video memory so sprite blitting can be accelerated with VBE/AF (That's for my NE project - more info on my homepage). Blocks (sprites) will be rectangles of any size.

ddnguyen, can you tell a little more about that "popular A*"?

Thanx in advance,

------------------
FlyFire/CodeX
http://codexorg.webjump.com

Share this post


Link to post
Share on other sites

  • Advertisement