Collision Detection In App Lab


#1

Do any of you know how to program collision detection in the App Lab. I have a student making a maze and he needs to detect if they run into a wall. Thank you.


#2

Hi Erin,
I’ll pass this on for you. Look for an answer soon.


#3

It depends. How is the maze created? What is the character. If you can get the share link for the project and paste here, I can take a look.

–Baker
CSP Team


#4

It seems like this is a pretty in-demand issue, I have several students that have some up with this independently. Can you provide a general answer so that I can guide my students on the best way to accomplish a maze?


#5

I have been working on a one-button game with my Video Game Design class, and used a for loop to detect collision. I named all objects the same, with different numbers at the end. I imagine you could do the same with walls to determine if your player runs into a wall.

My function is called “arrowCollider”. I hope that the for loop is useful to you!


#6

I’ve put together a tutorial for making a simple arcade game in App Lab. It includes a part about creating simple collision detection function.

Make an Arcade Game in Code.org App Lab


#7

Great job. Thanks for posting!