ID:152100
 
Is it possible to have a single straight beam in an icon and then having it turn to a certain angle through code? Like the icon would originally start out as a 32x32 icon in a 90 deg or 0 deg angle in respect to the x-axis of the icon(the bottom line of pixels in the 32x32 icon). Btw this beam is multi-tiled so it will have more than 1 icon.
Yes, but you shouldn't.
In response to Garthor
If it's possible, I want to apply it on byond. Anyone know how I would go about accomplishing that?
In response to Kakashi24142
http://www.byond.com/docs/ref/info.html#/icon/proc/Turn

However, point is, this is going to require a whole lot of work, and a whole lot of extra files to download, for very little benefit. Especially if you design it poorly.
In response to Garthor
And there's also inherent limitations because the icon operations are terribly slow.
Well, what I would do here is I would pregenerate a state of the beam for every degree of rotation (potientially more than one thousand icon states in a .dmi file)

And then I would just place the graphical places of the beam with trigonometry. >_>
In response to D4RK3 54B3R
D4RK3 54B3R wrote:
Well, what I would do here is I would pregenerate a state of the beam for every degree of rotation (potientially more than one thousand icon states in a .dmi file)

And then I would just place the graphical places of the beam with trigonometry. >_>

I've done that before, but it only works if you have a centre-to-centre case -- pixel offsets will screw it up unless you want to draw a line pixel-by-pixel.

If you're going to do a non-pixel-by-pixel routine, you might as well use Kunark's Library. However, the library will be painfully slow over an internet connection.
In response to Jtgibson
I'm not sure where people are getting problems with it being slow. I never had any problems with it with my crappy computer/connection. The pre-generated icons should have solved any speed problems.
In response to Kunark
Ya it has no problems with lag at all, its alot better than say a while() with the Turn() proc, really now since icon operations lag alot more cause of the added Alpha addition to it.
In response to Kunark
I gave it a shot a long while ago and there was a decent delay that appeared during my testing whenever I drew a lot of lines simultaneously. However, I haven't tested it since then: I'll give it a whirl.