"Soon" good enough?
The main things are the boss music (haven't heard from Raigon in awhile), the bosses need some work themselves and there's a few enemies I want to add, too. So yeah, should be soon.
The first boss (GOR-X) doesn't have multiple targets yet; but that might change when I go back and tweak him. The second one (Goblin King), you can mess up either or both of his arms and he'll change what he does depending on how damaged he is.
As for the beam code, it's hardly perfect. Like most of my code, it just works "well enough"..lol. You could always just do a normal shot with a shorter firing delay too, that's what I had for a little bit.
Anyways, I can't remember how much detail I went into in the other thread; but I'll try to break it down anyways. (Keep in mind this is for a horizontally oriented game):
--------------------------------------
var1: x position of the ship
var2: pixel width of the first section of the beam (flash)
var3: pixel width of the main section of the beam
var4: x position of the projectile (which moves very fast)
var5: the distance between the position of the ship and that of the projectile, taking into account the width of the flash image.
Absolute value of var4-(var1+var2)
var6: The amount the main beam section will need to be scaled horizontally to fit the difference in
var5, with a scale of 1 being the same as
var3. Basically,
var5/var3
So ,what I do each step after the beam is fired is:
- draw the first section of the beam at
var1
- draw the main section of the beam at
var1 + var2 + (var5/2) (so it's precisely in the middle) with a horizontal scale of
var6
- if a collision is made, draw the 'hit' section at
var5
Other things of note: the projectile itself cannot be seen, it uses a blank sprite that has the same height as the beam images (used for collision). I did it this way because of how GM handles drawing an object's sprite, so it might be a moot point if you're working in something else.
-----------------------------------------
Sorry if that was a bit overkill. I think I'm having coding withdrawal...lol.
Still, it does do some stuff it's not supposed to; but as long as the main part of the beam is just horizontal rows of color that won't warp as the image is stretched, you won't be able to see it. If you don't, it does some funky stuff.
(Just throwing this out there for anyone who might have a clue what to do about it.)
Basically, it draws the different iterations of the beam at different scales (where they would be in progressing steps) all overlapped rather than one solid, smooth beam every step. It seems to be dependent on the speed the projectile is going, too. If I had it move at, say, (current room's width)/5 pixels per step, the number of 'breaks' there would be in the beam would be 5 or fewer depending on where the ship is. It only comes out completely smooth if it's moving all the way across the screen or faster each step.
It really makes me wonder if it's a limitation of what GM can do/draw per step or something (hopefully I'm wrong there and it's just my shitty code at fault.) The only way I could get the lightning/plasma to look good is by waiting for it to detect a collision or go offscreen before it actually draws the beam.