Also lightning tends not to always move around a whole lot. I mean, sometimes you see it forming extra branches as it moves accross a cloud or something but usually it's pretty static. So as Sledge said, you might get away with just using an image of some lightning or drawing it in pieces, or you could individually rotate/animate each chunk of the image so that it sort of moves about.
For real electricity you'd need some way of modelling the way that arcs are formed and move around. You can simply use some random numbers as a basic technique, maybe draw lines even. I remember the lightning in Project X (Amiga game) was just a bunch of lines branching out down the screen but accompanied by an audio sound of lightning was adequate because it was so brief. It's not as if you're going to be looking at it for a long time, right?
I would maybe suggest having a `base` structure for the general shape of the lighning bolt, and then add or subtract from that a random amount which can go left or right or up or down, drawing lines between to fill in the gaps, because lightning can arc upward as well. This would ensure you'd eventually get to the bottom of the screen even though there are temporary diversions.
For real electricity you'd need some way of modelling the way that arcs are formed and move around. You can simply use some random numbers as a basic technique, maybe draw lines even. I remember the lightning in Project X (Amiga game) was just a bunch of lines branching out down the screen but accompanied by an audio sound of lightning was adequate because it was so brief. It's not as if you're going to be looking at it for a long time, right?
I would maybe suggest having a `base` structure for the general shape of the lighning bolt, and then add or subtract from that a random amount which can go left or right or up or down, drawing lines between to fill in the gaps, because lightning can arc upward as well. This would ensure you'd eventually get to the bottom of the screen even though there are temporary diversions.