News for hackers. Stuff that matters.
Re:Writing an editor in less than 1000 lines of code, just f... by Dagwoodie on Sunday July 10, 2016 @03:34PM (#12066906)
What challenges might you have if you wanted to implement something like this inside a game framework like Unity or MonoGame with C#, where it renders everything via DirectX or OpenGL?
Re:Writing an editor in less than 1000 lines of code, just f... by moron4hire on Sunday July 10, 2016 @03:57PM (#12067014)
The main challenge is that, even now, in the year 2016, there is no objectively good, fast, reliable way of rendering arbitrary text with formatting in a texture. Hell, even just plain text is kind of a pain in the ass.

And yes, I know about signed distance fields.

Re:Writing an editor in less than 1000 lines of code, just f... by tbirdz on Sunday July 10, 2016 @05:13PM (#12067296)
It's hard enough to just render high quality ASCII text. But when you consider the layout problems if you want to support full unicode, with rtl and combining characters, Indic script, etc it's very difficult.
Re:Writing an editor in less than 1000 lines of code, just f... by Dagwoodie on Sunday July 10, 2016 @04:39PM (#12067166)
The nice thing about a framework like Unity is that they do have a textfield object that behaves a lot like a standard text object in the .NET Framework. It has a lot of shortcomings but rendering the text is the easy part.
Re:Writing an editor in less than 1000 lines of code, just f... by badlogic on Sunday July 10, 2016 @05:13PM (#12067297)
Unity only supports Unicode BMP. Unity doesn't support surrogates, RTL rendering/input etc. Rendering the text performantly for none western scripts is definitely not the easy part, especially on mobile (where Unity also fails to behave properly).
Re:Writing an editor in less than 1000 lines of code, just f... by moron4hire on Sunday July 10, 2016 @06:02PM (#12067468)
Proper Unicode and RTL support is something Jonathan Blow recently spent a lot of time getting just right for The Witness. I wonder if he'd ever consider open sourcing that work.
Re:Writing an editor in less than 1000 lines of code, just f... by opcon on Sunday July 10, 2016 @09:38PM (#12068324)
If you were looking to do this and wanted a text library that is more flexible than MonoGame's bitmap fonts, I maintain the QuickFont library for text rendering with OpenTK: https://github.com/opcon/quickfont. It doesn't have very good unicode support though.