by Peter Wilson (25 Submissions)
Category: Games
Compatability: Visual Basic 5.0
Difficulty: Intermediate
Date Added: Wed 3rd February 2021
Rating: (9 Votes)
Demonstrates how to code an intelligent early warning collision detection system for a simple game of Asteroids. Uses matrix multiplication, vector maths and clearly demonstrates an excellent use for the DotProduct between two vectors. I placed this in the games section, because this is the start of a game, however I wanted to show you my debugging code before I pull it all out, as this debugging code very clearly demonstrates how to use the DotProduct between vectors. Making a good game is sometimes about Maths!
Download A collision avoidance system for games using DotProduct. (20 KB)