Jump to content
  • Advertisement
  • entries
  • comments
  • views

Newsletter #80 - Time of Intersection

Sign in to follow this  




The sixth demo of the SHMUP has been released. For details, click here.

The SHMUP is now officially an IfThen Software project. http://www.ifthensoftware.net/forums/index.php?showtopic=2231.

From the Programmer
Written by Invisible

Last week I was stuck on what should have been a simple problem: Calculating the time at which two objects will intersect. The objects in question have constant velocity, so that helps simplify things a bit. My original plan was to set both object's motion formulas equal to each other and solve for time. This would have worked splendidly, if not for the fact that division is undefined for vectors... It was impossible to get time alone on one side of the equation. The breakthrough which helped me finally solve this problem was the realization that both objects are moving parallel (along the same line). This allowed me to get rid of the vectors and use the well known equation d = r*t. In order to use that equation, I needed one of the objects to be stationary so I calculated the relative velocity of one of the objects. vrel = va - vb vrel is the relative velocity of object a with respect to object b. So the final equation became: t = |(rb - ra)|/|vrel| where ra and rb are the positions of the objects.

I still don't know how I would handle this if the velocities are not parallel. I'll have to tackle that eventually, so you may be able to read the solution in a future newsletter issue.

It appears as though the alpha component of specular is not added to the color like the red, green, and blue components are. This was unfortunate, since a certain visual effect was depending on it. We eventually got a similar effect in another way though. From what I have read, the alpha component is largely (and possibly only) used for fog calculations. It is possible that this could be taken advantage of and used to get the desired effect, but I did not have enough time to research that. It is worth keeping in mind though.

Artist's Easel
Drawn by GreyKnight

iScribble Sketches #38

(Click to enlarge)

(Click to enlarge)

Community Spotlight
Written by jaythemage

For the latest SHMUP demo, Jay created yet another video:

If you have anything you would like to say in the next community spotlight article, please post it here.

Funny Quote of the Week
From the online chat

ace: I'm hanging up a sweater, and my closet is organized from most like a trench coat (a trench coat) to least like a trench coat (a travel toiletries case that functions as a gameboy case)
Sign in to follow this  


Recommended Comments

There are no comments to display.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!