A significant recent addition to the game is “gravity walls”. The mouse right and left click weren’t doing anything, and I wanted to do something with the precision of the mouse cursor besides use it as an aiming device, and I already had the gravity code written up for the planets and stars and the line tracking code written for the glowing trails the ships leave behind, so it was a surprisingly minor matter to plug all of that together and end up with a line you can draw which exerts a gravitational influence on the world. Right click draws a line of attractive force, left click draws a line of repulsive force. Drawing depletes your charge, and the line erases itself in the order it was drawn after a few seconds.
The difficult part is balance. Since I threw it in as something of a whim, I hadn’t really thought out any gameplay ramifications very thoroughly.
The first issue is which objects are affected by the wall- when I had all ships and projectiles affected, it shoved the player away so hard that he was quickly outside the zone where it was relevant. Attraction mode was even worse- it tended to suck up the enemy projectiles, the player’s ship, and the enemies themselves in a sort of washing machine tumbler of pain and collisions. On the plus side, it allowed the player to take a somewhat more active role in travelling long distances by drawing a repulsion line behind them.
So I removed the player’s ship from the calculations. Now I worry that they’re a little overpowered, though- attraction in particular is very powerful. Draw a little squiggle, and it will suck in all the enemies and the projectiles they intend for you, and collide them all together. It’s the same tight little ball of destruction and chaos, only now the player is safely outside it.
It’s of course easy to turn down the power of the lines- indeed, they’re defined in XML, so a recompile isn’t even necessary- but it seems like there’s a thin line between overpowered and useless. I expect I’ll be revisiting this as the game matures.