Download presentation
Presentation is loading. Please wait.
1
Object Oriented Design
2
Goals Pacman Project Reflections The Sims Project: additional pointers
3
Classes Pacman Ghost Dot Power pill Maze Fruit Score
4
On state diagrams Naming of states: much better! Transitions u Need labels! u Labels = Event [Guard] / Action u If multiple objects are involved: event needs to describe who is involved what happens to whom Describe Event not Method attacking fleeing eat Not clear who is involved Ghost states:
5
Ghost state diagram attacking fleeing fleeing blinking Returning to ghost home Pacman eats power pill Power Pill effect fades away (10 secs) Power Pill effect is gone (2 secs) Pacman eats ghost Ghost reaches home
6
Sequence diagrams Keep general flow left to right u What makes the ghost go right? :Pacman:Ghost kill :Ghost:Pacman kill Ok, but not recommended Good
7
The Sims
8
Collaborative Diffusion Search Can be used to build simulations including object interactions even more complex than that found in the Sims
9
Getting started Look at existing AgentSheets projects u “Ultimate Pacman” u “World Cup”
10
Diffusion Difference Equations Simple (k=0.25) u u := 0.25 * (u[left] + u[right] + u[up] + u[down]) General u u := @k * (u[left] + u[right] + u[up] + u[down] - 4 * u) + u u Where k is The diffusion coefficient Should be < 0.45
11
Debugging diffusion 3D Plot is only available in research prototype Use colorization
12
Wanted We need one person who would help building an infrastructure (counts as final project). Who knows u Java and OpenGL u Java u OpenGL
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.