Space in my bedroom is at an absolute premium, so i've applied the same format that the Chinese and Japanese use; when you run out of space to build out, start building up!
I have a small single mattress a bit smaller than a standard single bed (about 75 cm × 180 cm). I wanted the bunk bed to be about 4 foot off the ground, so the end of my sofa would fit under it.
After a lot of umming and ahhing and sizing out, I came up with a plan to build 2 end frames for each end of the door, then 2 supporting beams for the door running lengthways and finally sturdied with some braces of some sort around the legs.
So, time to get to work!