|
Radius stuff (Sdk)
Radius stuff // Sdk
Nov 11, 2000, 1:03pm
This is a multi-part message in MIME format.
------=_NextPart_000_0029_01C04BC3.3B028260
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Since it's really some top-secret project that noone can know about (at =
least not for another week or two) I'll just pretend that it's =
paintball, since it is somewhat similar. Now my paintball bot, I don't =
want people to be able to shoot people who are a certain distance away. =
(Note that I'm doing this in C++, and, due to all the other things the =
bot needs to do, this will NOT be a Xelagot) This involves some sort of =
circle algorithms to find if one avatar is within the radius of another =
avatar, I believe. If there is a different way of doing this than what I =
had guessed, please let me know, or if you do know how to do these =
algorithms, ALSO please let me know :-)
-Twisted Horizon
------=_NextPart_000_0029_01C04BC3.3B028260
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD W3 HTML//EN">
<HTML>
<HEAD>
<META content=3Dtext/html;charset=3Diso-8859-1 =
http-equiv=3DContent-Type>
<META content=3D'"MSHTML 4.72.3110.7"' name=3DGENERATOR>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT color=3D#000000 size=3D2>Since it's really some top-secret =
project that=20
noone can know about (at least not for another week or two) I'll just =
pretend=20
that it's paintball, since it is somewhat similar. Now my paintball bot, =
I don't=20
want people to be able to shoot people who are a certain distance away. =
(Note=20
that I'm doing this in C++, and, due to all the other things the bot =
needs to=20
do, this will NOT be a Xelagot) This involves some sort of circle =
algorithms to=20
find if one avatar is within the radius of another avatar, I believe. If =
there=20
is a different way of doing this than what I had guessed, please let me =
know, or=20
if you do know how to do these algorithms, ALSO please let me know=20
:-)</FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2></FONT> </DIV>
<DIV><FONT color=3D#000000 size=3D2>-Twisted =
Horizon</FONT></DIV></BODY></HTML>
------=_NextPart_000_0029_01C04BC3.3B028260--
Nov 11, 2000, 1:22pm
This is a multi-part message in MIME format.
------=_NextPart_000_0044_01C04BC6.031094C0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Nevermind, I got that worked out on my own (It's a stupid question.) =
Now, what is the most memory efficient way of holding the coordinates of =
avatars? If stupid old me were to try, I'd probably wind up with an =
array of structs, and I know for a fact that that isn't the most memory =
efficient way of doing these things. Please-o-please post to the NG or =
e-mail (minutely worse) any ways of holding the coords of multiple =
avatars that aren't so hard on my memory that you can think of.
Thanks in advance,
Twisted Horizon
[View Quote] twisted horizon wrote in message =
<3a0d5fca$1 at server1.Activeworlds.com>...
Since it's really some top-secret project that noone can know about =
(at least not for another week or two) I'll just pretend that it's =
paintball, since it is somewhat similar. Now my paintball bot, I don't =
want people to be able to shoot people who are a certain distance away. =
(Note that I'm doing this in C++, and, due to all the other things the =
bot needs to do, this will NOT be a Xelagot) This involves some sort of =
circle algorithms to find if one avatar is within the radius of another =
avatar, I believe. If there is a different way of doing this than what I =
had guessed, please let me know, or if you do know how to do these =
algorithms, ALSO please let me know :-)
=20
-Twisted Horizon
|
------=_NextPart_000_0044_01C04BC6.031094C0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD W3 HTML//EN">
<HTML>
<HEAD>
<META content=3Dtext/html;charset=3Diso-8859-1 =
http-equiv=3DContent-Type><!DOCTYPE HTML PUBLIC "-//W3C//DTD W3 =
HTML//EN">
<META content=3D'"MSHTML 4.72.3110.7"' name=3DGENERATOR>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT color=3D#000000 size=3D2>Nevermind, I got that worked out on =
my own (It's=20
a stupid question.) Now, what is the most memory efficient way of =
holding the=20
coordinates of avatars? If stupid old me were to try, I'd probably wind =
up with=20
an array of structs, and I know for a fact that that isn't the most =
memory=20
efficient way of doing these things. Please-o-please post to the NG or =
e-mail=20
(minutely worse) any ways of holding the coords of multiple avatars that =
aren't=20
so hard on my memory that you can think of.</FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2></FONT><FONT size=3D2>Thanks in=20
advance,</FONT></DIV>
<DIV><FONT size=3D2>Twisted Horizon</FONT></DIV>
<BLOCKQUOTE=20
style=3D"BORDER-LEFT: #000000 solid 2px; MARGIN-LEFT: 5px; PADDING-LEFT: =
5px">
[View Quote] <DIV>twisted horizon<JOSHUA_TRASK at CAPECOD.COM> wrote in message =
<<A=20
=
href=3D"mailto:3a0d5fca$1 at server1.Activeworlds.com">3a0d5fca$1 at server1.Ac=
tiveworlds.com</A>>...</DIV>
<DIV><FONT color=3D#000000 size=3D2>Since it's really some =
top-secret project=20
that noone can know about (at least not for another week or two) =
I'll just=20
pretend that it's paintball, since it is somewhat similar. Now my =
paintball=20
bot, I don't want people to be able to shoot people who are a =
certain=20
distance away. (Note that I'm doing this in C++, and, due to all the =
other=20
things the bot needs to do, this will NOT be a Xelagot) This =
involves some=20
sort of circle algorithms to find if one avatar is within the radius =
of=20
another avatar, I believe. If there is a different way of doing this =
than=20
what I had guessed, please let me know, or if you do know how to do =
these=20
algorithms, ALSO please let me know :-)</FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2></FONT> </DIV>
<DIV><FONT color=3D#000000 size=3D2>-Twisted=20
Horizon</FONT></DIV></BLOCKQUOTE></BODY></HTML>
|
------=_NextPart_000_0044_01C04BC6.031094C0--
Nov 11, 2000, 2:28pm
This is a multi-part message in MIME format.
------=_NextPart_000_0097_01C04BCF.4FF53F80
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
I don't know for certain if there is such a thing in C++ but see if =
there is a Vector class. It is like a dynamic array of Objects. (In =
other words, it accepts all objects derived from Object, which is all of =
them.)
_________________________
John Viper
http://www.jtsoft.net
"Java is a machine. You put Java code in one end, and money comes out =
the other." - Anonymous
=20
[View Quote] "twisted horizon" <joshua_trask at capecod.com> wrote in message =
news:3a0d6437 at server1.Activeworlds.com...
Nevermind, I got that worked out on my own (It's a stupid question.) =
Now, what is the most memory efficient way of holding the coordinates of =
avatars? If stupid old me were to try, I'd probably wind up with an =
array of structs, and I know for a fact that that isn't the most memory =
efficient way of doing these things. Please-o-please post to the NG or =
e-mail (minutely worse) any ways of holding the coords of multiple =
avatars that aren't so hard on my memory that you can think of.
Thanks in advance,
Twisted Horizon
twisted horizon wrote in message =
<3a0d5fca$1 at server1.Activeworlds.com>...
Since it's really some top-secret project that noone can know about =
(at least not for another week or two) I'll just pretend that it's =
paintball, since it is somewhat similar. Now my paintball bot, I don't =
want people to be able to shoot people who are a certain distance away. =
(Note that I'm doing this in C++, and, due to all the other things the =
bot needs to do, this will NOT be a Xelagot) This involves some sort of =
circle algorithms to find if one avatar is within the radius of another =
avatar, I believe. If there is a different way of doing this than what I =
had guessed, please let me know, or if you do know how to do these =
algorithms, ALSO please let me know :-)
=20
-Twisted Horizon
|
------=_NextPart_000_0097_01C04BCF.4FF53F80
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3Dtext/html;charset=3Diso-8859-1 =
http-equiv=3DContent-Type><!DOCTYPE HTML PUBLIC "-//W3C//DTD W3 =
HTML//EN">
<META content=3D"MSHTML 5.00.2920.0" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>I don't know for certain if there is =
such a thing=20
in C++ but see if there is a Vector class. It is like a dynamic =
array of=20
Objects. (In other words, it accepts all objects derived from =
Object,=20
which is all of them.)</FONT><BR>_________________________<BR>John =
Viper<BR><A=20
href=3D"http://www.jtsoft.net">http://www.jtsoft.net</A><BR>"Java is a=20
machine. You put Java code in one end, and money comes out the =
other." -=20
Anonymous<BR> </DIV>
<BLOCKQUOTE=20
style=3D"BORDER-LEFT: #000000 2px solid; MARGIN-LEFT: 5px; MARGIN-RIGHT: =
0px; PADDING-LEFT: 5px; PADDING-RIGHT: 0px">
<DIV>"twisted horizon" <<A=20
=
href=3D"mailto:joshua_trask at capecod.com">joshua_trask at capecod.com</A>>=
wrote=20
in message <A=20
=
href=3D"news:3a0d6437 at server1.Activeworlds.com">news:3a0d6437 at server1.Act=
iveworlds.com</A>...</DIV>
<DIV><FONT color=3D#000000 size=3D2>Nevermind, I got that worked out =
on my own=20
(It's a stupid question.) Now, what is the most memory efficient way =
of=20
holding the coordinates of avatars? If stupid old me were to try, I'd =
probably=20
wind up with an array of structs, and I know for a fact that that =
isn't the=20
most memory efficient way of doing these things. Please-o-please post =
to the=20
NG or e-mail (minutely worse) any ways of holding the coords of =
multiple=20
avatars that aren't so hard on my memory that you can think =
of.</FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2></FONT><FONT size=3D2>Thanks in=20
advance,</FONT></DIV>
<DIV><FONT size=3D2>Twisted Horizon</FONT></DIV>
<BLOCKQUOTE=20
style=3D"BORDER-LEFT: #000000 2px solid; MARGIN-LEFT: 5px; =
PADDING-LEFT: 5px">
[View Quote] <DIV>twisted horizon<JOSHUA_TRASK at CAPECOD.COM> wrote in message =
<<A=20
=
href=3D"mailto:3a0d5fca$1 at server1.Activeworlds.com">3a0d5fca$1 at server1.Ac=
tiveworlds.com</A>>...</DIV>
<DIV><FONT color=3D#000000 size=3D2>Since it's really some =
top-secret project=20
that noone can know about (at least not for another week or two) =
I'll just=20
pretend that it's paintball, since it is somewhat similar. Now my =
paintball=20
bot, I don't want people to be able to shoot people who are a =
certain=20
distance away. (Note that I'm doing this in C++, and, due to all the =
other=20
things the bot needs to do, this will NOT be a Xelagot) This =
involves some=20
sort of circle algorithms to find if one avatar is within the radius =
of=20
another avatar, I believe. If there is a different way of doing this =
than=20
what I had guessed, please let me know, or if you do know how to do =
these=20
algorithms, ALSO please let me know :-)</FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2></FONT> </DIV>
<DIV><FONT color=3D#000000 size=3D2>-Twisted=20
Horizon</FONT></DIV></BLOCKQUOTE></BLOCKQUOTE></BODY></HTML>
|
------=_NextPart_000_0097_01C04BCF.4FF53F80--
Nov 11, 2000, 2:57pm
As long as you're not leaking memory everywhere, is there a problem with
using the struct array?
For a P-10, P-20 or P-30 world, each part of the co-ordinate (X, Y and Z)
can be held within 2-bytes (smallint). I *think* it'll use a single 4-byte
block for 2 smallints (?) and once you've stored any additional information
you need on the avatar, you should be able to arrange it to be as memory
efficient as possible.
Unless you're expecting hundreds of people in your "paintball game", I think
memory usage is going to be the least of your problems.
The important thing is to make sure you're look after the memory properly.
Grims
[View Quote]john viper <jviper at jtsoft.net> wrote in message
news:3a0d73cb at server1.Activeworlds.com...
I don't know for certain if there is such a thing in C++ but see if there is
a Vector class. It is like a dynamic array of Objects. (In other words, it
accepts all objects derived from Object, which is all of them.)
_________________________
John Viper
http://www.jtsoft.net
"Java is a machine. You put Java code in one end, and money comes out the
other." - Anonymous
|
[View Quote]"twisted horizon" <joshua_trask at capecod.com> wrote in message
news:3a0d6437 at server1.Activeworlds.com...
Nevermind, I got that worked out on my own (It's a stupid question.) Now,
what is the most memory efficient way of holding the coordinates of avatars?
If stupid old me were to try, I'd probably wind up with an array of structs,
and I know for a fact that that isn't the most memory efficient way of doing
these things. Please-o-please post to the NG or e-mail (minutely worse) any
ways of holding the coords of multiple avatars that aren't so hard on my
memory that you can think of.
Thanks in advance,
Twisted Horizon
twisted horizon wrote in message <3a0d5fca$1 at server1.Activeworlds.com>...
Since it's really some top-secret project that noone can know about (at
least not for another week or two) I'll just pretend that it's paintball,
since it is somewhat similar. Now my paintball bot, I don't want people to
be able to shoot people who are a certain distance away. (Note that I'm
doing this in C++, and, due to all the other things the bot needs to do,
this will NOT be a Xelagot) This involves some sort of circle algorithms to
find if one avatar is within the radius of another avatar, I believe. If
there is a different way of doing this than what I had guessed, please let
me know, or if you do know how to do these algorithms, ALSO please let me
know :-)
|
-Twisted Horizon
Nov 11, 2000, 4:13pm
Nevermind, bot is finished. Very complicated, probably inefficient, but
beautiful all the same. Announcement should be made soon on the grand
opening of the world
-Twisted Horizon
[View Quote]grimble wrote in message <3a0d7a7d at server1.Activeworlds.com>...
>As long as you're not leaking memory everywhere, is there a problem with
>using the struct array?
>
>For a P-10, P-20 or P-30 world, each part of the co-ordinate (X, Y and Z)
>can be held within 2-bytes (smallint). I *think* it'll use a single 4-byte
>block for 2 smallints (?) and once you've stored any additional information
>you need on the avatar, you should be able to arrange it to be as memory
>efficient as possible.
>
>Unless you're expecting hundreds of people in your "paintball game", I
think
>memory usage is going to be the least of your problems.
>
>The important thing is to make sure you're look after the memory properly.
>
>Grims
>
>john viper <jviper at jtsoft.net> wrote in message
>news:3a0d73cb at server1.Activeworlds.com...
>I don't know for certain if there is such a thing in C++ but see if there
is
>a Vector class. It is like a dynamic array of Objects. (In other words,
it
>accepts all objects derived from Object, which is all of them.)
>_________________________
>John Viper
>http://www.jtsoft.net
>"Java is a machine. You put Java code in one end, and money comes out the
>other." - Anonymous
>
>"twisted horizon" <joshua_trask at capecod.com> wrote in message
>news:3a0d6437 at server1.Activeworlds.com...
>Nevermind, I got that worked out on my own (It's a stupid question.) Now,
>what is the most memory efficient way of holding the coordinates of
avatars?
>If stupid old me were to try, I'd probably wind up with an array of
structs,
>and I know for a fact that that isn't the most memory efficient way of
doing
>these things. Please-o-please post to the NG or e-mail (minutely worse) any
>ways of holding the coords of multiple avatars that aren't so hard on my
>memory that you can think of.
>Thanks in advance,
>Twisted Horizon
>twisted horizon wrote in message <3a0d5fca$1 at server1.Activeworlds.com>...
>Since it's really some top-secret project that noone can know about (at
>least not for another week or two) I'll just pretend that it's paintball,
>since it is somewhat similar. Now my paintball bot, I don't want people to
>be able to shoot people who are a certain distance away. (Note that I'm
>doing this in C++, and, due to all the other things the bot needs to do,
>this will NOT be a Xelagot) This involves some sort of circle algorithms to
>find if one avatar is within the radius of another avatar, I believe. If
>there is a different way of doing this than what I had guessed, please let
>me know, or if you do know how to do these algorithms, ALSO please let me
>know :-)
>
>-Twisted Horizon
>
>
|
|