Language…
5 users online: Firstnamebutt, Golden Yoshi, GRIMMKIN, Pink Gold Peach, qantuum - Guests: 249 - Bots: 394
Users: 64,795 (2,377 active)
Latest user: mathew

How do I implement a beam/laser?

Like this where the laser takes time to get to its full length. How do I implement that?

I'm using SA-1 and want to use Cluster Sprites for the laser. I have this



but I don't know how to make it continuous like a laser or beam should be, and I don't know that that patch manages to do it.

Click the character on the right side of my layout to visit my Discord server and discuss and play and look at and get updates and sneak peeks of the games and other things I'm making.

The authors of these 2 My Little Pony fan games have removed their games from the Internet.
Rise of the Clockwork Stallions has been updated! Download My Little Pony: Rise of the Clockwork Stallions DX: Director's Cut and My Little Pony: Magic Shards now! Spread this link!

Does it have to be a series of cluster sprites, or can it be one long normal sprite like the electricity in this? I'd think that the latter would be easier.

----------------

I'm working on a hack! Check it out here. Progress: 64/95 levels.
Originally posted by imamelia
can it be one long normal sprite like the electricity in this? I'd think that the latter would be easier.

Hmm, I wasn't thinking about making the beam like that, but maybe I could make it like that. How does that Mechakoopa sprite implement and handle its laser? I would still prefer to use Cluster Sprites, though.

Click the character on the right side of my layout to visit my Discord server and discuss and play and look at and get updates and sneak peeks of the games and other things I'm making.

The authors of these 2 My Little Pony fan games have removed their games from the Internet.
Rise of the Clockwork Stallions has been updated! Download My Little Pony: Rise of the Clockwork Stallions DX: Director's Cut and My Little Pony: Magic Shards now! Spread this link!

I don't think it's very reasonable to make something like that with sprite tiles at all. The SNES has a hard limit of 256 sprite pixels per scanline, after that any further sprite pixels will simply not be rendered until the next scanline. The mecha koopa's lightning is 128 pixels wide, I think, and can already sometimes cause problems due to the sprite limit. There's a reason a beam like this (blizzard buffalo, mega man x3) is just 1 color: it's made with windowing HDMA rather than sprite tiles (only the front and back of the beam are sprite tiles).

You can use sprite tiles to make this, but you're really fighting against the hardware. If you must, you should make the beam shorter to avoid sprite limit. Depending on how you make the beam, you might want it to be its own entity (like the mechakoopa does) or be completely controlled by the source entity (which i would guess blizzard buffalo's beam is). You *can* use cluster sprites but that seems like an awfully clunky solution. The beam is almost certainly just going to be a graphical effect with a single hitbox, which isn't really what cluster sprites are good at.

allow shy guy emojis in post footers you cowards!


One option to avoid the sprite scanline limit is to just draw every other tile and alternate between sets of tiles each frame, similar to what Sonic does with the top of the water in its water levels. You can see the effect very clearly in that video due to the video not being rendered at 60fps; at full 60fps, the tiles would instead appear transparent due to alternating between visible and not visible every other frame.

Professional frame-by-frame time wizard. YouTube - Twitter - SMW Glitch List - SMW Randomizer