Difference between revisions of "Game Programming Class5"
(→PerPixelCollision) |
|||
Line 24: | Line 24: | ||
Load both textures into a color array. Make a rectangle of the intersection if 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 if 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 | ||
− | |||
− | |||
− | + | ==Version Control== | |
+ | Subversion (SVN) | ||
− | Windows Client and tools | + | [http://svnbook.red-bean.com/ Free SVN Book] |
− | + | ||
− | + | ===Windows Client and tools=== | |
− | + | * [http://tortoisesvn.tigris.org/ TortoiseSVN] (Windows) | |
− | Homework | + | * [http://ankhsvn.open.collab.net/ AnkhSVN] |
+ | * [http://www.visualsvn.com/visualsvn/ VisualSVN] | ||
+ | * [http://www.winmerge.org/ WinMerge] | ||
+ | |||
+ | ==Homework== | ||
Collision test game. | Collision test game. | ||
− | create a game that collides two sprites. you can use either simple | + | 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 user control the game |
Revision as of 02:20, 10 February 2009
Contents
Game Services
Review Game Components
- Sprite
- DrawableSprite
IntroGameLibrary
Turn the console class into a service
Each GameService need 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 availble in the IntoGameLibrary Project
Advanced Sprites/Collision
Simple Collision
Check if two rectanges intersect
PerPixelCollision
Load both textures into a color array. Make a rectangle of the intersection if 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
Version Control
Subversion (SVN)
Windows Client and tools
- TortoiseSVN (Windows)
- AnkhSVN
- VisualSVN
- WinMerge
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.
- Game Idea: the basic idea
- Game Description: longer description
- Game Goal: how do you win or what are you trying to accomplish.
- Audience: who will play
- User Control: how does the user control the game