ThreadBoard ArchivesSite FeaturesActiveworlds SupportHistoric Archives |
Avatar location (Sdk)
Avatar location // SdksweJul 31, 2003, 11:25am
hey, i need a little help with getting an avatars location. i want to know
if there is anyway of finding an avatars location, without the need of keeping a database which updates every time an avatar moves? thanx :) -SWE milestegJul 31, 2003, 11:39am
nope, that is only way , listenning to
avatar_change/avatar_add/avatar_delete events and storing these informations in whatever you want . Regards, MilesTeg "swe" <swe at swe-e.com> a écrit dans le message de news: 3f2918c3 at server1.Activeworlds.com... > hey, i need a little help with getting an avatars location. i want to know > if there is anyway of finding an avatars location, without the need of > keeping a database which updates every time an avatar moves? > > thanx :) > -SWE > > baron sweetmanJul 31, 2003, 12:46pm
"swe" <swe at swe-e.com> wrote in news:3f2918c3 at server1.Activeworlds.com:
> hey, i need a little help with getting an avatars location. i want to > know if there is anyway of finding an avatars location, without the > need of keeping a database which updates every time an avatar moves? > > thanx :) > -SWE > > you can store them in memory ofcourse strike rapierJul 31, 2003, 3:13pm
sweJul 31, 2003, 5:45pm
btw, anyone know how to get a newline in aw with the aw_whisper thing? :)
dont wanna make the poor bot keep on whispering to the same person, waste of bandwidth and cpu and all :) -SWE [View Quote] tony mJul 31, 2003, 6:41pm
C/C++: aw_whisper(12345, "one\ntwo\nthree");
Whether or not it allows that hasn't been tested [by me] yet. [View Quote] baron sweetmanAug 1, 2003, 5:21am
"strike rapier" <strike at Rapiercom.freeserve.co.uk> wrote in news:3f294e47
at server1.Activeworlds.com: > Isnt that basically... like keeping em in a database? > > - Mark > [View Quote] yes only without the database :) baron sweetmanAug 1, 2003, 5:23am
"swe" <swe at swe-e.com> wrote in news:3f2971dc at server1.Activeworlds.com:
> btw, anyone know how to get a newline in aw with the aw_whisper thing? > :) dont wanna make the poor bot keep on whispering to the same person, > waste of bandwidth and cpu and all :) > > -SWE > [View Quote] methinks it wastes almost the same bandwidth of you send 1 long message or several short ones. strike rapierAug 1, 2003, 3:13pm
Database = Structured list of attributes pertaining to a certain item...
like a struct or class ;) - Mark [View Quote] baron sweetmanAug 1, 2003, 4:20pm
"strike rapier" <strike at Rapiercom.freeserve.co.uk> wrote in
news:3f2a9fba$1 at server1.Activeworlds.com: > Database = Structured list of attributes pertaining to a certain > item... like a struct or class ;) Sorry my mistake i should have had my Oxford with me before answering you instead of using the everyday interpretation of the word as in database, an application which stores information permanently on a physical medium for later retrieval :) joemanAug 1, 2003, 5:14pm
There's six bytes of overhead in a aw_whisper message. So, considering \n
is two bytes, we can say that 4 bytes * number of lines that are being sent is saved ;). But, we also have the limitation of maximum message size and all that to take into account too :O. -Joe [View Quote] baron sweetmanAug 1, 2003, 5:45pm
"joeman" <joeman at bootdown.com> wrote in
news:3f2abc24$1 at server1.Activeworlds.com: > There's six bytes of overhead in a aw_whisper message. So, > considering \n is two bytes, we can say that 4 bytes * number of lines > that are being sent is saved ;). But, we also have the limitation of > maximum message size and all that to take into account too :O. > > -Joe That AFAIK being 255 bytes the overal savings are minute, so 'almost' as as close to the reality as possible without getting into to much detail :) But it does save on each line being preceded by the bots name which does look nicer i must admit. It would be a good idea if the whole SDK where overhauled taking modern pc's and bandwidth possibilities in mind. I've got a slew of functions i would like to see the limits taken off or extended. However viewing AW's present state is not likely to happen :( Maybe once they will see the light and make it open source. They could leave out the sensitive bits having to do with tunneling... Petrossa strike rapierAug 1, 2003, 7:52pm
\n = 2 bytes??? In Hex? I thought
\n = 0x10 and \n\l or whatever the other 1 was was 0x10 and 0x0D [View Quote] baron sweetmanAug 2, 2003, 5:03am
"strike rapier" <strike at Rapiercom.freeserve.co.uk> wrote in
news:3f2ae13b at server1.Activeworlds.com: > \n = 2 bytes??? In Hex? I thought > \n = 0x10 and \n\l or whatever the other 1 was was 0x10 and 0x0D > its \r \n for newline baron sweetmanAug 2, 2003, 8:19am
"strike rapier" <strike at Rapiercom.freeserve.co.uk> wrote in
news:3f2b8672$1 at server1.Activeworlds.com: > Ahh, but this is the programming newsgroup ;) > > - Mark > strange i always thought it was the SDK newsgroup, another thing learned. Tnx Mark strike rapierAug 2, 2003, 9:20am
Hmmm. I always just used chr(10) without problem...
chr(10) and chr(13) for carridge return - Mark [View Quote] baron sweetmanAug 2, 2003, 10:30am
"strike rapier" <strike at Rapiercom.freeserve.co.uk> wrote in news:3f2b9e82
at server1.Activeworlds.com: > Hmmm. I always just used chr(10) without problem... > > chr(10) and chr(13) for carridge return > > - Mark > [View Quote] strike rapierAug 2, 2003, 4:02pm
hmmmmm, the \r just gets anihalate when I try it.... only the \n remains.
Try pasting 10 and 13 dec chracters into the AW chat window, and then try sending them though a bot. - Mark [View Quote] baron sweetmanAug 2, 2003, 6:59pm
"strike rapier" <strike at Rapiercom.freeserve.co.uk> wrote in
news:3f2bfcc9 at server1.Activeworlds.com: > hmmmmm, the \r just gets anihalate when I try it.... only the \n > remains. Try pasting 10 and 13 dec chracters into the AW chat window, > and then try sending them though a bot. > > - Mark > i am talking about using a bot ofcourse :). How the AW browser handles special chars i am sure i dont know The whole issue was you asking why 2 bytes where used for a newline as Joe pointed out in response to my remark that the overhead of sending one large message filled with newlines was almost the same as sending seperate messages so the bandwidth waste would be of no concern. In C, and i seem to remember the same goes for Basic (but dont hold me to it the last time i really used Basic was somewhere in 1982) The \r stands for carriage return (which is 0A (10)) The \n stands for new line (which is 0D (13)) So if you create a text, you need to insert \r\n in the sentence to get it the go to a newline. The precompiler then translates the \r to hex 0A and the \n to 0D printf("mark\r\nthis is a new line"); ofcourse you can do: printf("mark\x0A\x0Dthis is a new line"); however this is somewhat cumbersome i think :) If you use only new line the cursor will stay where it was the last time If you use only carriage return the cursor will just return to the beginning of the line. Hence you need the pair to specify a newline, cursor at the start Us old guys might remember the time when we used a typewriter (you might find one in a museum somewhere) where you needed to push a large lever which ratcheted the roll a few clicks further while at the same time you could move the whole carriage to the left. Here the newline pair was born. This translated into a teletype instruction, which in turn was the base for this. I hope this puts this to rest..... baron sweetmanAug 2, 2003, 7:11pm
"strike rapier" <strike at Rapiercom.freeserve.co.uk> wrote in
news:3f2c2744 at server1.Activeworlds.com: > Hmmm, i always use \n only in printf's > > - Mark > so then you know why there is 2 bytes overhead for a newline and not one bowenAug 3, 2003, 4:13am
[View Quote]
God, was that a pain in the ass. There, the paper-jam was born.
-- --Bowen-- No of SETI units returned: 57 Processing time: 48 days, 5 hours. (Total hours: 1157) www.setiathome.ssl.berkeley.edu xelagAug 7, 2003, 3:22pm
On 2 Aug 2003 17:11:56 -0400, "baron sweetman"
[View Quote] >"strike rapier" <strike at Rapiercom.freeserve.co.uk> wrote in >news:3f2c2744 at server1.Activeworlds.com: > >so then you know why there is 2 bytes overhead for a newline and not one one byte: "\n" is one byte in binary, and that is what is sent. "\n" is only an escape sequence representing one byte and only one byte... one byte! :) Alex baron sweetmanAug 7, 2003, 3:40pm
"xelag" <xelag at digitalspace.com> wrote in
news:q525jvcq957dk69js24e8uil9kftmo56r2 at 4ax.com: > On 2 Aug 2003 17:11:56 -0400, "baron sweetman" [View Quote] \r \n sorry, 2 bytes baron sweetmanAug 7, 2003, 3:52pm
"baron sweetman" <petrossadeletethis at msn.com> wrote in
news:Xns93D0C6E6756BCpetrossa at 64.94.241.201: one > > \r \n sorry, 2 bytes > http://www.hyperdictionary.com/dictionary/crlf strike rapierAug 7, 2003, 6:20pm
We know... but try this:
aw_string_set(AW_CONSOLE_MESSAGE, "This is line one\nThis is line 2"); aw_console_msg(<you>); aw_string_set(AW_CONSOLE_MESSAGE, "This is line one part 2\r\nThis is line 2 part 2"); aw_console_msg(<you>); The \r is not really valildated, but both will print on 2 lines. - Mark [View Quote] |