The last weapon type added to the game was beam lasers, and they were never properly debugged, so today I got them working nicely.
Our beam weapons stay on for a fixed period of time, and give out damage in proportion to how long the target is in the path of the beam, so you can turn on your laser and sweep it around,
but it's most effective when you keep it trained on the enemies.
Here's a shot of my dude crumpling into corpse form despite his dual lasers...
One problem was that the beam duration parameter weren't being respected, so all lasers were ready to fire after about 500 msecs, which created a problem for the lasers that had a 500 msec or longer beam duration - they would fire continuously. They also were the same color, so I adjusted that, too.
So, the lasers have 3 cogent properties that dictate their desirability. They have an amount of laser energy they do as damage, which is only fully applied if the target is in the beam the whole time. They also have a time between shots, and a beam duration. A high beam duration is good b/c you can sweep it over enemies as they move. A low beam duration is good because the same amount of energy can be delivered more quickly if you do have a beam on your target. I plan to make laser weapons for both styles of aiming.
Next, I tested the AI to be sure they could use the beam weapons well. One issue was that the beams had a relative velocity of ~10000 m/s, which was causing their target leading code to be a bit off, so I now skip that part for beam weapons.
I also happened to find an existing bug while looking for laser issues. In the ai targeting code, the enemies would look for a clear path through entities to their target, ignoring themselves, and their target. If they didn't find a mostly clear path, they wouldn't fire. This caused problems where the lizard dude was not firing despite their being evil cultists in range. Turns out that he was fixated on one cultist, but another cultist was blocking his shot, so he held off. I fixed it so that only non-sentient or same team entities are considered blockers. Other-team sentient entities are considered transparent for aiming purposes, so that he will just fire if a target of opportunity arises.
The enemies were also aiming at your center, which I have adjusted to now use 25% down from the bounding box top instead, which helps them shoot uphill...
Now they use the lasers a bit too well, I will have to add some jitter or momentum in there, I think...