Well, thank you for all the praise
Either way, I've gotten this little project to a usable stage. Some pictures:
Obligatory Kestrel:
http://i.imgur.com/SHz9Lqn.pngThe Red-Tail:
http://i.imgur.com/HYE350l.pngThe Fregatidae:
http://i.imgur.com/qW0uCVZ.pngIn the end, the fancy pathing algorithm I created ended up being completely unnecessary, but oh well, at least I had the opportunity to use graphs & paths in practice
I'm not really sure whether I should add code to prevent drawing of corners when there are two airlocks at the corner, like in the Red-Tail and the Fregatidae -- thoughts?
Code:
floorgenCustomizable parts include distance of border from room walls (floor margin), border width, and border & floor colors. Size of corners currently depends on floor margin.
@
rannlMore or less -- it breaks the rooms into single tiles, and then adds the four points constituting each tile into a graph, and connects them. The nodes can be connected either diagonally or orthogonally, totalling to 8 edges. This information is then used to determine whether the node is a corner (3 edges), an outer wall (5 edges), a "dent" (7 edges), double "dent" (6 edges), or inner wall (8 edges)
@
EstelConsidering that the algorithm absolutely minimizes the empty floor space, and is not aware of the hull image's shape in any way, this might prove rather difficult