In my previous post on the GameAPI (original RFC here), I talked about map making and the concept of a room: a single location, regardless of size, that could contain other, smaller, locations. A house, being one large "room", could contain three smaller rooms, for a total of 4. Re-read my earlier post, as its discussion of the user-interface to these rooms will become a key consideration in the following discussion.
Progress on the GameAPI has been slow but steady, and I've only two or three remaining TODO items for the character creation framework before I'll consider it "done enough for now". Next up is room definition and map making, to which the earliest question is simply put: coordinate-based or unique names? I've decided on coordinate-based, and the following is a meandering set of reasons why.
A coordinate-based system would place each room in a simple three-dimensional space, such as 15,14,0. 15 and 14 are the x,y coordinates, and z, here 0, would refer to the vertical plane. If 0 is "ground floor" of the inn, then 1 would be the second floor, and -1 would be its basement. Coordinates would be unique to a namespace, specifically, the include file they've been defined in. If rooms/inn.inc
defines 15,14,0, it has nothing to do with the 15,14,0 in rooms/forest.inc
. Likewise, the measure of the vertical plane is unique to the namespace: for the inn it may refer to floors, but for the "overworld", it may refer to inner-earth, "outside", and space.