1 / 15

Using the Board to create (interesting, Useful, Extendible...) games

Using the Board to create (interesting, Useful, Extendible...) games. Troy Vasiga Lecturer, Cheriton School of Computer Science University of Waterloo. Outline. What makes an assignment good? Introduction and overview of Board class Motivation Simple animations and extensions

kendrickt
Download Presentation

Using the Board to create (interesting, Useful, Extendible...) games

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. CASCON 2007 Workshop Presentation Using the Board to create (interesting, Useful, Extendible...) games Troy Vasiga Lecturer, Cheriton School of Computer Science University of Waterloo

  2. Outline • What makes an assignment good? • Introduction and overview of Board class • Motivation • Simple animations and extensions • Dealing with clicks and lines • Larger scale projects • Summary CASCON 2007 Workshop Presentation

  3. What makes an assignment good? • Assignments should be: • Interesting • Approachable (for beginning students) • Extendible (for higher level students) • Useful • Related to the curriculum CASCON 2007 Workshop Presentation

  4. Board overview • Create one dimensional and two dimensional “Boards” of arbitrary (discrete) size • Boards allow us to put pegs (of virtually any colour) and remove pegs • Boards allow us to place lines between any two positions and remove lines • Boards allow messages to be printed • Boards allow us to obtain their size • Boards allow mouse clicks to be obtained from each position • See handout: BoardReference.pdf CASCON 2007 Workshop Presentation

  5. My motivation CASCON 2007 Workshop Presentation

  6. Pong CASCON 2007 Workshop Presentation

  7. Breakout CASCON 2007 Workshop Presentation

  8. Kaboom CASCON 2007 Workshop Presentation

  9. Fundamentals • All these games have • Low-resolution (good for the board) • Discrete motion • Simple animation involving a moving ball • Simple animation involving a “blocker”/ “bouncer” CASCON 2007 Workshop Presentation

  10. Simple Animation • This program should be accessible to all students • Deals only with method calls • No if statements • No loops • Specification: create a one-dimensional board of size 5. Have a black peg move across from left to right as if it was moving. It should disappear at the end. • Enhancements: • Have it loop • Have it “bounce” back and forth CASCON 2007 Workshop Presentation

  11. More extensions • Instead of simply bouncing, let’s have the animation do something more complicated, like go in a spiral. • A static version is shown here: spiral.pdf • Note the ability for students at various levels to approach this problem: • Simple lines • Static points • Dynamic animation CASCON 2007 Workshop Presentation

  12. Getting a grasp on clicks and lines • To begin, we will get a grasp on clicks • This will be the input mechanism to move the bouncer • A nice warm up exercise: linedraw.pdf • Simple loop, no if statements, very few variables CASCON 2007 Workshop Presentation

  13. Simple bouncer • Let’s create the bouncer • It should move along the bottom of a given board • A click to the right of the bouncer should move it to the right. • A click to the left of the bouncer should move it to the left. CASCON 2007 Workshop Presentation

  14. Larger scale projects • Flipper: flipper.pdf • Checkers • Chess (colours can be different pieces: messages can indicates which pieces are being moved) • Mario-type game CASCON 2007 Workshop Presentation

  15. Summary • The Board offers lots of benefit • Little overhead (compared to other graphics libraries in Java) • Discrete, integer based model • Easy to create animation • Accessible to students of all ability (easy to partition assignments into approachable levels) • Free CASCON 2007 Workshop Presentation

More Related