Top Mud Sites Forum Return to TopMudSites.com
Go Back   Top Mud Sites Forum > Mud Development and Administration > Advanced MUD Concepts
Click here to Register

Reply
 
Thread Tools
Old 01-28-2005, 06:10 PM   #1
Burr
Member
 
Join Date: Apr 2002
Posts: 123
Burr is on a distinguished road
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.)
Burr is offline   Reply With Quote
Old 01-30-2005, 11:18 AM   #2
Rhuarc
Member
 
Join Date: Jul 2003
Posts: 50
Rhuarc is on a distinguished road
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.
Rhuarc is offline   Reply With Quote
Old 01-30-2005, 12:16 PM   #3
Burr
Member
 
Join Date: Apr 2002
Posts: 123
Burr is on a distinguished road
Rooms, as the term is used in mu*s, would not be necessary either way. A given area of space may include more than one center, just as it may include more than one point in space. It would simply be a finite set of (potentially many) polyhedra rather than an infinite set of points.

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.
Burr is offline   Reply With Quote
Reply


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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off

All times are GMT -4. The time now is 11:53 AM.


Powered by vBulletin® Version 3.6.7
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Style based on a design by Essilor
Copyright Top Mud Sites.com 2022