Away From the Precipice, and Interview
Hey Folks! Hope everyone had a good weekend. We left the house with the baby this weekend, and made actual human contact! It was seriously good to interact with human adults for a while. They made us dinner, and it was awesome.
I also had some time to think about the whole HaxeFlixel/Unity crisis. One thing which occurred to me is that I was somewhat quick to jump to a wholly new technology simply because HaxeFlixel's multi-line input text wasn't working. A field I may not even need in the actual game, just the editor. And one which may get fixed over time by the community.
True, there are other frustrations I've run into, but I came to the realization that I would be discarding a huge amount of familiarity by switching to Unity. And in gamedev, familiarity with a platform is an oft-undervalued thing. "The Devil you know" and all that.
Also, one or two tricks came to mind which might allow me to work around the issue. All told, it gave me a bit more confidence to go back and see if I had exhausted all possibilities. 'Cause the last thing I need is to start from scratch at the first sign of trouble. (Which is a dangerously easy thing to do in gamedev.)
Cracking open the HaxeFlixel code again, I tried a few more things to get FlxUIInputText to work. In the end, I still wasn't able to wrest control of the text field's size, and the caret wouldn't ever move to subsequent lines in the field, even though I could type a paragraph of wrapped text.
Taking a leaf from my NEO Scavenger editing days, I tried replacing the FlxUIInputText with a standard OpenFL TextField. I had some trouble with that last week, which prompted me to abandon ship. However, a bit more finagling got it to work okay. It was able to line-wrap, move the caret from line-to-line, and even supported things like ctrl-A, ctrl-Z, and other common editing shortcuts.
The main trouble with TextField is that it uses a different display hierarchy than the flixel-ui. So they have to be moved independently, which means two sets of scrolling and zoom. The scrolling turned out to be simple once I took advantage of hierarchies and parallax. But the zoom is still causing issues.
The important thing is that these issues are purely math ones, and not shortcomings in the API. Figuring out the right scaling and position offsets is a solvable problem. More on that tomorrow.
In other news, Julian Feeld let me know that our recent interview was available online. So if you want to read about some of my design choices in NEO Scavenger and career history, head on over!
That's about all for today. I'm happy to say I have renewed at least some of my faith in HaxeFlixel. I haven't written-off Unity just yet. It's a powerful tool, to be sure, but it didn't take long to realize I'd be starting near the bottom of another mountain if I abandoned my current trail. So for now, Unity remains installed. I'll probably tinker with it just because it seems interesting. But only in my "spare" time :)