Jump to content
  • Advertisement
Sign in to follow this  
seanmusgrave

Allegro beam effect

This topic is 4022 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello, I'm working on my first Allegro game, Ghost Hunter. One particular graphic effect is the beam of light shot from the the main character's rifle. This is pretty close to the desired effect, with the gradual, smooth focus of light towards the center. Its a pretty simple trick, by drawing lines incremently to the left and right of the center line and more translucent. It breaks down however, when the beam isn't pointed vertically, as lines will criss-cross with each other and create weird artifacts: And when its pointed very strongly to the side, it starts to look downright crappy: What would be the best way to achieve the results of the first picture but applicable to any angle instead of just strongly vertical ones? Thanks! Sean Musgrave

Share this post


Link to post
Share on other sites
Advertisement
I think the cheapest solution is to simply store the beam as a png, drawn in Gimp or whatever, that you render with the appropriate rotations and scalings. It should be a lot faster than your current solution, in addition to solving the artifact problem.

Share this post


Link to post
Share on other sites
Well, you can always use the same image format as you've used for the ghosts. The important thing is that it needs an alpha channel, which the ghost images seem to have.

Personally, I use glPng. You can find it at http://www.wyatt100.freeserve.co.uk/download.htm

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • 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!