Difference between revisions of "User:Maunder/Suggestions"
From The Shartak Wiki
Jump to navigationJump to searchLine 19: | Line 19: | ||
* option: '''base range''' is 6 for whistlers underground (inside tunnels). | * option: '''base range''' is 6 for whistlers underground (inside tunnels). | ||
− | === Part II === | + | === Part II - Shout === |
For 2 AP, any human player over level 4 may Shout a short message (a few syllables). (A suggested implementation of message filtering is below.) Results: | For 2 AP, any human player over level 4 may Shout a short message (a few syllables). (A suggested implementation of message filtering is below.) Results: | ||
− | + | # Any player in the same location will get one of the following two '''identified messages''', depending on whether they understand the language: | |
− | + | #* If the listener is on the same side (Native/Outsider), or has the ''Expert Language'' skill, the listener gets: ''(Maunder) shouts, "(Leave me alone!)"'' | |
− | + | #* Otherwise, the listener gets: ''(Maunder) shouts something''. | |
+ | # Any player within distance 3 (base range -2) of the shouter will get a message, again, depending on whether they understand the language: | ||
+ | #* If the listener is on the same side, or has the Expert Language skill, the listener gets: ''Someone shouts to the (northeast), "(Leave me alone!)"'' | ||
+ | #* Otherwise, the listener gets: ''To the (northeast), someone shouts something.'' | ||
+ | # Any player not within distance 3, but within base range distance 5 of the shouter will get a message: ''You hear someone shout to the (northeast).'' | ||
Further options: | Further options: | ||
Line 30: | Line 34: | ||
− | + | === Implementation Notes === | |
Below are some pseudocode algorithms for tricky parts of implementing the above suggestions. | Below are some pseudocode algorithms for tricky parts of implementing the above suggestions. | ||
implementation of direction: | implementation of direction: | ||
− | #assuming not at same location (dx!=0 or dy!=0) | + | # assuming not at same location (dx!=0 or dy!=0) |
− | #given listener coord xl,yl, and whistler coord xw,yw | + | # given listener coord xl,yl, and whistler coord xw,yw |
+ | # result is direction string. | ||
dx = xw-xl | dx = xw-xl | ||
dy = yw-yl | dy = yw-yl | ||
Line 46: | Line 51: | ||
rough-counting syllables in a message: | rough-counting syllables in a message: | ||
# given distance d = sqrt (dx^2 + dy^2), and copy of message msg | # given distance d = sqrt (dx^2 + dy^2), and copy of message msg | ||
+ | # result is rough count of number of syllables | ||
msg =~ s/e\s+/ /g; # remove trailing e's (silent) | msg =~ s/e\s+/ /g; # remove trailing e's (silent) | ||
while (msg =~ s/[b-df-hj-np-tv-z]//) { syll++ } | while (msg =~ s/[b-df-hj-np-tv-z]//) { syll++ } | ||
while (msg =~ s/([aeiou]{1,2}|y)//i) { syll++ } | while (msg =~ s/([aeiou]{1,2}|y)//i) { syll++ } | ||
+ | ...wip... |
Revision as of 11:29, 9 January 2010
This is a page for me to write at length about my suggestions for improvement to the game.
Whistles and Shouts
Note: all distances in this suggestion are calculated the cartesian way [ d = sqrt (dx^2 + dy^2) ] see the attached picture for graphical representation of ranges.
Part I : Whistle
Whistles have base range 3.
for 1 AP, any human player over level 4 may Whistle. Results:
- Any player in the same location will get the identified message: (Maunder) whistled.
- Any player within base range (distance 3) will get a message: Someone whistled to the (northeast). See below for implementation of direction.
- If the whistler is outside, then: all inhabitants of huts within distance 1 (base range -2) of the whistler will also get the second message.
- If the whistler is inside a hut, then: all players outside within distance 1 (base range -2) of the hut will also get the second message.
- Enraged animals within distance 6 (double base range) will move preferentially towards the whistler for a while(?).
Further options:
- option: whistles cannot be heard by spirits
- option: base range is 6 for whistlers underground (inside tunnels).
Part II - Shout
For 2 AP, any human player over level 4 may Shout a short message (a few syllables). (A suggested implementation of message filtering is below.) Results:
- Any player in the same location will get one of the following two identified messages, depending on whether they understand the language:
- If the listener is on the same side (Native/Outsider), or has the Expert Language skill, the listener gets: (Maunder) shouts, "(Leave me alone!)"
- Otherwise, the listener gets: (Maunder) shouts something.
- Any player within distance 3 (base range -2) of the shouter will get a message, again, depending on whether they understand the language:
- If the listener is on the same side, or has the Expert Language skill, the listener gets: Someone shouts to the (northeast), "(Leave me alone!)"
- Otherwise, the listener gets: To the (northeast), someone shouts something.
- Any player not within distance 3, but within base range distance 5 of the shouter will get a message: You hear someone shout to the (northeast).
Further options:
- option: shouts cannot be understood by spirits
Implementation Notes
Below are some pseudocode algorithms for tricky parts of implementing the above suggestions.
implementation of direction:
# assuming not at same location (dx!=0 or dy!=0) # given listener coord xl,yl, and whistler coord xw,yw # result is direction string. dx = xw-xl dy = yw-yl ns = ew = if dx==0 or abs(dy/dx)>sqrt(2)-1 { ns = (dy>0)? 'north':'south' } if dy==0 or abs(dy/dx)<sqrt(2)+1 { ew = (dx>0)? 'east':'west' } result = ns.ew
rough-counting syllables in a message:
# given distance d = sqrt (dx^2 + dy^2), and copy of message msg # result is rough count of number of syllables msg =~ s/e\s+/ /g; # remove trailing e's (silent) while (msg =~ s/[b-df-hj-np-tv-z]//) { syll++ } while (msg =~ s/([aeiou]{1,2}|y)//i) { syll++ } ...wip...