View Single Post
Old 01-07-2004, 10:42 PM   #3
karlan
Member
 
Join Date: Apr 2002
Location: Brisbane Australia
Posts: 74
karlan is on a distinguished road
How 3D are you talking here? if it is reallly 2D with arbitary room shapes and levels, it is handled differently to if it is properly 3D with no requirement for alignment of rooms.

For example, if it is 2D with a fixed height, and a rectangular room Must be aligned on the x, y axis, you only need 2 points (top-left, bottom right, the same if it is 3D and aligned -> top-front-left, bottom-back-right), circular/spherical rooms are trivial also (need a centre(X, Y, Z)-radius pair). Oval rooms can get more complicated, (again assuming that everything is aligned), a 2D ellipse has a minor and major axis to be considered, and a 3D ellipsoid, doesn't have to have a circular cros section, it can have 2 minor and 1 major axis in addition to it centre point. Then you have situations where the rooms touch, where do the touch, distance between centre of rooms, how much do they overlap...

Assuming you do not want a MMORPG style thing, and are using a 3D array or roomlets (sorry brainfried today) you can approximate a round (or oval) room and still keep thing interesting.

So... in short there are a lot of things to keep track of, you could even have a look at some RPG and FPS world editors to see how they handle 3D room/world designs (it wont directly help with the code, but...), you will also have to consider how much information will need to be transmitted to each character as they move around.
karlan is offline   Reply With Quote