This article describes how I make buildings, what new mechanics will be in the game, as well as small plans for the future.
Extracts from the diaries of the developer.
Hello my faithful friend is a diary. Today I want to talk about how the buildings will be built in our project. It would seem that complicated in buildings? Four walls, several more in them, and you're done! But we decided to go the other way. Buildings consist of modules (slabs) that outline the overall picture of the building. That's all!
Why such troubles, Konstantin?
And I’ll tell you everything.
Firstly, the unification of the plan: almost all plans use the same dimensions of the plates. Secondly, optimization of working hours: it is enough to make a couple of walls that are used in almost all layouts and stupidly connect them together. Thirdly, the rainbow flag is an overlay of materials on each model of the plate, so the whole picture is more realistic.
Good, but optimization?
With optimization, yes. Good question. Need to watch and test. There will be LOD models in any case, but this will not resolve the issue. You can use the system of the combine harvester, but then you will need to think about how to implement the destruction system. It is also possible to put each model into the current drawing system, then it will turn out so that if the character is in the same room, then all other parts are unloaded from the system. But the volume of the system will be high, and the location will probably take a long time to load.
She's so damn huge
In general, on weak PCs, it is unlikely that the game will produce comfortable frames per second.
In general, there is not much work, but enough time will be spent on this. But having one finished structure in two floors, you can easily make 2, 3, 5 and 9 floors. For the interior, most likely it will be written its own system for arranging furniture and other things. Let's just say it in a couple of clicks.
Here are the working building prototypes:
Windows and balconies
Question: Something is not updating the project ... Konstantin abandoned it?
Answer: No, I am preparing one of the largest updates in the history of the project.
Surely, you guessed it, judging by the post on how I make buildings in the project and how it will work.
Yes, the upcoming updates will make a lot of changes to the project and completely change the gameplay. All this will be in the update information.
I myself am in anticipation)
Here I will talk about the same construction methodology, but already about windows and balconies, as well as about small changes. I think it will be interesting to you.
Window frames and frameworks of balconies:
They consist, as in life, of beams, or partitions. Thus, having several ready-to-use models, as a designer, you can compose many frames and frames. This is again an optimization of the costs of man-hours and the volume of the project, and it will also be processed faster by the engine.
There is nothing complicated in the model itself, but the very work of reflection, refraction and other things is a custom shader. Initially, there was an idea to make a material that will be transparent and imitate glass, but in search of material or textures, I came across a ready-made shader. The shader itself changes the refracted light and changes it according to the color scheme, which can be customized as you like. A plus is the distortion of the glass itself with the help of a bump texture (normal map). As for the reflection - it is, but only the environment. As for the reflection of the character, I did not check, but rather no - than yes.
Yes, while there are minor flaws in the wireframes, but they are quickly fixed.
I would like to immediately tell here about the problems that I encountered and solved them, but for one and old problems were resolved at once.
Previously, I used an optimization core called GPU Instancer, but I’m putting such headstock into the project, but it’s worth the candle. The kernel is good, it works quickly and is convenient to use, but it has one drawback - static processing. This means that the kernel creates the model/prefab/parts preset as a separate file with its data: position, initial processing and material, it does not work with shaders. This is the dilemma, during the first test, unknown rendering artifacts began to appear on my location and the windows did not work. The idea immediately came to my mind that the core could not process the shader, since I already had problems with the dynamic change of materials during the changing seasons. If I solved the problems with materials by rebooting the kernel, then I won’t be able to do anything with shaders.
Despondency, sadness, depression, binge ...
Yeah of course!
At the beginning of the year, I came across a new optimization kernel, called Optimizers, and as soon as the money appeared, I immediately took it. What are its advantages: flexible configuration of each prefab - and it doesn’t matter what it is; light, particle system, character, shader - whatever. There are also minuses, this is a long setup and a flaw in the standard manager of all objects that the kernel processes (you will have to write yourself). Also, using it, you can adjust the drawing distance - like LODs, but not quite (I started to panic that the graphics settings will not work, but no - everything plows), optimization of landscape details, and more. In general, I will soon reconfigure everything, and perhaps the project will be more optimal at times - maybe it will work fine for me =). This core will also solve the issue of the work of materials during changing seasons and weather.
And finally, I decided to abandon the mesh of the combine, in favor of partial rendering. Yes, the volume of models will be greater at locations, but the project can work fine on ancient PCs - that's the whole idea.
In this post I want to tell and show the mechanics of the effects. I must say right away - this is the mechanics of the initial version. In general, first we look, then I will tell you what and how.
Ultra low graphics!
The mechanics of opening and closing, as well as the slamming of doors are not the same as in many games; they are made not through animations, but through physics.
These developments will allow us to further influence the doors through physical influences, and this is not only to move the door on the character, but also the wind, explosions and more. And most importantly, you can easily calculate the weight for knocking out doors.
Each door already has its own physical mass and the effect of the mass has already been calculated so that the door opens and closes. Yes, of course the mass of the door itself will be small, calculation of the mass of pressure on the locks, locks and more will still go on. And the cherry on the cake - it’s easier to calculate the damage of the character who knocks the door. Yes, yes - the shoulders will hurt).
This is one of many ways to open the doors that will be in the game.
Press «E» to affect...:
A universal system, an incompletely developed system of interaction with the outside world. Opening/closing, turning on/off and searching something is accepted by the system.
The action occurs when the animation reaches the desired frame. Yes, it's a long time - but it's fun. The player feels this action. If the character turns away or moves far, the action will be canceled.
The system still does not work correctly, sometimes a distant door opens - but it will be corrected over time. There will also be more actions for this system.
I wanted to list, but it will be long
I won’t write much here, just as a fact that some of the mechanics that were already implemented in the map in the game, including “loot containers”.
As in WarCraft 3, each box, corpse, cabinet, car, and much more has randomly generated objects in it, but only in the "wc3" did they appear anyhow, anyhow, somewhere in the game they appear according to their intended purpose. For example, in a wardrobe, there will only be clothes.