Difference between revisions of "Game Programming Class9"
esse quam videri
(→Review Midterm Games) |
|||
Line 10: | Line 10: | ||
# Usability and overall experience | # Usability and overall experience | ||
+ | ==Observer== | ||
+ | Observer | ||
+ | :Define a one-to-many dependency between objects so that when one object changes state, all its dependents are notified and updated automatically. | ||
+ | |||
+ | Observers | ||
+ | |||
+ | http://www.dofactory.com/Patterns/PatternObserver.aspx | ||
+ | |||
+ | Observer is a design pattern that is often used to publish (push) or subscribe (pull) changes in the stae of one object to other interested object. It encourages loose coupling of objects. | ||
+ | |||
+ | The object the get the data often called the subject then notifies the observing objects of the change. The observing object will often repond to the subject. | ||
+ | |||
+ | |||
+ | [[Image:Observer.gif]] | ||
+ | |||
+ | Here is a real example in c#. In this example a stock (the subject) notifies and investor (the observer) of a change in price. | ||
+ | |||
+ | [[Image:ObserverStocks.png]] | ||
+ | |||
+ | |||
+ | http://iam.colum.edu/oop/gbrowser.php?file=/classsource/class13/Observer_j.cs | ||
+ | |||
+ | http://iam.colum.edu/oop/classsource/class13/Observer.aspx [http://iam.colum.edu/oop/gbrowser.php?file=/classsource/class13/Observer.aspx - source] | ||
==Homework== | ==Homework== | ||
Add screen to 2D Game | Add screen to 2D Game |
Revision as of 04:00, 29 March 2010
Review Midterm Games
Inclass look @ 2d games
- Functionality
- Game play
- Localization
- Overall stability
- Performance
- Usability and overall experience
Observer
Observer
- Define a one-to-many dependency between objects so that when one object changes state, all its dependents are notified and updated automatically.
Observers
http://www.dofactory.com/Patterns/PatternObserver.aspx
Observer is a design pattern that is often used to publish (push) or subscribe (pull) changes in the stae of one object to other interested object. It encourages loose coupling of objects.
The object the get the data often called the subject then notifies the observing objects of the change. The observing object will often repond to the subject.
Here is a real example in c#. In this example a stock (the subject) notifies and investor (the observer) of a change in price.
http://iam.colum.edu/oop/gbrowser.php?file=/classsource/class13/Observer_j.cs
http://iam.colum.edu/oop/classsource/class13/Observer.aspx - source
Homework
Add screen to 2D Game