Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Lightening Effect  (Read 1260 times)

0 Members and 1 Guest are viewing this topic.

DarkNemesis

  • Newbie
  • *
  • Posts: 11
    • View Profile
Lightening Effect
« on: September 09, 2013, 02:49:14 pm »
Hello Guys..
I was just trying to create a random lightening effect similar to the one used in chicken invaders, if anyone has played the game.
But I really have no clue on how to produce an effect like that.
Do we have to use shaders for such an effect? Or do we need to use advanced Opengl (although I think this is a 2-D effect at most, SFML will be able to produce such an effect). Initially I thought about using Vertex points and implement randomness in them, but it got a bit complex.
So if anyone could help me regarding this, especially if he himself had tried and done this before, I  would be really happy and grateful.

P.S. If possible, check this video : https://www.youtube.com/watch?v=DhkuQfR_Bl0
I want the lightening effect to be a bit like the laser which the jet at the bottom is firing.

Sqasher

  • Newbie
  • *
  • Posts: 19
    • View Profile
Re: Lightening Effect
« Reply #1 on: September 09, 2013, 05:53:22 pm »
A google search for "algorithm for lightning" turned up this:

http://drilian.com/2009/02/25/lightning-bolts/

That should give you an idea how to begin.

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10396
    • View Profile
    • development blog
    • Email
AW: Lightening Effect
« Reply #2 on: September 09, 2013, 08:16:36 pm »
Seems like someone was faster in posting that link. ;)

I've also once created a simple lightning effect: GitHub
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://dev.my-gate.net/