Advertisement

Sorting blocks of memory

Started by September 02, 1999 02:55 PM
2 comments, last by FlyFire 25 years, 3 months ago
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

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

Advertisement
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

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

This topic is closed to new replies.

Advertisement