VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



A 2D DotProduct Demonstration

by Peter Wilson (25 Submissions)
Category: Graphics
Compatability: VB Script
Difficulty: Beginner
Date Added: Wed 3rd February 2021
Rating: (5 Votes)

This application is a simple and clear demonstration of the DotProduct in two dimensions. The DotProduct is almost always used by game programmers, especially in shooting games like Unreal Tournament. The DotProduct allows the programmers to decide is the user is pointing his weapon at a monster, a pickup or a door. The DotProduct is also used for Back-Face culling and lighting effects. You can even use the DotProduct for real world physics calculations like "Newton's Conservation of Momentum". In fact, this is the real reason I created this little demo. I'm currently working on my Asteroids game (also on VBC) and wanted the Asteroids to bounce off each other convincingly. Since angles were involved, I figured I could probably use the DotProduct to save on calculations. I needed a little refresher course in the DotProduct, thus this project was born. If you are not interested in the DotProduct, you may be interested in the Splash screen. It has a built in Ant Simulator which probably deserves it's own submission.

Rate A 2D DotProduct Demonstration

Download A 2D DotProduct Demonstration

Download A 2D DotProduct Demonstration (29 KB)

A 2D DotProduct Demonstration Comments

No comments have been posted about A 2D DotProduct Demonstration. Why not be the first to post a comment about A 2D DotProduct Demonstration.

Post your comment

Subject:
Message:
0/1000 characters