1 / 11

Developing a Simple Game-Themed Application

Developing a Simple Game-Themed Application. Goals. Design and implement a simple “game” Practice what we have learned so far Separation of logic and graphical interaction Let’s work in groups (3 or 4) …. Approach. Goal: A detailed design for implementation in 3 hours

gus
Download Presentation

Developing a Simple Game-Themed Application

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. Developing a Simple Game-Themed Application

  2. Goals • Design and implement a simple “game” • Practice what we have learned so far • Separation of logic and graphical interaction • Let’s work in groups (3 or 4) …

  3. Approach • Goal: • A detailed design for implementation in 3 hours • Tasks: (in 90 minutes) • 20 min: Game idea (be SIMPLE! ) • 10 min: Relative sizes and look (coordinate system) • 10 min: Main object look/behavior (class) • 10 min: Support object look/behavior (class) • 20 min: User and Object interaction (in UpdateWorld)

  4. Game Idea • Logic vs Interactive Graphics • Today: concentrate on Interactive Graphics • Avoid in-game “AI” (or smart game) • E.g.: tricky to implement: • User control Object A • Game controls Object B to follows automatically • E.g.: Easy to implement • Use control Object A • Game controls Object B _RANDOMLY_ • Test for Object A and B interesection

  5. Choose A ‘Game’ Type • Graphical Picture • Nothing moves • No user interaction • Animation / Visualization • A sequence of pre-defined movements • No user interaction • Interactive Game • Movement of objects responds to user interaction

  6. ‘Game’ Type Examples • Graphical picture: • Response to simple user commands (e.g., draw a picture responding to a button push) • Draw a histogram • Animation / visualization / simulation: • Dropping a ball: conditions ensuring the ball bounces when it reaches the ground, implement a mathematical equation • Visualization of random samples • Interactive • Initial object setup • One/multiple objects under user control • Update and test for object intersection in UpdateWorld

  7. Finding Ideas For ‘Game’ Type • Card Games • Board Games: • Snakes and Ladders • Reversi • Anything you’ve found fun (or not) • Breaking Bubbles • Alphabet Hero

  8. Designing A Game • Draw pictures/ideas • Play the “game” on paper during design. • Remember, complicated in-game AI is tricky to implement!

  9. Implementation Guide • 4 major pieces to implementation: • The World • Hero Object • Support Object • Interaction between objects

  10. The World • Relative size: • Window size vs. Object size • Continuous Coordinate • E.g., The BlockBreak Game • Discrete Coordinate • E.g., Reversi (position (1.5,1.5) is illegal) • In InitializeWorld()!!

  11. The Hero/Support Object • Look: Constructor() • Size, color, texture • Behavior: Update() • User control behavior (e.g., user move paddle) • Automatic behavior (e.g., gradually slow down when user is not moving) • Automatic behavior is trickier to implement! • Interaction: Interact() • Interaction with other (Support) objects • Called from UpdateWorld()

More Related