realbasic-games
[Top] [All Lists]

Re: player location

To: REALbasic Games <realbasic-games at lists dot realsoftware dot com>
Subject: Re: player location
From: LMSpam at neuropop dot com
Date: Mon, 20 Dec 2004 16:31:47 -0500
Delivered-to: realbasic-games at lists dot realsoftware dot com
References: <EC01FF7D-52CC-11D9-8025-000A95688BEA at neuropop dot com> <1A0B8996-52D6-11D9-BAF9-000A95DB6C90 at fireyesoftware dot com>
I was sort of thinking along that line... now, I'm leaning toward a "World Name" approach. So each world ("Punk World", "Rock World", "Tekno World", "Britney World", etc) would report everybody to everybody else within it. Then the X,Z problem is sort of solved (since it's simply ignored), and leaves me expansion capabilities for my soon-to-be bazillion users...


On Dec 20, 2004, at 5:25 PM, Asher Dunn wrote:


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>



_______________________________________________
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>

<Prev in Thread] Current Thread [Next in Thread>