1 / 13

Animation and Simulation Plus Interaction

Animation and Simulation Plus Interaction. Norm Badler CSE 377 March 3, 2003. Discrete Simulation. Event is primary entity. Time jumps forward to next event. Not good for animation per se as events may happen at arbitrary time points (e.g. customers arriving at a server). Time line.

lemuel
Télécharger la présentation

Animation and Simulation Plus Interaction

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Animation and SimulationPlus Interaction Norm Badler CSE 377 March 3, 2003

  2. Discrete Simulation • Event is primary entity. • Time jumps forward to next event. • Not good for animation per se as events may happen at arbitrary time points (e.g. customers arriving at a server) Time line

  3. Animation • Frames must be produced at fixed time intervals, whether or not anything is actually happening. • In general, this means that animated actions must be represented as functions of TIME. Time line Frame times

  4. So what about the EVENTS? • Events are changes in the world environment caused by: • User actions • Objects in the world • Interactions between objects (and user) • E.g., • Button push or mouse action • Object property (movements or other attribute changes) • Collisions or “in view”

  5. Events Cause Branches in Action • Stuff changes because of events in the world or user actions. • HOW DO WE REPRESENT THE ACTION ALTERNATIVES? • Representational options: • Sequential logic (IF THEN ELSE) • Finite State Machines • Rule-based systems

  6. Sequential Logic IF condition-a THEN action-1 ELSE IF condition-b THEN action-2 ELSE IF condition-c THEN … • PROBLEMS: Awkward, brittle, hard to debug and modify.

  7. Finite State Machines • Flexible for small-ish action sets. • Simple semantics. • Can be hierarchical (can invoke sub-FSMs) • Allow clear think about the transitions in the action space.

  8. Example Finite State Machine for a Game Watt and Policarpo

  9. FSM • Generally nodes are processes. • Edges are transitions from one process to another: occur at events (as defined before) • Edge transitions may be deterministic or dependent on a statistical distribution of options. • Transitions may have side effects besides changing program state.

  10. Edge Transitions • Happen if something is observed (visible to entity): “Looking for enemy” changes to “Tracking enemy” • Happen if objects interact: “Enemy destroyed” changes state to “Looking for [new] enemy” {note side effect!} • Happen if user interacts: Button push may fire missile that collides with enemy causing it to be destroyed.

  11. Implementing a FSM • Determine process states and all possible transitions. • Determine all possible variables that need checking in a state. • Organize in a table. (May not be as efficient as sequential logic but easier to design and maintain!)

  12. Existing FSM Packages • Game engines (MOTIVATE) • PaT-Nets • KPL (Ken Perlin’s Language) • Write your own…

More Related