Flight Management Rendering, and Taxes
Hey Folks! So my foray into flight management continued today, but I hit a bit of a downer early on.
Basically, I discovered that selling apps and in-app purchases on Google Play means I'm going to have to figure out sales tax for any region I sell to. This means calculating, collecting, and remitting sales tax for my home state in the US, and if I understand correctly, every other country (and in some cases, each province within a country). The one saving grace is that Google handles VAT for EU purchases, so at least I don't have to handle that mess. But still, Japan, Korea, Australia, Canada...the list of tax regions in the dev console has got to be in the dozens. Maybe over 100? And they're all different, all can change rates and laws at any time, and all require regular reporting.
This just went from "another one-time setup headache" to "another recurring headache." And to make matters worse, Google still charges the 30% transaction fee for...what exactly? Apple charges 30%, but they handle taxation. Heck, FastSpring does it for 10%. And just about every other store I've worked with does taxation for devs, too.
And for good reason! Devs don't want to deal with this. Devs probably won't even get it right if they try. The number of conflicting reports out there on what people are doing is absurd. Ugh. Seriously considering ditching Android after this. But maybe I'll sleep on that a few nights while I weigh the pros and cons.
In better news, I've managed to get started on the flight manager UI:
Before spending too much time on layouts for the main ship controls, I figured I'd at least try to get the orbital position plotter up and running. It'll be useful for debugging flight, and be a good basis for other line-rendering tasks.
The trick right now, however, is figuring out how to render lines in Unity's 2D mode. The magenta lines you see above are the "LineRenderer" component, which is the built-in method for rendering lines in Unity. They look fine in 3D, but they disappear to nothing in 2D mode. Probably due to the camera's orthographic settings.
Some other methods appear to be hand-crafting my own quads in code to make line segments, which is reportedly fast, but is likely a huge headache to manage. A third method is a direct OpenGL call to draw pixels, but I'm not sure I want to go that low-end. Probably super fast, but also super basic.
There's an asset in the Unity store called Vectrosity which seems like it might do the trick. Basically a custom line-rendering utility for any style or shape. So I may check that out.
And, of course, I could also delve into shaders. Maybe I just throw a quad up where the display UI should be, and use a shader to draw pixels right on it? That opens up a lot of options, and might even be the fastest. But I need to explore it a bit more to know for sure.
Anyway, busy day today! Unfortunately, busy in some boring ways. Hopefully less of that tomorrow!