Video Thumbnail

Sign up for a plan to instantly unlock all premium lessons.

Premium Features

Download Video

Check for Character Collision

Published a month ago

With characters rendered out in their corresponding positions, it is time we determine whether or not our player and characters are colliding. This is step one in the process of prompting a conversation—before we actually pop up a dialogue box, we need a way to tell who we're colliding with so we know what speech to use.

Similar to detecting for collision with our map boundaries, we need to loop through each of our characters, then run collision detection code between them and our player.

  • 0:00 Lesson summary

  • 1:29 Begin character collision implementation

  • 9:34 Fix character sizing

  • 11:52 Fix broken sprite animation

  • 15:22 Collision detection on all four sides

  • 16:43 Create dedicated collision function

  • 23:39 Refactor functions into separate utils file

Comments

Want to participate?

Create a free Chris Courses account to begin

Login
s
sethix777 posted 25 days ago
0
Cheat Sheet Preview

Download The Official Chris Courses HTML5 Canvas Cheat Sheet

Essential canvas syntax at your fingertips.

Download Now

Providing the lift to launch your development career

© 2022 Chris Courses. All rights reserved.