# Vector Fundamentals

$$\newcommand{\bv}[1]{{\bf #1}}$$ $$\newcommand{\bperp}{{\bf perp}}$$ $$\newcommand{\bproj}{{\bf proj}}$$

Geometry plays a central role in game programming, underlying not only graphics, but also physics and spatial AI. A lot has happened since geometry was first formalised by the Greeks more than two thousand years ago, most notably the invention of coordinates and vectors. These inventions are indispensible for doing geometry on machines (at least, the kind of geometry that is useful for games).

This article introduces the basic concepts of vectors. In a following article, we will look at how vectors can be used to solve geometric problems that arise in computer graphics, physics and AI.

# Basic Collision Detection in 2D – Part 2

This article originally appeared in Dev.Mag Issue 29, released in February 2009.

Last month we covered some of the very basic ways of testing whether object A hits object B. But, while the techniques we covered could quite likely take you very far, you’ll inevitably encounter a time when they simply aren’t enough. So this month we’ll go a little further.

# Basic Collision Detection in 2D – Part 1

This article originally appeared in Dev.Mag Issue 28, released in January 2009.

Almost every video game needs to respond to objects touching each other in some sense, a practice commonly known as collision detection. Whether it’s simply to prevent the player character from walking through the walls of your maze with a simple collision grid array, or if it’s to test if any of the hundreds of projectiles fired by a boss character in a top-down shoot-’em-up have struck the player’s ship, your game will likely require a collision detection system of one sort or another.

# Trigonometry: Part 3

This article originally appeared in Dev.Mag Issue 16, released in August 2007

Welcome back, fellow coders! Prepare yourselves for the final, bumper episode of the Trig Trilogy, where I cover a whole lot of awesome trig techniques for your game-making pleasure. We’ve got a lot to cover, so let’s jump right in. It’s time for my first trick! Now, as you can see, there is nothing up my sleeve…

# Trigonometry: Part 1

This article originally appeared in Dev.Mag Issue 14, released in June 2007.

Trigonometry. The mere mention of it strikes terror into the minds of bewildered high school students. Confusing ratios, bizarre diagrams, trying to find the sine of the cosine of the tangent of theta – many people struggle to wrap their minds around it and eventually give up in desperation to do something easier, such as ending war or achieving cold fusion.

# On the Back of a Napkin: Part 1

This article originally appeared in Dev.Mag Issue 2, released in April 2006.

Wondering why your PC doesn’t play games so well anymore? Trying to decode the latest marketing-speak on the back of a game box? This series is designed to give you the knowledge you need to understand the tweaks and trade-offs you can make to improve your gaming experience. We’ll go through the concepts behind the gibberish on the options menu, without going into all that math!

# On the Back of a Napkin: Part 2

This article originally appeared in Dev.Mag Issue 3, released in May 2006.

Last week we went over some of the very basics of 3D graphics. This week we take a look at exactly what it is that vertices do for us and how they do it. We’ll cover some more abstractions and end up explaining some of the single-letter terms that kept cropping up a few years ago.

# On the Back of a Napkin: Part 3

This article originally appeared in Dev.Mag Issue 4, released in June 2006.

Now that we’ve got a solid foundation to work with, we can start looking at more relevant issues in 3D. This week we’ll explore the idea of texture filtering and why it’s a good thing. We’ll find out what the various types of filtering actually do, how they do them and how much of a frame rate hit each one causes. Read on if you want to know the difference between bilinear, trilinear and anisotrophic filtering.