Game Development Community

i found a lingthning effect , it is very interesting

by Apppothk · in iTorque 2D · 01/13/2011 (11:09 am) · 6 replies

i found a lingthning effect , it is very interesting but i don't know use torque script to rewrite it. below is example about how to create a lightning effect
krazydad.com/bestiary/bestiary_lightning.html
who can use torque scrpit to rewrite it ?

#1
01/13/2011 (11:41 am)
the performance with torque script would be horrible.
you will have to go down to C++ and use native GL commands to achieve that.
#2
01/14/2011 (7:49 pm)
You can rewrite this code fairly easy.

This code
graf.moveTo(x1,y1);
graf.lineTo(x2,y2);
is drawing a line from (x1,y1) to (x2,y2)

You can rewrite the code without a recursion.
#3
01/15/2011 (9:40 am)
My recommendation is to use a product which is great for producing effects like fire and lightning (and many, many more), these can then be saved as animations for using in Torque:

www.rigzsoft.co.uk/

There are plenty of free effects available as well:

www.rigzsoft.co.uk/index.php?option=com_content&view=article&id=41&I...
#4
01/15/2011 (12:13 pm)
TimelineFX is a great investment indeed. Bought a license long ago and a second one recently to support its dev and motivate him to add new features ;)
#5
01/18/2011 (6:08 am)
I agree, I needed an electrical arc effect in TX2D and created it with a simple 6 frame animation, looks great and performs really fast. It can be placed rotated stretched etc between two points and looks like arcing. Data beats code almost every time.
#6
03/03/2011 (10:57 pm)
i try to rotated stretched etc between two points ,but in different side will have different effect, who can indicate how to rotat in math?