Sunday, January 1, 2012

Lasers and Ray Casting

Let's talk about Lasers.


For lasers to work, we need to do two things:
  1. Shoot laser beams across the game level
  2. Detect collisions between lasers and the player
In this post I will talk about shooting the laser beam, and share some advanced Ray Casting code. My hope is that giving away this code will help flixel developers make better games.