Mmm. Knowlege! Yum!
I take it, then, that to do spheres, you would first figure it on the x/y plain, then the x/z plain? Is that right, or am I totally missing something? Also, (and maybe I'm biting off more than I can chew with this one,) I've been thinking of making an accessible shuffleboard game. The one I play on the Wii is nearly so now, but I could do even better. What was stopping me is that I didn't know how to detect sphere collisions, (problem solved,) and still don't know how to move the spheres, or putts in this case, once they collide. Of course, it'd probably take less time to make your own shuffleboard game than help me learn this stuff, but I'm certainly willing! :) Okay, back to making this game. Now I know how to detect it if I run into the marching band with the bounding boxes solution, and I think I've also figured out how to keep from going through a thing based on the same premise.
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 kenwdow...@me.com .
Crazy Ken
----- Original Message ----- From: "Cara Quinn" <caraqu...@caraquinn.com>
To: "Gamers Discussion list" <gamers@audyssey.org>
Sent: Thursday, April 25, 2013 2:06 AM
Subject: Re: [Audyssey] another community project


Ken, lastly, though I can't find my note on bounding spheres,

Essentially what you will do is to use the locations of two entities in your game, along with a radius for each and add them together to see if they are touching.

So in 2D, your entities might be located at:

2,3 and 6,5

The first might have a radius of 3 units and the second might have a radius of 2.

So right here, you're defining the size of each entity in your game. Does this make sense so far?

If you picture two spheres, or in this case, two circles, with their origins or center points being at 2,3 and 6,5 this might make more sense.

If we were working in 3D we could think of these circles as spheres… :)

Okay, so now what do we do to find out if these two circles are touching?

First we need to find out how far away they are from each other. We do this with the pythagorean theorem. In 2D, the Pythagorean theorem says that A^2 + B^2 = C^2.

So how does this help us?

If we look at the two points defining the positions of our game entities, 2,3 and 6,5 we can find the distance between these two points. So let's do that now.

First we'll subtract the points from each other so we can use the theorem.

6 minus 2 is 4

5 minus 3 is 2

So right here we now have a line or vector which we can use with the Pythagorean Theorem so we can find out how long our line is, or in our game, how far apart our circle-shaped entities are.


So:

4 * 4 is 16

and

2 * 2 is 4

16 + 4 is 20

So if we now find the square root of 20 we will have our distance between the center points of each circle.

the square root of 20 is 4.47213595499958 so let's round that off to 4.47

So how does this help us?

We said before that we decided that the radii of each circle was 3 and 2 so let's add those.

3 + 2 is 5

is 5 greater than 4.47? Of course it is. So this means that our circles are touching. If the two radii added up to less than our square root then the edges of our circle-shaped game entities would not reach each other in our virtual world. Does this make sense?

So this is all you need to calculate collisions on circles or if you add a dimension, spheres.

hope this helps and best of luck on your new project!

Thanks,

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 <kenwdow...@me.com> 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 __ Gamers@audyssey.org
If you want to leave the list, send E-mail to gamers-unsubscr...@audyssey.org.
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/gamers@audyssey.org.
If you have any questions or concerns regarding the management of the list,
please send E-mail to gamers-ow...@audyssey.org.


---
Gamers mailing list __ Gamers@audyssey.org
If you want to leave the list, send E-mail to gamers-unsubscr...@audyssey.org.
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/gamers@audyssey.org.
If you have any questions or concerns regarding the management of the list,
please send E-mail to gamers-ow...@audyssey.org.


---
Gamers mailing list __ Gamers@audyssey.org
If you want to leave the list, send E-mail to gamers-unsubscr...@audyssey.org.
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/gamers@audyssey.org.
If you have any questions or concerns regarding the management of the list,
please send E-mail to gamers-ow...@audyssey.org.

Reply via email to