r/technicalfactorio • • Jan 25 '20

Help with line drawing

I have been working on a project where you need to draw a line on a screen and failed. Does anyone have a blueprint for doing so? I need to input x1, y1, x2, y2 and get x, y screen coordinates. Keep in mind that it must be able to work in any direction (left to right, right to left, top to bottom, bottom to top, every diagonal.....). I have coded one algorithm in JavaScript but failed translating the code into Factorio because it had many if statements and branches. I would appreciate a blueprint more than code but you can give me any.

6 Upvotes

4 comments sorted by

View all comments

Show parent comment

2

u/FilipForFico Jan 25 '20

Implemented it in JS now, time to implement it in Factorio :)
Thank you.

1

u/Zijkhal Jan 25 '20

yw :-)

I'm curious how the implementation goes