|
|||||||
This is a discussion on "Partitioning a coordinate system?" in the Top Mud Sites Advanced MUD Concepts forum : I'm trying to decide how best to implement a coordinate-based system. 1) First, for longterm referencing of position, is it better to partition space using (a) infinitely small points, or (b) finite, space-filling 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 ... |
|
You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our MUD community today! If you have any problems with the registration process or your account login, please contact us. If you are a registered member of the old TMS forums, please click here
|
![]() |
|
|
LinkBack | Thread Tools |
|
|
#1 |
|
Member
Join Date: Apr 2002
Posts: 123
![]() |
I'm trying to decide how best to implement a coordinate-based system.
1) First, for longterm referencing of position, is it better to partition space using (a) infinitely small points, or (b) finite, space-filling 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.) |
|
|
|
|
|
#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. |
|
|
|
|
|
#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 east-north-up 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 | 08-22-2006 05:49 PM |
| Account System Yay or Nay | darmir | Advanced MUD Concepts | 15 | 04-26-2006 10:04 PM |
| Stats System | darmir | Advanced MUD Concepts | 14 | 03-10-2006 05:17 PM |
| Coordinate-based codebases and muds? | Burr | MUD Coding | 3 | 05-16-2003 02:28 PM |
| system calls | Emit | MUD Coding | 5 | 07-21-2002 08:44 AM |
|
|