Jump to content

Searching for nearest tower


JT Hamelin
 Share

You are about to reply to a thread that has been inactive for 4512 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

I would like to start a new game. Each user will be given a comm device which will communicate with the nearest central comm hub (near or far, just whatever is closest). The hubs are going to be copiable by other land owners who are interested in the game. The problem I have is, I don't know how to find the nearest compatible device.

Link to comment
Share on other sites

There are several ways to secure the integrity of your communication:

  1. low negative channel number - this alone gives you some protection
  2. change the channels regularly. Let client and hub in a handshake (on a fixed channel) exchange information that forms the basis of the generation of the actual channel number on which to talk. This information gets transformed into a channel numbers by a logic which a hacker would have to find out
  3. in your messages, include a secret which you check against
  4. you could include some kind of authentication for the hubs - e.g. against some outworld db. whenever a client detects a hub, it asks that db if that hub is registered
  5. Finally, encrypt your messages  - if you google for LSL and encryption, you will find quite some stuff - this is however pretty slow in most cases

Just a few ideas that came to my mind.

Link to comment
Share on other sites

When you are on the road, how does your cell phone know which tower is the nearest? Call me in-world, I'll tell you:)

However your problem actually is not in processing towers' signals to calculate which is the closest,  but a tower sending a  signal to your "phone" in a different sim. (that is if you're planning inter-sim communications, otherwise it is trivial). Object's email is slow and not always reliable, besides has a lot of built-in restrictions. Maybe some kind of HTTP comm... that is yet TBD :)

Link to comment
Share on other sites

As Ela hints, "distance" has no real meaning in cyberspace.  If things are in the same sim they are all within range of llRegionSayTo(), if they are in different sims (but not within shout range) then it's llEmail() or llHTTPReqiuest().  It's easiest to have all comms going to a ventral server.

If grid-distance really is significant then the server can compare the avatar's position to all known hubs.  llVecDist() will tell you the distance between two positions and llGetRegionCorner() lets you calculate positions/distances/directions grid-wide rather than just in a single sim.

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 4512 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...