Global Update 24.04.05

Hi survivors, today I’m releasing a pretty global update that forced me to make a lot of changes to the internal logic of the game, in short, the game has a new concept of the game interface, level editor and a new netcode!

Now we need to get to the big details and talk about each change individually, let’s start in order:

USER INTERFACE

Until the current day the game had, let’s say, a rather ambiguous solution to the design of the main screen and the game as a whole, but now I have largely decided what I want and will move in roughly the direction that you could see on the main screen of the new version. And yes, I decided to make the store separate from the game tab largely because before it was very much woven into the game itself, and now it’s becoming more of an add-on than something unified. On the other hand, I wanted to make a sort of Steam overlay inside the tab. And thirdly, it seems to me that this version of the interface is banally more beautiful and more original.

LEVEL EDITOR

I finally added it, but the story of its creation is much more interesting than it may seem at first glance, because originally I wanted to just change the existing level Skol by adding there updated Nowa Huta, but I ran into a number of restrictions that did not let me do. I think my endeavors can even be divided into whole chapters.

1. Adding a new level directly. This is logically the first thing I thought of. In order not to pollute the main map, I created a copy, where I started to make a new location, when I finished the work, I thought I would just transfer it to the main stage, but then the most unpleasant thing began, because the final size of the map was so large that when you create a build the size of the game itself exceeded 400 mb, which is simply unacceptable (By the way, the size of the new version is only 80 mb) so I decided to go to the next step.
2. Divide the map into sub-levels. Unlike my first approach to directly create a map, I decided to make one map, which would be divided into several smaller ones, that is, for example, the location of Frankovska would be one level, the location of Nowa Huta in another, and the environment in the third. Unlike my first attempt (from previous versions), when the player moved from one location to another by changing the server, in this case all locations would be loaded at once as additional locations. However, this approach also had a number of disadvantages, the weight of the map may be reduced, but the final size of the game did not change, and began to occur a lot of problems with performance and, worse, with the servers, so I abandoned this idea.
3. Creating a digital copy of an entire level. I thought that another option could be the ability to make a digital copy of the whole level, so that it would be saved as a separate file (like .dat), and when loading the level player would load it from this file, but after creating this system I realized how inconvenient it is for me and decided to give up.
4. The level editor directly. Finally, after a while I realized that it is better not to play with quite losing variants and will just dopload the level as well as from the last point, but already through a full-fledged editor. This was an extreme decision, because it meant that I need to filetically rewrite the gignate part of the game from scratch and so it turned out, I had to dig through half the game to adapt it to the new version of the levels. To begin with I thought to add for players (for myself too) the possibility to manage only static objects through the editor, but then I added support for the terrane editor and even implemented a full hierarchy in the project, with the help of which you can do literally everything. It’s actually a full-fledged game engine inside the game (though very much cut down). It took me a crazy long time to make it and I encountered a number of problems that forced me to make some pretty radical changes. For example, the built in assembly for artificial intelligence in Unity was very limited and it did not give me the opportunity to save Navmseh generated by the game, so I had to buy an assembly from a third-party developer for 100$ just to make this function appear, and along with this I had to rewrite the entire logic of artificial intelligence in the game, which was very hard on my time and effort. Also there were quite a lot of other nuances, but I will describe them too long, I’m sure you can write a whole book about them. Soon I’ll start shooting tutorials, how to work with the new editor, because the functionality there is a lot and to understand it takes time.

NEW NETCODE

Oh… it was a nightmare. Switching to it was extraordinarily painful, because it meant I would have to rewrite the entire game… and that’s what I did. To begin with, I need to explain what I didn’t like about Photon, in a nutshell, it’s everything you hated multiplayer in Erythros for, really, always clogged servers, obscure regions and all that. Initially I thought it could be fixed by buying my own server and putting the game client and the photon server on it, and I even wrote a support post for it so people could do it too, but…. The server from photon just did not want to work in any way, there was no information on the forums and the last time this thing was discussed in the distant 2015, and since then there was nothing changed. After these torments, I realized that to stay on photon is not an option at all and I began to actively explore other solutions. But in the end I decided on 3 options, either to use Mirror, or FishNet, or to build server/client logic on Telepathy myself. At first I tried the first option as it is quite a popular solution, but the logic was too much at odds with what I had, because there RPC functionality was very limited, so I decided that it was virtually impossible to rewrite the game on it. So I decided to start with the second one and what was my surprise, how easy it worked and that’s where I stopped. Yes, it also had a thousand limitations that forced me to completely rewrite the game, but nevertheless it was not as painful as it could have been in the first case. For my code the pain of moving from the photon to the mirror is comparable to the impact of a train at 200 km per hour, at the same hour as moving from the second it was comparable to the impact of a truck that was traveling at 120 km per hour, that is, as if the outcome is the same only in the first option will get minced meat, while in the second maybe even the body remains.(I know, not the most pleasant comparison, but for my psyche it was quite understandable explanation of how hard I worked).

But what I did has its advantages, because now the game works in one thread, and not as before, who first has time to get to the processing that will be executed. Previously, the logic of the game worked like a wild jungle, where all issues were solved by force. Now the game has become much more predictable and it strictly follows the same scenario on all devices and no other way.

The pros of the new netcode is full support for remote servers, LAN servers and now you can make your own server through ZeroTier like in the good old days. No more CCU’s and the game can support as many people on the server as it can handle (over 100 people). Plus I brought back SuperHost, which used to allow you to simulate the server logic without a client. I think I should also make a couple of tutorials on creating my own servers.

Also for the owners of the premium server browser gets a new life, because now there will be available all the official servers of the game, and in the future perhaps even not only official. In order to add a new server to that list, you need to contact me and I will check the server for serviceability every day to maintain the quality of this tab, and in the future there may be automation of this process.

The VoIP function is temporarily not working as it needs to be redesigned.

OTHER FEATURES

In addition to all of the above, I would like to mention a few other important changes. For example, I have seriously worked on shaders, for this I had to buy again a separate asset for 100+$, which makes it easier to create new shaders. And after that I have already written 2 new shaders. Flashlight and car headlights used to look like spotlights that illuminated the entire map, now it does not happen and the range of light is limited. Yes, it’s important to stop here, a lot of people didn’t understand the point of making the lights flat. It has one major reason, optimization. You see, light processing is a catastrophically resource-intensive process, but in the case of this game, which is highly dependent on GPU Instancing (thanks to which the location of Frankivsk went so smoothly on medium-sized phones) technology – this is incredibly critical, because if any light source hits an object with GPU Instancing, it actually disables this function for it, and this means a 10-fold drop in FPS! So I decided to make all the light in the game through a flat texture, which does not emit light at all, but only simulates it, from which the phones and their hardware do not perceive it not for a light source, but for another object of the game world, which means I can put them even a thousand in a row, and fps will not change.

Before

Before

 

After

After

I also removed the strange white glow of static lighting.