I am a little familar with MySQL but thinking about implementing this feature makes my brain hurt. I need a system where you can set the "cost" of an area say between the coordinates X=20 Y=20 WIDTH=20 HEIGHT=20 at cost of 15 per pixel, now if you place another area within this area, say at X=25, Y=25, WIDTH=10, HEIGHT=10 at cost of 5 per pixel the previous area is broken down into 4 parts and the middle is wiped in favor of this area.
I would also like to be able to calculate the "cost" of an area between certain pixels. Hope I've explained that in a manner most of you will understand. I have no idea where to start.