This has been driving me nuts for ages, and sadly, the only shmup programmer that I've seen pull it off is rather difficult to contact (Alluro).
What weapon am I talking about coding, exactly? Well, it's the infamous Lock-On Laser from Raiden II/Raiden Fighters. Y'know, the purple beam that curves around and such, and locks onto an enemy when it hits them. The logic and physics behind how such a weapon is coded have always been beyond me, I was wondering if anyone might be able to shed some light on the topic.
For the record, GameMaker is my program of choice, so anything from a language like C++ and the like wouldn't be of much help to me.
One of the toughest weapons to code in a shmup...
One of the toughest weapons to code in a shmup...
YOU ARE APPROACHING THE TARGET OF ATTACK! THE MISSION STARTS NOW! ARE YOU READY?!
I'm not entirely sure what GameMaker can and can't do so offering advice is a bit tricky.
I know how I'd do it though and that's probably with Hermite splines.
This basically lets you define a start point and end point for your path (laser) and the tangency at those points. The maths can then work out the x,y co-ords of any point along that path where you'd place your laser sprite images.
I could write something in BASIC but I'm not sure that would be any use to you.
I know how I'd do it though and that's probably with Hermite splines.
This basically lets you define a start point and end point for your path (laser) and the tangency at those points. The maths can then work out the x,y co-ords of any point along that path where you'd place your laser sprite images.
I could write something in BASIC but I'm not sure that would be any use to you.
Well, there are some similarities in the GameMaker Language (GML for short) and things like Visual Basic. I'm not sure if I could implement your ideas, but if you'd be willing to show them, maybe I could at least learn something from them.
In all honesty though, your idea sounds exactly like what I'd need.
In all honesty though, your idea sounds exactly like what I'd need.
YOU ARE APPROACHING THE TARGET OF ATTACK! THE MISSION STARTS NOW! ARE YOU READY?!