# [Röda], <s>405</s> <s>393</s> <s>392</s> <s>391</s> <s>371</s> <s>366</s> 361 bytes F f{f=f/" "l=[sort(f,cmp={|a,b|[#a<#b]})]seq 0,#f-1|f[_].=" "*(#l[#l-1]-#f[_1])c=""x=0 y=0 X=1 Y=0 {l=f[y]C=l/""c=C[x]a=X [c] {X=1;Y=0}if[c=">"] {X=-1;Y=0}if[c="<"] {X=0;Y=1}if[c="v"] {X=0;Y=-1}if[c="^"] {X=-Y;Y=-a}if[c="/"] {X=Y;Y=a}if[c=`\`] X=-X if[c="|"] Y=-Y if[c="_"] {X=-X;Y=-Y}if[c="#"] x+=X x=x%#l y+=Y y=y%#f x+=#l if[x<0] y+=#f if[y<0]}while[c!=";"]} [Try it online!] [Röda]: https://github.com/fergusq/roda [Try it online!]: https://tio.run/nexus/roda#dY/RboIwFIbv@xRdGxOdMOQa6o2JzwCpxVVolQXFCWEQ4NndKSLuZk2anv87//lzet9i3WqmHYJIxniR38q5tuLzlbWdtA4dp9KnB9EvRKG@8cqi2nY7zffigxFM3uc04zSzXWFTgK5YxIyQmq1QAzdgLgrhbTOmeSM2LHMIidmG10KyAPFYoBY8Hnj6VHMYXZMB2X@Z/2ArQO6IqheynywaR0MD5QidBzRsRJ@7TwGL2QF@ODpwwEA4yv2YEpiUcEyhAOslbFyzekYz1CxZCB9sZlQbTjMzXPsrYTpUG9WA6n9OaaZ4/MaIR0R/P8v0gluEcamKMpaFKjDDnFTYnHWF1vIQV47joaNWiR@lJ2Lhf7umByRR2nuW3VTRqdrtPGQC9gZE3pCSKAfh6Cs9HX1DB6/vSfgkWHV@m/bDsO9r1yQfkrYTGuT1ll5KTAiIJL8o1N9/AQ "Röda – TIO Nexus" [Check outputs!](https://tio.run/nexus/roda#dZJPb6MwEMXv/hSztiol21DCGZxLpV73msgxf2JwQkVDNqEsCPjs2TE4tHtYJMTMz@8NbxD3N9Cd5tqlhBZc3MprtdAr9XHhXZ@sDr1gScAOcljKW/Yb1iumHa/XIpIvnAL9uWCFYIXjSYch9ORScUobviYt3lvukR0@u4Jr0cpXXriUKv4qGpnwLRFKkg41PmqGXAu0buiInO8smNgakWdR/YWcBwutdWdgYqE7QcMsivexxGDOFiZFjwo07Gwb2SlbM2VnpzCEzTMmbnjzxArSPvMdLtg@MW04K4y5CdbSnDBtuha74c8pLzKhfnDqUzncP5L8DB0BqLJbpZJbdgMOgtZgrk1NNslB1a7rk6PO0iDMT3QF/z01Z0jSTPuPsp8rZqrYVHufGH8U40noj0PSzCUQvuenY2D0oynwE9wRpaq8XjNV/fqsLp@VzTe@OcA3HU956LqbGi3fKcBM50RToFQdkkfDbDPFivZjG69oCDYUBDj/PRwNUygsMRSmmn49YPOHczzoQZdXyCEtxw3LMTEGpnTsxdtiVotcLiUarOaFQzRpZtO/a6NejoLLNT9X08S0PGdkuP8F "Röda – TIO Nexus") Some 20-30 bytes go to parsing the input (I have asked the OP for a more relaxed input format and am now waiting for their response) and 80-ish bytes go to padding spaces when necessary. ###Edits - 10 bytes saved thanks to @fergusq by using `%` instead of checking whether x or y is over the boundaries, which paved the way for 2 more! - Used <code>\`\\`</code> instead of `"\\"` - Moved `c=""` to the second line and then removed the newline following it - Moved the conversion of the lines to single-character array into the loops instead of at the beginning - Used the brace syntax of `while` (thanks to @fergusq for spotting that) - Moved the `a=X` out of the if-statements