01282005, 06:10 PM  #1 
Member
Join Date: Apr 2002
Posts: 123

I'm trying to decide how best to implement a coordinatebased system.
1) First, for longterm referencing of position, is it better to partition space using (a) infinitely small points, or (b) finite, spacefilling polyhedra (such as cubes, rhombic dodecahedra, or truncated octahedra)? 2) Second, should free objects in open space be allowed to move (a) in any direction and/or for any distance, or (b) only from center to center of a polyhedral point? (Note that 1b and 2a are not mutually exclusive. One might allow an object to move with no respect to one's partioning of space, and then determine which partition the object is in for other purposes. Whether this is ever a reasonable approach, I'm not sure of.) 
01302005, 11:18 AM  #2 
Member
Join Date: Jul 2003
Posts: 50

Personally, I would stick with a standard 3d cartesian coordinate system  that means using infinitely small points, referenced with vectors (a 'point' in space being made up of an x,y & z coordinate)
There are plenty of 3d vector classes available that already do all (er, alof of, anyway) the math for you. (Let me know if you cant find one, and i'll send you my own (in c++)) If you only allow objects/actors to occupy the center of a space (whatever shape that space takes), then you'll have actors in the same room all occupying the same space, and you'll lose any benefit you would otherwise gain from using a 3d coordinate system in the first place. 
01302005, 12:16 PM  #3  
Member
Join Date: Apr 2002
Posts: 123

Quote:
Also, I think vector math should still work well as is. In fact, it is somewhat easier, since you are always working with multiples of the same simple numbers. For example, imagine a mesh of truncated octahedrons, where the square faces correspond to up, down, north, east, south, and west, and say each polyhedron has a diameter of 1 unit from square face to square face. Then going to the next center over in a positive, direction perpendicular to a hexagonal face (i.e., in an eastnorthup diagonal direction) would simply mean calculating of the original position + (3/4)*i + 2*j + 1*k. Two polyhedrons over would be the original position + 1.5*i + 4*j + 2*k. Moreover, one polyhedron due east would simply be the original position + 1*i. Etc. *Edit: I had to fix my math a bit, but the point remains pretty much the same. 

Thread Tools  
Partitioning a coordinate system?  Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Coordinate AND Room Based Codebase?  Mabus  MUD Coding  4  08222006 05:49 PM 
Account System Yay or Nay  darmir  Advanced MUD Concepts  15  04262006 10:04 PM 
Stats System  darmir  Advanced MUD Concepts  14  03102006 05:17 PM 
Coordinatebased codebases and muds?  Burr  MUD Coding  3  05162003 02:28 PM 
system calls  Emit  MUD Coding  5  07212002 08:44 AM 

