Wouldn't it be cool if your pet could communicate and interact with mine? I've been working on a pet protocol and am looking for some feedback. Here goes:
The goal is to develop a protocol that would allow pets to communicate and interact with other pets and avatars.
1) easy to understand and modify
2) open source which anyone can copy for free from the forum.
- Please do not post your ideas to this thread if you don't want other people to use it. =]
- It is completely acceptable if you wish to use any or all of the code in this post in your pets and sell them for profit.
We need some scale to show where the animal fits into the food chain and show what other animals would be concidered a threat, prey, or playmate.
food chain 0.0 - 1.0
*This scale is off the top of my head and Very likely to be changed.*
0.0 grass
0.1 sheep
0.15 birds, mice
0.2 house cats
0.3 dogs
0.7 hippo
0.8 shark
0.9 lion
1.0 godzilla
A pet will chat it's status on a the introduction channel (9000) once every 10 seconds.
(If 2 pets decide they want to chase each other they agree to communicate more often on some other channel.. need to think about that more.)
Here are the attributes to be chatted every 10 seconds.
attribute example
fight 0.3 what would the pet approach
flee 0.4 what would the pet run from
type dog
subtype beagle
action chase, hide, beg, eat
target sylvester/grass/bp (use target's key instead of name?)
offsetR relative offset from target. <-5,0,0> would follow 5m behind target
offsetA absolute offset from target. <-5,0,0> would follow 5m west of target
- - - -
inferred info (can be detected when the pet chats)
name spot (pet's name = object name)
key a0deec52-f289-7608-7064-a8bcf480e6d8
distance distance in meters, often a radius
now to list some behaviors or "action" (a + sign indicates a target is required - such as another pet or avatar)
+ eat
+ chase
+ avoid
+ follow/swarm/flock
+ bump/push
+ ride/perch
+ mimic
play dead
speak
sit
stay
sleep
+ jump over
dig
+ circle
+ play tag
+ beg
find
give/deliver
retrieve/fetch
meet
face/look
example introduction string:
"introduction + fight|0.3 + flee|0.4 + type|dog + subtype|beagle + action|watching + target|owner + offsetR| <-5,0,0> + group|6500"
example command string:
"command + action|follow + target|mykey + offsetR|<-5,0,0>"
[ question + knowncommands|1 ]
[ answer + knowcommands|1 + follow| + sit| ]
Is this protocol missing anything?
You can find some code to start out with at http://secondlife.com/badgeo/wakka.php?wakka=PetProtocol21

