Difference between revisions of "IB Computer Science 1"

From WLCS
(Replaced content with "== Tuesday (1/8/19) == '''Agenda:''' * Object-Oriented Programming Review ** object usage * Re-implement the Flappy Bird Game (with or without score) using the Sprite clas...")
(Tag: Replaced)
Line 1: Line 1:
== Friday (12/21/18) ==
+
== Tuesday (1/8/19) ==
'''Warmup:'''
 
* Complete the College Panel Questions assignment in Canvas
 
 
 
 
'''Agenda:'''
 
'''Agenda:'''
 +
* Object-Oriented Programming Review
 +
** object usage
 
* Re-implement the Flappy Bird Game (with or without score) using the Sprite class and objects
 
* Re-implement the Flappy Bird Game (with or without score) using the Sprite class and objects
 
** Mr. Bui has supplied the sprite images [https://drive.google.com/file/d/1UugFrLPjeA8YPXOlmOxjIvzd6HdvpupA/view?usp=sharing here]
 
** Mr. Bui has supplied the sprite images [https://drive.google.com/file/d/1UugFrLPjeA8YPXOlmOxjIvzd6HdvpupA/view?usp=sharing here]
 
** We will probably want to tweak the Sprite class a little to add a flap() function and fix move()
 
** We will probably want to tweak the Sprite class a little to add a flap() function and fix move()
 
** We can also add a passed variable to remember whether or not we passed a pipe
 
** We can also add a passed variable to remember whether or not we passed a pipe
* College Student Q&A Panel
 
 
== Wednesday (12/19/18) ==
 
'''Agenda:'''
 
* Introduction to Object-Oriented Programming
 
** Sprite class walk-through
 
** Try adding 2-3 cacti to the game
 
* Re-implement the Flappy Bird Game (with or without score) using the Sprite class and objects
 
** Mr. Bui has supplied the sprite images in the Files section on Canvas
 
 
== Thursday - Monday (12/13/18 - 12/17/18) ==
 
'''Agenda:'''
 
* Game demonstrations
 
** 30-60 seconds
 
** You should demonstrate and present your game as if you're pitching it for a sale
 
** Be able to show '''all''' of its features
 
* If you have a demonstration ready, but are waiting...make a copy of your game and try to implement more features!
 
** If you need ideas for more features, Mr. Bui has plenty
 
* Personal Computer History Lesson!
 
** [https://vimeo.com/124201871 Triumph of the Nerds: Part 3]
 
 
== Tuesday (12/11/18) ==
 
'''Agenda:'''
 
* Work on your game
 
* Game progress checks
 
** You should be able to discuss the progress that you have made and the obstacles that you have encountered
 
* Game should be completed and demo-able by the end of Thursday (12/13/18) -- Talk to Mr. Bui if you need more time
 
  
== Wednesday - Friday (12/5/18 - 12/7/18) ==
+
== Monday - Friday (12/31/18 - 1/4/19) ==
'''Agenda:'''
+
* Winter Break
* Be sure you have turned in your game design document to Canvas
 
** Game Requirements (Dinosaur OR Flappy Bird) assignment
 
* Missing demos:
 
** [https://docs.google.com/document/d/13zLTnm_mxURSFxEWJ24MUBOAK1Y6jbfk8NxL-wS_U7g/edit?usp=sharing Loading & Displaying Images]
 
* Gravity / Jumping review with images
 
* Rectangular collision detection
 
* Individually work on your game - some collaboration is fine
 
* Subjectively graded progress check on Tuesday (12/11/18)
 
** You should be able to discuss the progress that you have made and the obstacles that you have encountered
 
** Game should be completed and demo-able by the end of Thursday (12/13/18)
 
 
 
== Monday (12/3/18) ==
 
'''Agenda:'''
 
* Group 4 Project Debrief
 
* [https://goo.gl/forms/0ya5UJ6KdVJvDvJF3 Group 4 Project Reflection Google Form]
 
** Complete this form even if you already turned in a PDF
 
** You may copy the reflection that you wrote in your PDF and paste it into the form
 
* Missing demos can be shown today or in GP
 
** Basic Pool: Part 2
 
** Keyboard Practice
 
 
 
* Complete [https://docs.google.com/document/d/13zLTnm_mxURSFxEWJ24MUBOAK1Y6jbfk8NxL-wS_U7g/edit?usp=sharing Loading & Displaying Images]
 
* Class discussion - Chrome Dinosaur Game OR Flappy Bird
 
*# Which game would you like to design and develop?
 
*# With a partner, open a Google Doc and share the Google Doc with the partner so both of you have write access
 
*# Place both of your names at the top of the document
 
*# List all the requirements of your chosen game with brief descriptions for each (e.g. Arrow key movement - pressing the arrow keys moves the dinosaur forward / backward)
 
*# Under each of the requirements, place a sub-bullet that briefly describes the programming technique / construct that you will probably use to implement that feature (e.g. score will be kept tracked by using a variable that increases over time)
 
*# Both students should submit the document to Canvas
 
*# Prepare to share your document with the rest of the class
 
* Begin individually developing your Dinosaur or Flappy Bird game
 
 
 
== Thursday (11/29/18) ==
 
'''Agenda:'''
 
* Most students will be attending the Group 4 Project field trip
 
* If you are not attending, go to Ms. Miller's room (#3003)
 
* Work on any missing assignments
 
 
 
== Tuesday (11/27/18) ==
 
'''Agenda:'''
 
* Group 4 Project Field Trip (Thursday 11/29)
 
** If you are attending, check-in and orientation at the auditorium at 8:19am
 
** If you are not attending, 1st and 5th periods, go to Ms. Miller's room (#3003)
 
* Workplace Readiness Skills Assessment Pre-test
 
* Demo Basic Pool: Part 2
 
* Complete and demo [https://docs.google.com/document/d/1uWpr7pX91LzklGwR6InKvsu7M9IRn2y55xgHHq0MAcQ/edit?usp=sharing Input: Keyboard Practice]
 
* Gravity / Jumping walk-through
 
 
 
== Tuesday (11/20/18) ==
 
'''Agenda:'''
 
* Thanksgiving Assembly
 
* Workplace Readiness Skills Assessment Pre-test
 
* Demo Basic Pool: Part 2
 
* Complete and demo [https://docs.google.com/document/d/1uWpr7pX91LzklGwR6InKvsu7M9IRn2y55xgHHq0MAcQ/edit?usp=sharing Input: Keyboard Practice]
 
* Gravity / Jumping walk-through?
 
 
 
== Friday (11/16/18) ==
 
'''Agenda:'''
 
* 2 hour delay
 
* Complete and demo Basic Pool: Part 2
 
** You should define as many components in functions as you can (e.g. checkCollision(), checkWin(), checkLoss(), reset())
 
 
 
== Wednesday (11/14/18) ==
 
'''Agenda:'''
 
* Complete and demo Basic Pool: Part 1
 
* Ball Collision detection & resolution
 
*# Use your Bouncing Ball program as a template (or you can use Basic Pool: Part 1)
 
*# Create two balls and make them both move around
 
*# Use the distance formula to detect if the two balls collide, and if they do, then paste the following code:
 
<syntaxhighlight lang="Python">
 
# http://flatredball.com/documentation/tutorials/math/circle-collision/
 
        tangentVector = PVector();
 
        tangentVector.y = x - x2;
 
        tangentVector.x = y2 - y;
 
        tangentVector.normalize()
 
        relVel = PVector(dx-dx2, dy-dy2)
 
        velLength = relVel.dot(tangentVector)
 
        velOnTangent = tangentVector.mult(velLength)
 
        velPerpToTangent = relVel.sub(velOnTangent)
 
        dx -= velPerpToTangent.x
 
        dy -= velPerpToTangent.y
 
        dx2 += velPerpToTangent.x
 
        dy2 += velPerpToTangent.y
 
        x += dx
 
        y += dy
 
        x2 += dx2
 
        y2 += dy2
 
</syntaxhighlight>
 
 
 
* Basic Pool: Part 2 - The player can win by shooting the pool ball into a randomly generated pocket, but loses if the cue ball ever hits the pocket.  The player will only have 3 attempts to shoot the ball in or the player loses
 
*# Change the color of the second ball to something non-white and non-black
 
*# Add friction by constantly multiplying all dx and dy variables by a number between 0.9 and 1
 
*# Create the black pocket and randomly generate its coordinates (please use variables)
 
*# If the second ball ever collides with the pocket, then stop everything and display a winning message
 
*# Add one of the losing condition checks -- if the cue ball (the first ball) ever collides with the pocket, then stop everything and display a losing message
 
*# Keep track of the shots, and the player should lose when they run out of shots (start with 3).  Display the number of shots remaining at the top or bottom of the screen
 
*# You should define as many components in functions as you can (e.g. checkCollision(), checkWin(), checkLoss(), reset())
 
*# Challenges:
 
*## Keep track and display points, and every time the player wins, add to the point total
 
*## Automatically reset the game when there is a win or loss
 
*## Add a third ball
 
 
 
== Friday (11/9/18) ==
 
'''Agenda:'''
 
* Demonstrate all programs
 
* Work on Basic Pool: Part 1 challenges
 
 
 
== Wednesday (11/7/18) ==
 
'''Agenda:'''
 
* Mr. Bui is out b/c his son is sick. Be prepared to demonstrate all programs on Friday (11/9/18)
 
** Part 2 activity in [https://docs.google.com/document/d/1wfVoej_7PVHquaAcugEr5YWZIzbKPNl8YYKlp7Gfouo/edit?usp=sharing Mouse Variables & Functions]
 
** Fancy Buttons Assignment
 
** Complete [https://docs.google.com/document/d/1xRSA_Ti8l5002jcAftcUtCTdujCojghzoTpUZwJvHQ4/edit?usp=sharing Bouncing Ball]
 
* Complete Basic Pool: Part 1
 
*# Make the background green
 
*# Create a white ball on the screen with dx and dy both set to random(-10,10) so that it begins moving in a random direction
 
*# As soon as the mouse button is pressed, make the ball stop where it is
 
*# While the mouse button is being held down, draw a red line from the middle of the ball to the mouse pointer
 
*# Releasing the mouse changes the ball's velocity (dx and dy variables) using the differences between (x, y) and (mouseX, mouseY).  i.e. the larger the green line, the faster the ball should move.  If the speed is too fast, you can try shrinking the difference by dividing by 10
 
*# As the ball moves around the screen, it should properly bounce off the edges
 
*# Add a non-white second ball on the screen that is not moving, but randomly located. You can generate random numbers using [https://py.processing.org/reference/random.html random(low, high)].
 
*# To detect if the two balls ever collide, check the distance between their centers (x, y) and (x2, y2).  If the distance is less than the sum  of their two radii (r1 + r1), then there is a collision.  Add a collision checking if-statement that temporarily changes the fill color of the balls to red if they collide, otherwise change it back to white
 
*# Challenges:
 
*#* Play around with stroke weight and color
 
*#* Add friction (you'll need to create new variables) to slow down the ball
 
 
 
== Friday (11/2/18) ==
 
'''Agenda:'''
 
* Misc Quiz on Canvas
 
* More advanced mouse fun
 
** Complete the table found in [https://docs.google.com/document/d/1wfVoej_7PVHquaAcugEr5YWZIzbKPNl8YYKlp7Gfouo/edit?usp=sharing Mouse Variables & Functions]
 
** Complete the Part 2 activity in [https://docs.google.com/document/d/1wfVoej_7PVHquaAcugEr5YWZIzbKPNl8YYKlp7Gfouo/edit?usp=sharing Mouse Variables & Functions]
 
* Fancy Buttons Assignment
 
*# Create 4 buttons on the screen of some color of your choice (use the same color for all 4 buttons)
 
*# Hovering over a button changes its color shade darker and increases the stroke weight around that particular button
 
*# Pressing the button makes the color shade even darker (darker than hover)
 
*# Releasing the button should return it to its original color.  Depending on how you create your program, you may not need to define mouseReleased()
 
* Complete [https://docs.google.com/document/d/1xRSA_Ti8l5002jcAftcUtCTdujCojghzoTpUZwJvHQ4/edit?usp=sharing Bouncing Ball]
 
* We will combine our new mouse knowledge with the bouncing ball lab to create a simple pool program that uses the mouse to control hitting a ball to hit another ball
 
*# Create a ball on the screen
 
*# When the mouse is clicked, you should draw a green line from the middle of the ball to the mouse pointer
 
*# Releasing the mouse changes the ball's velocity (dx, dy) using the difference between (x, y) and (mouseX, mouseY)
 
  
 
== Archives ==
 
== Archives ==
 +
* [[IBCS1 - 1819 - December]]
 +
* [[IBCS1 - 1819 - November]]
 
* [[IBCS1 - 1819 - October]]
 
* [[IBCS1 - 1819 - October]]
 
* [[IBCS1 - 1819 - September]]
 
* [[IBCS1 - 1819 - September]]
 
* [[IBCS1 - 1718]]
 
* [[IBCS1 - 1718]]

Revision as of 07:02, 8 January 2019

Tuesday (1/8/19)

Agenda:

  • Object-Oriented Programming Review
    • object usage
  • Re-implement the Flappy Bird Game (with or without score) using the Sprite class and objects
    • Mr. Bui has supplied the sprite images here
    • We will probably want to tweak the Sprite class a little to add a flap() function and fix move()
    • We can also add a passed variable to remember whether or not we passed a pipe

Monday - Friday (12/31/18 - 1/4/19)

  • Winter Break

Archives