What I want is the expressibility of HTML but the speed of native code. This is for an offline, native app. Basically it is going to be a kind of markup app which takes text such as a novel and highlights parts of it in different colours. For example it might highlight all the speech from a certain character in the novel.
I want to be able to easily display novel-length formatted text which is selectable. This can easily be done in HTML and javascript.
On the other hand I want the speed of native code in order to do some fast text manipulation and analysis.
And I am making it on a Mac so I would like it to run on Windows and OSX.
In an ideal world I would embed some kind of HTML widget inside Unity. Is this possible? (Would it be fast enough to display novel-length text?) If not, what is another option? Thanks.
Edit: What I might do is write it in Javascript which seems to be quite fast these days. And then if I want to make it native I could embed that as a browser widget in Unity. An interesting way of making Unity games!
For super flexible native application, Qt is the way to go. It is a C++ GUI framework.
I’m not sure what “HTML expressiveness” is supposed to mean (because I never found it terribly expressive), but Qt had Qt Quick and QML, which may beo f interest for you.
The problem here is that site purposedly tries to scare you into buying commercial edition (that is quite disgusting), but free LGPL version (that can be used for commercial development) is still available.
Thanks, I had a look at electron, but because you write the app in Javascript, I’m not sure if I will get maximum speed unless you know all the tricks.
Qt looks interesting too. What I meant to say is that the GUI does’t have to be HTML, but it should be able to display some kind of HTML/richtext box which easily handles vast amounts of formatted text.
I guess if I really want it to be fast I’ll have to dig out my old C++ knowledge or settle for slightly slower app in javascript.
I seem to remember you need to ship quite a few large files with your electron app. I’m not sure what the footprint of Qt is…
I think I’ll try both and see how it goes. Also I’ll see which one has a nicer IDE.
Modern JavaScript will Just-in-Time compile down to machine code in a similar manner to C#. Electron uses Chromium and Node.js to power the framework. Performance for them is pretty good from my searches. Unless you’re writing a performance critical program I don’t believe you’ll see a meaningful problem.
Check out some of the example apps they showcase. You may have used some of them without realizing it.
Hmm, well electron seems the way to go. Unfortunately this means if I write some really good text parsing code and later want to use that in a Unity game I’ll have to convert it all to C#.