# Calculating used space on a gaming board

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

## Recommended Posts

Hey there I just can't come up with a good solution to my problem.

I ma not exactly sure how to explain so i'll just go with examples.

http://imgur.com/a/xhDka

Finding out which side has most free spots on this one is pretty easy.

But what about this one? What would be a good solution to calculate which part has the most free pixels?

http://imgur.com/ALtsF1W

Thank you very much

Edited by Chiezy

##### Share on other sites

You can subdivide the regions with axis aligned rectangles (it seems the section of your cuts are either vertical or horizontal) and quite easily compute the area of the regions by summing all the areas of the rectangles.

##### Share on other sites

I do not understant what side means and what free pixel means based on the image.

##### Share on other sites
I think he is referring to that game concept where you try to carve out bits from the play area using horizontal and vertical lines. There is also a ball-like enemy (usually following a predictable path because it just bounces off whenever it hits a wall) in the play area and when it hits you or the line you are drawing you have lost. It used to be a popular game for the gameboy when I was young but I just cannot remember the name.

Still, that's all conjecture since the OP does not describe anything in a reasonable way.

• ### What is your GameDev Story?

In 2019 we are celebrating 20 years of GameDev.net! Share your GameDev Story with us.

• 28
• 16
• 10
• 10
• 11
• ### Forum Statistics

• Total Topics
634114
• Total Posts
3015570
×