0 Favourites

How do I Bounce lasers off walls like in R-type

  • I've had a good look around the forums but the dropbox links for this type of question are all too old and don't work. I'm trying to create the laser bouncing effect as seen in the game R-Type. Lots of youtube videos on this great game. If I was using a small sprite the bullet behavior would work fine, but the lasers need to be quite long, this causes the bounce to be inaccurate.

    When the fire button is pressed lasers are spawned and travel at different angles, they continue to grow in length as they leave the spawn point and bounce off every object whilst leaving the trail of where it had previously bounced.

    Good example in the youtube video below at 2:30

    Anyone know hot to create this?

  • Construct 3

    Buy Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Buy Now Construct 3 users don't see these ads
  • check out the bouncing bullets template that comes with construct 2 that will help you

  • I had a go at this for you, but I think I can't post links because I'm new, so not sure if this will work. Try this:

    dropbox.com/s/gi7vdjf2xbuedys/rtype%20beam.capx?dl=0

  • Thanks for the help guys. LukeW your capx is just what I was looking for thanks!

  • No worries.

    Just had a thought with that capX though, as soon as you start adding ship movement, the beam will break as it's a series of overlapping minisprites.

    Should be an easy fix though. What I would suggest is an invisible sprite with a timer set to it that spawns the beam. so when you shoot, an instance is created at the ship, that instance spawns the beam until the timer runs out, then is destroyed.

    That way, you can shoot and move away and the beam will continue to fire from a single point.

  • Good tip, I'll implement that, cheers!

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)