Game Programming Class13

From IAM MediaWiki Create Change
Jump to: navigation, search

Camera

Microsoft Examples

Chase Camera

How To: Make a Third-Person Camera


We have been working with the World/View/Projection Matrix in the game class. I'd like to encapsulate the camera in a camera class that can be reused in out library.

IntroCamera.zip

Collision

Collision Detection Overview

  • BoundingSphere
  • BoundingBox

XNA Collision Detection for 3D models - Part 2

How To: Detect Whether Two Models Collide

Shooting

Animation Tutorial

Mixing 2D and 3D

I forgot to show you last week that the Spritebatch draw code need to be modified slightly in order top mix 2D and 3D You need to use SaveStateMode.SaveSate if you don't explicitly order everything in your Draw code. Saving states can be SLOOWWWWW and significantly reduce your performance. More info on RenderStates

spriteBatch.Begin(SpriteBlendMode.AlphaBlend, SpriteSortMode.Deferred, SaveStateMode.SaveState);

Lighting

The XNA basic effect is a simple implementation of a HLSL effect.

HLSL is Microsoft's High level implementation of FFE Fixed Function Pipeline implemented in video hardware. GPU Hardware does two things. The vertex shader runs first and is rasterized to 2D, then the pixel shaders run.

  • Vertex Shader
  • Pixel Shader

Lighting Demo with Basic Effect IntroMeshLights.zip

HLSL

HLSL Demo

http://code.msdn.microsoft.com/HLSL

Creators Club Non Realistic Render

Lighting basics

Per-pixel lighting

SkyBox

IntroMeshLightsSkyBox.zip

Skybox generator

Making Skyboxes

Final Assignemnt

Camera in 3D update your 3D picture to include a camera the is movable.

Final version of your game. Upload a final revision of your game that includes any modifications made since testing at midterm. The last requirement for the game is that if have some type of credits. The credits could be in the win condition if your game has one or on the lose/pause screen if there is no win condition. The credits screen should contain your contact and credit an assets or code that wasn't created by you.