Using Aseprite’s symmetry toggles, I managed to get myself stuck building weird animated geometric patterns for all of the Core enemies. They look neat but they took SO LONG. Giving them beam-powers was an exciting challenge and a very pleasing success: in this post, I implemented the “grapple-beam”, which doesn’t actually attract the affected player, but does make flying around very uncomfortable (and causes screen-shake to really invite a sense of frustration and misery, ha).
For the shield-drain beam, I wanted to show bits of shield (pixels in the appropriate blue colour) flying off the target and being absorbed by the recipient. This was tricky based on my knowledge of the particle system: particles built ahead of time need to have their directions and lifespans built in, but I needed particles that would fly from target to recipient and disappear at the right time no matter how far apart they were and in whatever direction from each other. My strategy was to create new particles for the particle system on the fly after calculating the angles and lifetimes (based on distance and particle speed).
The sticky thing about this approach is that particle systems in GameMaker seem to be a notorious avenue for memory leaks, with the documentation specifically suggesting one build scripts to systematically destroy particle configurations at game-end. Creating these anonymous one-shot particle configurations on the order of hundreds per second would claim memory on the order of about a gigabyte per second until catastrophe, so I used a little invisible emitter object to appear at the location of the ship, calculate and configure a shield particle, spit it at the recipient, wait until the lifespan of the particle had passed, erase the configuration, and then delete itself. Clunky, but ultimately successful.
Yesterday, I created the art for the spherical Platform Core with fancy (TIME-CONSUMING) line patterns, and created some glass-shattering particle effects I’m pretty pleased with. Today, I fixed impact-rebounds so that they’re proportionate to relative mass of the colliders (feels much better), and then in the evening (~2:30am tomorrow, really), I built the grapple-beam for the Platform Core. I may want to switch out the particles I’m using for something more specific, but right now the core will grapple anything that gets close enough, and the grapple has the effect I wanted, slowing thrust somewhat and steering almost entirely.
A shield-drain effect will be needed next. In order to get particles that move in the correct direction, I think I may need to create and destroy the particles programmatically. We’ll see what the RAM hit is. I already think the beam represents a leak…