On Dec 20, 2004, at 4:20 PM, LMSpam at neuropop dot com wrote:
having looked at NetMaze I see there are much easier ways to do
things...
<embarrassed grin>
ok... so moving to a RB dictionary/RAM based environment instead of
the disk-based php/mySQL based one, what would be a nice equivalent
to:
"Select * from gorillas where (x between myLoc.X-30 AND myLoc.X + 30)
AND (z between myLoc.Z-30 AND myLoc.Z+30)"
since my hopes are that I'll eventually have a bazillion users spread
out over vast cyber-distances
or since I currently have very few users, do I simply not worry about
X,Z distances and just tell everyone about everyone else? That would
be easier, but I *do* hope to have a bazillion users some day...!
You could divide up your world into sectors (say 100x100). Then each
time a character moved, you would update which sector that character is
in. Then you only have to tell each character about other characters in
the same sector.
Of course this is a problem along the edges of sectors. I have not used
this technique yet, so I don't know a solution for that.
This is how the books say to do it though.
Asher Dunn
--------------------------------------------------------
President and Head Developer of Fireye Software
<http://www.fireyesoftware.com/>
Make PDFs from your RB app
<http://www.fireyesoftware.com/code/pdfclasses/>
AIM and Yahoo: fireye7517
REALbasic 5.5.3 Mac OS X 10.3.5
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>
|