This is the main reason for the lack of updates in the game. I would like to tell you how this process is going and what results have already been achieved.
Graphic Interface
Problem:
Drawing elements directly in the game camera, in relation to the aircraft, causes a lot of problems. It looks great, but it requires extra work.
Solution:
In gameplay, I completely refused to draw the interface using a game camera. Now a standard overlay is used, rendering on top of the rendered image. This greatly simplifies working with the interface, but post-processing will no longer work on HUD. It will no longer glow so beautifully.
Game mechanics
Problem:
There are no performance problems, but there are problems with the architecture, because everything was done in a hurry. Such code is always difficult to maintain, add new features and catch bugs. And we will have to add a lot of new things, we also need ships, ground equipment, bases and buildings?
Solution:
Everything is simple here, the entire aircraft and weapons systems were sorted out. I am glad that at this stage it was possible to lay the functionality for the integration of the network part of the game, which speeds up this process in the future.
Landscape
Problem:
One of the most inefficient parts of the game. A 160 km by 160 km map “eats” a lot of computing power, takes up a lot of memory space (45% of the total size of the entire game) and looks normal only at a height of 3 km, everything below is "soaped", despite the fact that there are 4x4k textures + 12x2k environment textures. With this approach, it is not worth thinking about the ground at all.
Solution:
At the moment, I have not found a quick way to implement a beautiful landscape with buildings and vegetation. So far, we will abandon the earth's surface altogether in favor of the sea surface and will slowly test different approaches, adding islands and other small parts of the land.
Clouds
The problem:
Clouds are made by a conventional particle system and weak Android devices from alpha blending “die” very quickly. This is a big problem, considering that they look so-so in the game.
Solution:
In modern games, Ray Marching technology is used to draw high-quality clouds. Using this on mobile phones, even for such an ambitious game as MJF, is not a very good idea. I found a solution to apply the so-called pvsevdo-RayMarching, which uses noise overlay using the triplanar projection method, this allows to simulate the "fake” depth of the cloud to calculate the lighting distribution, including the subsurface scattering effect. Can you imagine this on a mobile phone? Clouds that look like Ray Marching with a Subsurface Scattering effect? I'm working on it, everything looks very real, but I still can't even believe that I can see such a picture on a mobile phone screen.
General optimization of rendering and post-processing
Problem:
Post-processing is the place where colors are adjusted, adding more saturation, blurring, glow effects, etc. In general, they add beauty to the final image. For mobile games, it used to be an unaffordable luxury, but recently it has become a frequent phenomenon and you definitely need to work with it.
Solution:
Due to the rejection of rendering the graphic interface through the game camera and the loss of the possibility of applying postprocessing to it, the game gets the opportunity to use downsampling without affecting the interface. This is such a thing that allows to reduce the resolution of the visualization of the game world, but at the same time the graphic interface will be rendered in native resolution. For example, changing the resolution of the game render by 2 times (1920x1080 by 960x540) will give an overall increase in performance about 4 times and believe me, you won't notice much difference on a tiny mobile phone screen.
What results have been achieved so far
Now everything is done in the game, except the clouds. This is a big task that requires a lot of time. Speaking in general, the test build on my Nexus 5 works with FPS 10-14, now it works at a minimum of 40-45 and is played very pleasantly.
BRAINSTORMING
Well, now I suggest everyone start a joint "brainstorm". Come on guys, tell me what you think and how could everything be improved in your opinion?