Jump to content
  • Advertisement
Sign in to follow this  
  • entries
  • comments
  • views

Laser Level

Sign in to follow this  


I've been working on game balancing issues, and fixing level & art issues as they arise.

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...

Sign in to follow this  


Recommended Comments

Looks cool. Do you have ragdoll physics on your player models? One thing that would be awesome was if lasers could cut off limbs on the player models >:D I would dice up the lizzard dude real good.

Share this comment

Link to comment
Man I wish.

That's the one thing that I'd really like to put in physics-wise, either with a verlet-type scheme or with physX or bullet, but I can't really justify the time it might take right now, like you, I have to handle many other areas other than just physics coding... ;(

Share this comment

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!