Binary Space Paritioning

Binary Space Paritioning

sprinkles

Chrome Whore
2009 Sep 6 • 2547
10 ₧
Is it only for 3D?

I want to use it in Splatter Mario (minus the 3rd dimension).

Or is there a better format for 2d scenes?

I was thinking about using something like this:

Proprietary Format code
Solids { Rectangle:Tile:1 (64,64,100,100); Rectangle:Tile:2 (64,64,200,200); Rectangle:BridgeStart:3 (196,196,0,400); } Entities { Player:Mario:Start (64,64,10,10); Player:Mario:End (64,64,500,500); Enemy:Mushroom:Start (64,64,300,10); Enemy:Mushroom:End:Point (350,10); Enemy:Spikes:Start (64,64,250,250); Enemy:Spikes:End:Point (300,250); }
 
 
 
2010 Mar 30 at 21:44 UTC — Ed. 2010 Mar 30 at 22:19 UTC
SuperJer
Websiteman

2005 Mar 21 • 6673
BSP is not useful for 2D. It is for partitioning space, literally, into a binary tree.

There's just no use for partitioning a 2D plane into a binary tree.

You don't need to store visibility information in 2D. Everything is just in rectangles.
 
 
 
2010 Mar 30 at 22:41 UTC
sprinkles

Chrome Whore
2009 Sep 6 • 2547
10 ₧
So the format that I have would work?
 
 
 
2010 Mar 30 at 22:52 UTC
SuperJer
Websiteman

2005 Mar 21 • 6673
I don't see why not. Looks fine.

You'll probably need to add more to it as you go.
 
 
 
2010 Mar 30 at 23:39 UTC
Down Rodeo
Cap'n Moth of the Firehouse

Find the Hole II Participation Medal
2007 Oct 19 • 5486
57,583 ₧
You could use either a grid to define which objects are where and whether any of them can intersect or you could use some kind of bounding area hierarchy (though that would probably be complicated and not as useful).
 
 
 
2010 Mar 31 at 00:28 UTC
Page [1]