That's quite a lot to answer...
I'll do my very best...
On a general note: The basic "design" of jPCT is almost 23 years old now. That alone explains a lot and I'll refer to this as an
excuse explaination in the latter. This will become more clear once I manage to reply to the "jPCT origins thread"...
Anyway, here we go...
1. Why can a Light object only be assigned to one World? As far as I know you can only add a Light to the World using the constructor of Light.
That's because I was stupid/lazy when doing the light implemention in the early days of jPCT. I simply coded the lights to be part of the world in a way that they are bound to it, because of...reasons...I guess. I didn't change that, when I released jPCT to the public after doing some cleanup work. However, I then added the Light class to hide this to a degree. See the documention of the Light class for desktop jPCT, which also tries to explain this. When converting jPCT to jPCT-AE, I kept this behaviour for compatibility reasons, but I tried to hide the actual implementation completely by solely relying on the Light class and removing all light related methods from World...except for removeAllLights(). I kept this, because I had to give the user at least some way to remove the lights from a World instance that he actually never attached to it directly. Yes, this all sucks...but that's the way it is now and it will stay this way.
2. Is there any beneficial multi-threading capabilities jPCT-AE has or could have?
No, there isn't. OpenGL is a state machine. It can't handle multiple threads. You could do the processing in multiple threads, of course. But in almost all cases, it's not worth it for what you do with such an engine like jPCT. The desktop version supports multiple threads for the software renderer (which really helps a lot) and for the processing (via the WorldProcessor), which isn't worth it expect in some rare and almost artifical cases. Also, jPCT isn't thread-safe and jPCT-AE is even less thread-safe. The reason for the latter is, again, history. When I started jPCT-AE in 2008, Android used the Dalvik-VM on single core processors running at around 800Mhz. The VM had no JIT, a maximum ram size of 24mb and only a stop-the-world-garbage collector. Which was very slow as well. That meant that garbage collection took somewhere between 80 and 500ms once triggered. And that meant, that the usual game loop when using jPCT-AE wasn't allowed to produce any garbage at all, or the application would have suffered greatly from stuttering. To achieve that, I added some static "caches" if you will call them that. Variables and instance pools, that could be reused instead of created/destroyed each time you called the method. But this, of course, limits the ability to multi-thread even more.
If you abstract your game logic/entities from jPCT's objects and couple jPCT loosly to render your entities, then you have more options to multi-thread things on your own. I did this for the grass rendering in Naroth...turns out, it wasn't worth it, so I disabled it
3. Will ReflectionHelper be ported to jPCT-AE?
Not very likely. OpenGL ES doesn't support some functions (clipping plane related IIRC) that this implementation is using in desktop jPCT. You would have to do in a shader yourself but that would make the default shaders overly complicated, so I didn't do that. It's just a helper class anyway. It's not part of the core.
4. Will BloomGLProcessor be ported to jPCT-AE?
Again, no. This thing is more of a hack anyway. It requires huge amounts of fillrate, which still isn't there on mobile.
5. Why can a VertexController only be assigned to a single mesh?
Because the GenericVertexController implementation stores some mesh related data on initialization.
6. Why does jPCT-AE use a static TextureManager instance?
Again, it's a design decision that I made over 20 years ago. However, I think it's still fine (unlike the lights...). I see it as a pool for textures that each class can easily access without the need to pass instances around. I fail to see the benefit of having multiple texture pools in an app.
7. Why does jPCT-AE still attempt to draw non-visible polygons?
Because it has to. It culls away objects on all six planes, but you can't cull single polygons that are part of a single mesh. OpenGL is most efficient when rendering large batches of polygons, not single ones. The per-polygon culling happens later on the GPU. That said, desktop jPCT culls single polygons when using the software renderer or the hybrid hardware rendering mode (i.e. the one without compiled objects), but both aren't feasible on mobile. I didn't port Portals, because it requires some preconditions that usually aren't met in most scenes and it greatly simplified the port to leave them out. Nobody ever used them anyway except me in one single demo application. Portals were all the rage when I started with jPCT, but given their limitations and the fact that we went from software to hardware rendering, their significance faded.
8. Is there any other plans for the future of jPCT-AE?
I'll continue to support it, fix problems and maybe add some things if people need them, but I haven't got a big plan for it apart from that. The default lighting model will stay like it is. If you need more complex lighting, then write your own shaders. Naroth for example uses a lot of custom shaders for texture splatting, foilage, phong shading, dynamic recoloring of textures, parallax mapping in dungeons etc. I can't possibly cover all these things in a way that they will still work with the given lighting model.
I once looked into Vulkan, laughed and never looked at it again. It's completely low level. Don't get me wrong, I like my low level stuff as much as the next guy. After all, I'm still coding in assembly language for old 8-bit computers. But to support Vulkan, one would have to implement a new library of functions that would map what jPCT-AE needs to Vulkan calls. And I really don't see the point of this. Draw call performance isn't an issue for an app running in a VM on Android.
Regarding open source: I usually open source all of my stuff (
https://github.com/EgonOlsen71/), but jPCT. Mainly because I don't feel comfortable without some major rewrite of some parts (like the lights...
) on the one hand but I can't be bothered to do this on the other hand.
9. Any idea what causes these crashes..?
No. I see similar crashes every now and then in my own developer console as well but I don't know what causes them. I've never experienced anything like this in all my testings on all of my devices...not once. I checked some code paths in the engine at least a dozen times without finding any issue, so I doubt that it's that. Might be driver problems or problems when an app returns from sleep or when a context change goes wrong...I really don't know, I'm just guessing widely here.