# Pilot - U3L18 - Collisions

Please leave any feedback, thoughts, or resources for the lesson here. As a reminder, good feedback has the following elements:

• description of your school and classroom context
• details on what went well when teaching this lesson
• details on what didn’t go well when teaching this lesson
• a description of the changes you would recommend to improve the lesson (including formative assessment opportunities you added to the lesson)
• details on the types of deviations you made from the lesson

For more details on what good feedback looks like, check out the feedback guide!

My students have not gotten to this stage, yet, but I wanted to know about the commands mentioned in puzzle 2. My students are familiar with sprite.isTouching(), but the other two commands mentioned have not been encountered in previous levels. What are those commands used to do in GameLab?

We’re working on a video to better demonstrate all of the collision methods, but basically they work as follows (assuming the two sprites are moving with velocity towards each other)
sprite1.bounce(sprite2) - when they collide, sprite1 and sprite2 bounce from each other, trading velocity
sprite1.bounceOff(sprite2) - when they collide, sprite1 bounces off of sprite2, but sprite2 is unaffected
sprite1.collide(sprite2) - when they collide, sprite2 prevents sprite1 from moving
sprite1.displace(sprite2) - when they collide, sprite1 pushes sprite2

1 Like

Hi Kenneth,

To add to what Josh mentioned about the collision blocks, I think the bulleted list in Puzzle 2 might be a little confusing. The second two bullets refer to two blocks each, but that’s not obvious at first glance. (It kind of looks like the pairs of blocks have been smushed into one block together.) We’re changing the level to give each block its own place on the list, so that should show up in a couple days, but in the meantime, the four blocks are ‘sprite.x’, ‘sprite.y’, sprite.velocityX’ and ‘sprite.velocityY’. The kids should have seen all four of those blocks in previous lessons.

If that wasn’t the source of the problem, can you tell us what the other two commands your students haven’t seen yet?

Thanks,
Elizabeth

Below is a screen capture of Stage 14 puzzle 2. The two commands I was referring to are the ones below sprite.isTouching(). I have not seen that combination of commands in the previous levels.

If you are referring to sprite.velocityX and sprite.velocityY, they were introduced in lesson 11 (there’s a video about how they work here https://studio.code.org/s/csd3/stage/11/puzzle/2 ). If that’s not it, maybe our formatting is implying that sprite.velocityX / sprite.velocityY and sprite.x / sprite.y are the commands? If that’s the case we can rewrite the instruction to make clear that we are talking about each of the four blocks (sprite.velocityX, sprite.velocityY, sprite.x, and sprite.y).

@josh I think it is the formatting issue because I initial thought that those commands were alternatives used in combination to create a collision.

Cool, I’ll change the wording so that they look less like expressions.

My students started this lesson today and some completed it. Most students need a little more time wo get through the last puzzle. In addition I think the journaling is powerful for the students and the will need enough time to write thoughtful reflections. This lesson will wind up taking 1.5 days.

One thing I noticed: In the lesson plan it mentions that students will be practicing the action in levels 2&3. However, level 2 is the demonstration puzzle that serves as the discussion prompt prior to levels 3 & 4 which are the levels for students to implement their solutions.

Other than that one small problem, the students seemed to respond well to the lesson. The group discussion was useful and helped to reinforce the idea that there are many solutions to any programming problem. If I uncover anything else noteworthy, I’ll add to this post.

1 Like

Hey Matt, thanks for pointing out that inconsistency. We’ve updated the lesson plan to match the levels. Glad to hear that otherwise the lesson went well. In particular it’s exciting that the discussions and journaling are help students to synthesize what they’ve learned. Do let us know if you have more thoughts.