# Difference between revisions of "Game Programming Class11"

## Particles

Particle's in IntoLibrary

• easy to add and define
• profile until your game runs slow

## Ship to XBox

In class demo

• Creators Club
• Deploy to XBox360 with visual studio
• Package for deployment

## Intro To 3D

XNA 4 is very different than XNA 3.1 http://www.nelxon.com/blog/xna-3-1-to-xna-4-0-cheatsheet/

Vectors : Vector3 x , y , z

Right handed vs Left Handed Coordinate Systems RHCS and LHSC

Matrices: A matrix is a class that is used to transform vectors.

HLSL pathway to Hardware.

World: Matrix that holds all Vertices send to video card

View: frustum of the camera view; near and far clipping plane

Projection: Flat 2D plane that is interpolated from the 3D View

The video card is handed a list of vertices. The vertices are then places in the world. The View is used to see the world and the projection is the actual view surface.

• Vertex Buffer :Vertex buffer is a list of vertices that are used to make one of the XNA privative shapes.
• VertexDeclaration

## Matrix Translations

### Simple Translation

Modified How To: Draw Points, Lines, and Other 3D Primitives - source

Matrices can be multiplied together to combine the effects to their translation. The order in which you combine them does matter.

• I Identity
• S Scale
• R Rotate
• T Translate
• O Orbit

Intro3DVert1.zip - source

## 3D Primitives

• LineList
• LineStrip
• TriangleList
• TriangleStrip

DrawUserPrimitives Project

## Homework

Create a simple 3D Vertex buffer that draws some kind of simple object. You can use points, Triangles, or lines, but no meshes.