I am making a simple game to help me learn scripting. The game is based on Tag and uses a title attachment and a HUD. When the player who is "it" clicks on someone's titler it checks to see if they are in range and if they are they become "it" and the texture of the titler changes accordingly.
Currently I have it set up so that the game objects listen and speak on a channel. The HUD parses incoming messages, all of which start with the UUID of the player initiating the message. If the UUID of the message is the same as the UUID of the HUD owner, then it processes the message.
For example: So if Bob has a UUID of 3 (just a simple example here, don't want to come up with a real 36 character UUID
) and clicks on Joe's (UUID 4) titler, Joe's titler sends a message on channel 47. Bob's HUD checks the message to see if the UUID at the start of the message is 3. If it is, it would then see if Joe is in range. If he is, Joe is now "it" and the texture of his titler changes. Bob's titler texture also changes as he is no longer "it".Phew! Ok, here are my questions:
1) Is this going to be too laggy? If so, is there a better way to do it? My main concern is that each HUD has to at least parse every incoming message. It won't have to do anything else unless it hits a match, but it will have to do that anytime someone in range clicks on someone's titler. My plan is to use llWhisper since that keeps the range down to a 10m sphere and then find some other way to check to see if they are in range for the "tag".
2) How can I protect the game against griefers? One thing I thought of is to have the game use a random (non-zero) channel for each new game, but I am not sure how to authenticate communications between the game objects. I could have each game use a random "game id" but anyone who finds the game channel could easily grab that.
Are there any standard methods of securing comms between objects?
Thanks in advance for any advice you can provide! =D
SJ
