Solver for LYNE game.
MIT License
This is a solver for LYNE game. It can also gradually show the connections, which is a helpful way to get a hint without showing the entire solution.
The solver is written in JavaScript and HTML+CSS+SVG. It should work on any modern browser, desktop or mobile. It has been tested on Google Chrome 43 and Mozilla Firefox 38.
Open the solver online, in your browser!
Write the puzzle description as text in the main text box. Click Solve it!
to find a solution. Drag the slider to gradually reveal random lines until the full solution is shown.
The puzzle description is plain text formed by the following characters:
t
, s
, d
, p
, h
letters denote shapes.T
, S
, D
, P
, H
letters denote terminator nodes (shapes that are white inside). Paths will always start and end in a terminator node.1
, 2
, 3
, 4
denote gray shapes that have 1, 2, 3 or 4 paths passing through them.0
(zero) character also denotes an empty space.Note that the original LYNE game only contains 3 shapes and does not have all 4 types of gray nodes.
This solver can be downloaded and used offline. However, running it from the local filesystem on Google Chrome will not work due to "same origin" security restrictions. Read more about it, or follow issue 47416. Firefox seems to be able to run it from the local filesystem without any issue.
LYNE is a puzzle game written by Thomas Bowker using Unity. It is available on digital distribution platforms: Google Play, Amazon App Store, iTunes, Steam, Humble Bundle Store, itch.io. It is also available DRM-free.
This solver was written by Denilson Sá using modern web technologies. The list below contains some highlights of the underlying code:
linear-gradient()
and background-size
, inspired by CSS3 Patterns Gallery.flex
and viewport-relative units, which means it is responsive and should adapt to any screen size. Some scrolling might be required if the display is not wide enough, and this was a deliberate choice.<input type="range">
.oninput
event, which fires as soon as the text or the slider changes their value. This gives a faster feedback than onchange
and is much better than using onkeydown
/onkeyup
/onkeypress
events, because it will work even if the value is changed by the mouse, and it won't run the even handler if the user just presses keys without changing the content (e.g. arrow keys).<defs>
and <symbol>
, and later used as many times as needed with <use>
.viewBox
attribute in <svg>
element, nor modifying any of the relevant attributes of <use>
element. For this reason, the entire SVG source-code is rewritten into a string and then added to the document (using innerHTML
).