Description
Looking to teach Java game development, collision detection, or GUI programming in your high school computer science class? This lesson is part of a complete Java programming curriculum built specifically for intro to programming, AP Computer Science Principles (APCSP), and AP Computer Science A (APCSA) support.
Students will learn how to detect when objects touch using rectangle collision detection in Java. This concept is essential in game development and helps reinforce key ideas in logic, object-oriented programming, and 2D coordinate systems. With a focus on fun, visual, interactive coding, this resource helps make Java engaging—even without prior experience.
These lessons are meant to be done over a few days; the idea is to get students doing cool stuff as fast as possible. With Java, that is NOT an easy task.
Topics:
Programming in Java 18: Collision Detection
What is Collision?
What is a game?
Rectangle collision
Creating a collision rectangle
Other collision
The Rectangle class
All lessons will come with the following:
a pdf slideshow
an editable Power Point version of the slideshow
a pacing guide with hints for teaching the section and common student
errors
an assignment, differentiated with three different levels!
an answer key in pdf form
an answer key in .java form.
Depending on your style, you could go over the slides as a group, then let students play around. Or you could just give them the slides and assignment and let them go.
Let students explore and make mistakes. Let them talk to each other and discuss their approaches. Programming takes a lot of trial and error and collaboration.
Welcome to the world of programming! It's going to be a blast!
Interested in more computer science content?? Check this out!
https://www.teacherspayteachers.com/Product/Particle-Engine-Using-ArrayLists-in-Java-9074432
Interested in more games?? Check it!
Interested in forms to make life easier!? Got it!
Java Programming Lesson 18: Collision Detection with Rectangles
Highlights
Save even more with bundles
Description
Looking to teach Java game development, collision detection, or GUI programming in your high school computer science class? This lesson is part of a complete Java programming curriculum built specifically for intro to programming, AP Computer Science Principles (APCSP), and AP Computer Science A (APCSA) support.
Students will learn how to detect when objects touch using rectangle collision detection in Java. This concept is essential in game development and helps reinforce key ideas in logic, object-oriented programming, and 2D coordinate systems. With a focus on fun, visual, interactive coding, this resource helps make Java engaging—even without prior experience.
These lessons are meant to be done over a few days; the idea is to get students doing cool stuff as fast as possible. With Java, that is NOT an easy task.
Topics:
Programming in Java 18: Collision Detection
What is Collision?
What is a game?
Rectangle collision
Creating a collision rectangle
Other collision
The Rectangle class
All lessons will come with the following:
a pdf slideshow
an editable Power Point version of the slideshow
a pacing guide with hints for teaching the section and common student
errors
an assignment, differentiated with three different levels!
an answer key in pdf form
an answer key in .java form.
Depending on your style, you could go over the slides as a group, then let students play around. Or you could just give them the slides and assignment and let them go.
Let students explore and make mistakes. Let them talk to each other and discuss their approaches. Programming takes a lot of trial and error and collaboration.
Welcome to the world of programming! It's going to be a blast!
Interested in more computer science content?? Check this out!
https://www.teacherspayteachers.com/Product/Particle-Engine-Using-ArrayLists-in-Java-9074432
Interested in more games?? Check it!
Interested in forms to make life easier!? Got it!






