Difference between revisions of "Game Programming Class5"

esse quam videri
Jump to: navigation, search
Line 3: Line 3:
 
Review Game Components
 
Review Game Components
  
* Sprite
+
* [http://brookfield.rice.iit.edu/jmeyers/gbrowser.php?file=/ITM496-595/ClassSource/Projects/IntoGameLibrary/IntoGameLibrary/Sprite.cs Sprite]
* DrawableSprite
+
* [http://brookfield.rice.iit.edu/jmeyers/gbrowser.php?file=/ITM496-595/ClassSource/Projects/IntoGameLibrary/IntoGameLibrary/DrawableSprite.cs DrawableSprite]
  
 
==IntroGameLibrary==
 
==IntroGameLibrary==
Line 13: Line 13:
 
* GameConsole.cs
 
* GameConsole.cs
  
All of these files are available in the IntoGameLibrary Project
+
All of these files are available in the IntoGameLibrary Project in the classfolders.
Advanced Sprites/Collision
+
 
 +
==Advanced Sprites/Collision==
 
Simple Collision
 
Simple Collision
  
Check if two rectangles intersect
+
Check if two rectangles intersect. By adding a rectagle that represents the area of the sprite it's easy to ask xna if two rectangles intersect
  
 
==PerPixelCollision==
 
==PerPixelCollision==
 
Load both textures into a color array. Make a rectangle of the intersection of the two textures. Check all the pixels in intersection of the color arrays for intersecting pixels.
 
Load both textures into a color array. Make a rectangle of the intersection of the two textures. Check all the pixels in intersection of the color arrays for intersecting pixels.
 
the definition for both method is in the sprite class Sprite.cs
 
the definition for both method is in the sprite class Sprite.cs
 +
 +
==Chase and Evade==
 +
 +
Example of simple states and simple vector geometry.
 +
 +
Better example not yet implemented http://creators.xna.com/en-US/sample/chaseevade
  
 
==Version Control==
 
==Version Control==
Line 35: Line 42:
  
 
==Homework==
 
==Homework==
Collision test game.
+
 
 +
'''Collision test game.'''
  
 
create a game that collides two sprites. you can use either simple rectangle collision or per pixel as shown in class
 
create a game that collides two sprites. you can use either simple rectangle collision or per pixel as shown in class
  
Proposal for midterm game.
+
===Proposal for midterm game.===
  
 
Prepare for a short (5-10) minute pitch of your midterm game. The proposals will happen next week in class. The proposal should include.
 
Prepare for a short (5-10) minute pitch of your midterm game. The proposals will happen next week in class. The proposal should include.
 
# '''Game Idea''': the basic idea
 
# '''Game Idea''': the basic idea
 
# '''Game Description''': longer description
 
# '''Game Description''': longer description
# '''Game Goal''': how do you win or what are you trying to accomplish.
+
# '''Game Goal''': how do you win or what are you trying to accomplish
 
# '''Audience''': who will play
 
# '''Audience''': who will play
# '''User Control''': how does the user control the game
+
# '''User Control''': how does the player control the game

Revision as of 03:18, 23 February 2009

Game Services

Review Game Components

IntroGameLibrary

Turn the console class into a service

Each GameService needs to have a unique interface so that there is an entry in the system types table. The interface allows the game to return the correct type.

  • GameConsole.cs

All of these files are available in the IntoGameLibrary Project in the classfolders.

Advanced Sprites/Collision

Simple Collision

Check if two rectangles intersect. By adding a rectagle that represents the area of the sprite it's easy to ask xna if two rectangles intersect

PerPixelCollision

Load both textures into a color array. Make a rectangle of the intersection of the two textures. Check all the pixels in intersection of the color arrays for intersecting pixels. the definition for both method is in the sprite class Sprite.cs

Chase and Evade

Example of simple states and simple vector geometry.

Better example not yet implemented http://creators.xna.com/en-US/sample/chaseevade

Version Control

Subversion (SVN)

Free SVN Book

Windows Client and tools

Homework

Collision test game.

create a game that collides two sprites. you can use either simple rectangle collision or per pixel as shown in class

Proposal for midterm game.

Prepare for a short (5-10) minute pitch of your midterm game. The proposals will happen next week in class. The proposal should include.

  1. Game Idea: the basic idea
  2. Game Description: longer description
  3. Game Goal: how do you win or what are you trying to accomplish
  4. Audience: who will play
  5. User Control: how does the player control the game