• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

How realistic to programme this in Sequences? (Laser beams)

So I'm practicing GML with a side project, namely recreating an old GBA game (Legacy of Goku, a Dragonball rpg game).

When I got to the point of lasers, like the MC's signiature kamehameha, I wondered... should I do this with objects (like https://forum.yoyogames.com/index.php?threads/all-direction-dragonball-laser-beam.66414/ ) or would this be better suited for a Sequence?

I'm asking here because even after watching all the Makeroo introductions to Sequences, and a few random tutorials, I still can't decide if this would work. If anyone does understand the nuts and bolts better than me, could they just let me know-
a) Can a sequence like this properly animate from the character sprite, rotated depending on cardinal direction?
b) Is there a basic collision check for sequences to make use of my "hurt enemies" scripts, or would I need to use broadcasts? (which seem more complex)
c) .... Does this even sound like a good idea, or should I give up on sequences and just use objects?

As I said, mostly doing this as a learning experience with GML, so please don't judge my lack of knowhow too harshly.
 

4i4in

Member
a) Can a sequence like this properly animate from the character sprite, rotated depending on cardinal direction?
Yes.
This is same way as checking line of sight or colisions in subsequent steps.
Loop small steps adding them to a list (or array) checking for colision and stop when You like (detected collision could be a good reson).
Lengthdir is good to determine where is next check.
Loop using while(infinite check) or for (finite) checking for example poin_in circle/rectangle/triangle(for polygons) will result in subsequent steps to draw them (even in step loop to create a temporary sprite for displayin it without troubeling draw step with so many operations).
 

Nocturne

Friendly Tyrant
Forum Staff
Admin
should I give up on sequences and just use objects?
Yes. :)

I say this because I don't think sequences would give you the required control over the lasers.... If you want them to have any kind of collision then it's going to have to be an object, for example. Sequences are better suited to creating cut-scenes, animation loops, and menus (imho). I'm pretty sure you could probably work something out with sequences, but I suspect it would be a lot more work for little or no gain.
 
Top