Replies: 4 comments 2 replies
-
Why not simplify to 0 - direction? The math behind that is simpler to explain. You turn the same amount in the opposite direction. (270 + (90 - direction)) modulo 360 To avoid the problems with students being unprepared for Pong I took 15 minutes in each of 6 consecutive workdays to build a Breakout game. I noticed students using the concepts introduced in Breakout in Pong after they are shown. Breakout is close enough to be helpful with Pong but different enough to require understanding to apply the concepts. |
Beta Was this translation helpful? Give feedback.
-
These are the steps to build Breakout live in front of the class. Keep in mind there is an old saying among people who do presentations at CS conferences "It takes a special kind of arrogance to code in front of an audience". |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
There are presentations to go with the code. Lectures B and C code up the bounce off the paddle. Lecture C I use clones to create the bricks. They don't know that yet, but I do it anyway. |
Beta Was this translation helpful? Give feedback.
-
This is my third year teaching this course. My observation is that students tend to struggle with the math behind the paddle strike. I believe that part of the problem is the Do Now introduces the
if on edge, bounce
block. While this block is helpful for the behavior for upper/lower edges of the stage, it is a source of frustration for the left/right edges and paddles. I suggest giving them this code snippet to help the majority of students with the ball touching a paddle.Beta Was this translation helpful? Give feedback.
All reactions