Presentation is loading. Please wait.

Presentation is loading. Please wait.

Computer Science I Share plans for virtual something. Text. Show my virtual dog. Classwork: Plans for your virtual something. Homework: start implementation.

Similar presentations


Presentation on theme: "Computer Science I Share plans for virtual something. Text. Show my virtual dog. Classwork: Plans for your virtual something. Homework: start implementation."— Presentation transcript:

1 Computer Science I Share plans for virtual something. Text. Show my virtual dog. Classwork: Plans for your virtual something. Homework: start implementation.

2 Recap: Virtual Dog Show HTML JavaScript version Discrete event simulation – At fixed periods of time, things happen, including, maybe, changes of state. My dog loses weight – Player actions: Feed dog: weight increases. Time is stored Pet dog: probability varies based on time since last feeding. Note: always possible to be wagging or mean.

3 Your plans Virtual ? What are the player actions? What are the states? – Are there state variables? What are the calculation for transitions? – What information is required? – Any timing? – Anything stochastic?

4 Software development Design stage: what are you trying to do? Design stage in more detail – Form of player actions (aka affordances): buttons or clicking on screen or dragging or key or ??? Implementation – (choose language, other technology) – What are the functions, variables, classes? Program – test – debug/enhance – test Deploy

5 Note The JavaScript virtual dog was done in older version of html and JavaScript. – For example, no use of canvas. Just buttons. – BUT could handle animated gifs. For your Processing sketch, you may consider – Drawing pictures as well as image. Look up how to do Shape – Buttons using a Button class – Clicking somewhere on the screen to do something – ? This is a week project only, so save more complex ideas for your final project.

6 My Implementation High level implementation: – Use 4 buttons. Have currentdog variable to hold image of appropriate state. Have weight variable. – Use println, mainly for debugging. COULD WRITE ON SCREEN. – Use draw to make periodic decreasing weight & checking on weight for possible state change Keep dog in wagging or snarling state for set amount of time Define Button class – Methods: Button, isOver, display Functions – setup, draw, mouseClicked (checks for which button) – makeButtons, drawButtons – petdog, feeddog, checkdog Note checkdog code could be in draw.

7 Pop Quiz Find out how to use (create, declare, draw on screen) text using a specific font, specific size, color, and specific position on the screen. Write answer and Address of source(s)

8 Classwork / Homework Implementation plans for your virtual something. Work on virtual something.


Download ppt "Computer Science I Share plans for virtual something. Text. Show my virtual dog. Classwork: Plans for your virtual something. Homework: start implementation."

Similar presentations


Ads by Google