Wow. Love this! Do have a programmer's list? If so I want in! If not, I hope you make one. So now I finally understand vectors--a little anyway. Awesome!
Check out my games at
www.ThePionEar.net
and my music, and that of my band, at
www.ThePionEar.net/BlindLabyrinth.html .
If you want to reach me, you can call 419-744-0517, friend me on Facebook, (KenWDowney,) or write me at [email protected] .
Crazy Ken
----- Original Message ----- From: "Cara Quinn" <[email protected]>
To: "Gamers Discussion list" <[email protected]>
Sent: Thursday, April 25, 2013 1:08 AM
Subject: Re: [Audyssey] another community project


And here's one on vectors

Smiles,

Cara :)
---
 Hey All, lovely eve to you!.

 I thought I'd take a few minutes and just elaborate on vectors for a bit,
without going so much into the introductory ideas of X and Y coords.  This
way, by just going a bit further into it, it might make a bit more sense.
If that, in itself makes sense!  lol!

 Anyway, assuming you're all pretty familiar by now with X, Y, and Z
coords, let me just say that vectors are in essence, simply lines.
This is a bit over simplified, but for now it will work.  <smile>  A line
has a start point, an end point, a direction, and a length.  In terms of
maths, and more specifically, vectors, think of the length of a line, as
it's magnitude. AT least, this way, the terms will make a bit more sense if you'd like to look this up on Google or such, and for those who are already
familiar with this sort of math, it will just make a bit more sense.
<smile>

 So, until now, I've been mentioning point coordinates and such, while
alluding to movement and velocity and such, but not really going into more
detail on what's actually happening on the math side to actually do the work
in essence.

 To do this, let me just touch on the above starting and ending points of
our line.  As we said above, each vector has a magnitude, or
a length, which means that it obviously has a start and end point.
YOu may however, see vectors labeled simply, as I've often done in my notes
here, with only one set of coords.  I.E. 8,6 for a 2d vector
with its end point at 8 on the X axis and 6 on the Y.    What this
means, is that this vector's origin is at 0,0  So from this representation
of this vector, we can find it's length or magnitude, as we've done before,
with the Pythagoras theorem.  So we now know the
direction,and magnitude.  So what the @#$% is this good for?.  lol!
Well, from this info, we can now normalize and / or magnify this vector if
we want to.

 So what does that mean?  It simply means that we can convert its
magnitude to 1, which makes it what's called a unit vector, and in doing so,
we then make it possible to work with the vector to show acceleration and
velocity in a simulation.  I'll explain the details of this below, but for
now, let me just get a bit more philosophical about what a vector is
actually showing. That way the idea of velocity and acceleration will make
a bit more sense.

 The idea that a vector is just a line is true, however, it really is also
a representation of displacement over time.  In other words, our vector
above, whose end point is at 8,6, really is saying that it takes a certain
amount of time to travel from 0,0 to 8,6 and what the vector is showing is
that movement.  So it's in essence, a snapshot of a slice of time.  So
vectors and time are related.

 so the velocity that this vector represents, is its magnitude, or
as we know from the Pythagoras theorem, 10 units per 1 unit of time.
If we were to let that vector move in its same direction over another unit
of time, it would again move 10 units, which would place it at 16,12. If we were to again, use the Pythagoras theorem we would as expected, come up with a length or magnitude of 20, or double our initial magnitude. So this idea of a vector representing velocity can be used in a game to map the movement
of an object or player in our virtual world.  Does this make sense?



 So to make this useful for us, as we said above, we'd need to normalize
this vector, which means keeping its direction intact, while changing its
magnitude to 1, because, while we could in theory work with a vector with a
length of ten, for example, it's really more practical to have it be a
length we can more easily manage in all kinds of circumstances.  So how do
we do this?. It's easy. We simply divide the X and Y coords of our vector
by its magnitude.  So in the case of our vector ending at 8,6, we'd do the
following:

8 / 10 = .8
and
6 / 10 = .6

So now we have a vector whose end point is at .8,.6 and we can prove that
its length is 1 unit, since if we were to multiply the coords back by 10,
we'd again have 8,6.  Does this make sense?.

 so this takes me to the following.  To magnify a vector, or increase its
velocity, we can simply multiply its components, or X,Y coordinates by a
number we choose. I.E. if we wanted a vector with a length of 15 units, we
could simply do the following:

15 * .8 = 12
and
15 * .6 = 9

 So our new end point for our magnified vector is 12,9.  Now, we can prove
that this is in fact correct, as the Pythagoras theorem shows that the
square root of 12 * 12 + 9 * 9 is 15

 so, by normalizing the vector and magnifying it to our liking, we can now
regulate velocity in our virtual world.

 To be a bit more 'real' about this though, we really need to take into
account acceleration though.  So what's the diff between velocity and
acceleration?  Velocity is how much a body moves over time, while
acceleration can be thought of as a change in velocity.  I.E. say you're
walking one foot per second.  lol!  Pretty slow actually, but you'd simply
be doing just that, moving one foot every second in a given direction.  So
that is your velocity.  Now, let's say you speed up a bit, and you
accelerate one foot every second.  What would happen would be that you'd
move your usual one foot every second, but you'd also be adding to your
speed by another foot, so your first second would have you traveling one
foot, and your next second you'd travel
two more feet, and then three feet the following second, and so on.
So the more you keep increasing your speed, as you approach a run, you're
applying more acceleration which changes your velocity.  So this can be
shown with a longer and longer line each second you apply that same
acceleration, or increase in speed.  So now, as your running hard and want
to slow down, you'd need to apply a bit of deceleration or in our case,
negative acceleration.  This can be said to add negative values to our
velocity, therefore shortening each distance we travel from second to
second, until we might again reach our comfy but slow one foot per second
velocity.

 to elaborate just a bit further, let's go back a second, to while we're
running down the sidewalk, faster and faster.  Say we get to a comfortable
running speed, in a perfect world, we could simply stop
accelerating all together and continue with our current velocity.
I.E.  Maybe we're moving at 10 feet per second.  We would show that as a
velocity of 10 or a vector with a magnitude of 10 units in a given
direction, and an acceleration whose value is 0.

 So now that the diff between velocity and acceleration is hopefully a bit
clearer, how can we now apply this to our vector with its length or
magnitude?  This takes us to addition of vectors, and again, it's really a
lot simpler than it sounds.

 So far we've talked about a single vector which can be used to represent
an object's velocity in space over time; if we wanted to add acceleration to
that vector, we could simply introduce another vector into the mix.  Let's
once again look at our original vector starting at 0,0, and ending at 8,6.
We've already said that it shows a velocity or magnitude of 10 units along
it's length moving in its particular direction.  What if we wanted to show
an increase or acceleration of 1 unit in it's same direction? WEll we could
do this quite easily by simply adding a vector to it whose length or
magnitude is 1.  Remember earlier we said that the unit vector of our
original vector is 1, and it's end point was at .8,.6? Well all we'd do is
add that to the vector's end point at 8,6 as in:

8 + .8 = 8.8
and
6 + .6 = 6.6

 So we've just accelerated one unit in our vector's direction.  In other
words, as one unit of time goes by now, instead of traveling 10 units, we'll now represent travel over 11 units in the same amount of time. And, to take
this further, if we keep adding this same amount of acceleration, the next
unit of time, will see our vector showing a travel of 12 units, and then 13,
and 14, and so on, as long as we keep applying this same amount of
acceleration.

 Since our virtual world is really a perfect one, in the sense that we can
define its properties, we really don't have to worry about drag or friction
or gravity unless we want to, so our lil vector could keep speeding up and
speeding up and speeding up until our variables go out of range if we
wanted!  lol!

 I was going to go into adding vectors of differing directions here, but
this note has gone on *WAY* longer than I'd planned! lol! -Good thing I'm
like totally not tired!  lol!  Of course, that sure doesn't mean this note
will make any better sense lol!, but hey, a girl can dream!  lol!

 Anyway, I think I'll end here for now, and wish y'all a terrific night!.
<smile>  HOpe this makes sense for ya, and please feel free to post
questions, updates / corrections if you like.

 Catch ya laters and sleep sweet!.

Smiles,

Cara  :)
---
View my Online Portfolio at:

http://www.onemodelplace.com/CaraQuinn

Follow me on Twitter!

https://twitter.com/ModelCara

On Apr 24, 2013, at 1:39 AM, Ken The PionEar <[email protected]> wrote:

I'm starting another community project.
Right now, I have a very rudamentary soundscape explorer. It has no game play elements as of yet. What it does have is an external map file so I can create whole worlds, not just minigames like Heli. I don't even have proper collision subroutines worked out yet, because the main goal was getting a program up and running that actually used an external file for its map. Here's how it works. The map generates objects in the form of cubes, having length, width, and height. (Think of each sound source as a speaker.) In this map there are two sound sources, each source having two speakers. The band, stationary for now, is right in front of you. Just hold down the up arrow or move the mouse forward and you'll crash right into it--and through it. The birds are toward the lower left-hand corner and up in the sky. Since they're up higher you can hear them from farther away. If you want to crash into them you'll have to find them, then ascend by pressing the i key. Press k to descend.

What would be really cool is if one of you advanced devs could convert this into vb.net. I never have been able to learn well from manuals, but if I can see this code in vb.net I'll learn what I need. I understand the premises of classes and modules and all that. I get object oriented programming to a point. What I don't know is, well, where to even begin with vb.net. I can't figure how to do 3d sound for example, but I can't even write a simple hello world starter program for that matter, so a vb.net version of this would be awesome.
Here's the link.
https://dl.dropboxusercontent.com/u/96692612/SoundscapeExplorer.zip
---
Gamers mailing list __ [email protected]
If you want to leave the list, send E-mail to [email protected].
You can make changes or update your subscription via the web, at
http://audyssey.org/mailman/listinfo/gamers_audyssey.org.
All messages are archived and can be searched and read at
http://www.mail-archive.com/[email protected].
If you have any questions or concerns regarding the management of the list,
please send E-mail to [email protected].


---
Gamers mailing list __ [email protected]
If you want to leave the list, send E-mail to [email protected].
You can make changes or update your subscription via the web, at
http://audyssey.org/mailman/listinfo/gamers_audyssey.org.
All messages are archived and can be searched and read at
http://www.mail-archive.com/[email protected].
If you have any questions or concerns regarding the management of the list,
please send E-mail to [email protected].



---
Gamers mailing list __ [email protected]
If you want to leave the list, send E-mail to [email protected].
You can make changes or update your subscription via the web, at
http://audyssey.org/mailman/listinfo/gamers_audyssey.org.
All messages are archived and can be searched and read at
http://www.mail-archive.com/[email protected].
If you have any questions or concerns regarding the management of the list,
please send E-mail to [email protected].

Reply via email to