It’s the New Year’s Eve 2020 and we can’t wait to share the the news with you from the Reign of Guilds developers’ forge.
The main thing that was done over the past month is completed works on AI 2.0. The task is one of those EPIC milestones that separates us from the Alpha version.
The section about AI is rather large. Therefore, we split it over several reports. The 35th report has the following structure:
- Mobs and their animations;
- AI 2.0: the beginning;
- Mocap of animations;
General list with green highlighted changes from report #34:
- 1. Animal origin:
- 1.1 Rodents (squirrels, hares, rats). Completed;
- 1.2 Birds. In progress;
- 1.3 Deer. To be covered with fur;
- 1.4 Wolf 2.0. To be covered with fur;
- 1.5 Boar. Completed;
- 1.6 Bear. Done;
- 1.7 Leopard. Completed;
- 1.8 Mammoth. Completed;
- 2. Children of the forest and exaggerated animal species:
- 2.1 Armadillo;
- 2.2 Salamander;
- 2.3 Dryococelus. Done;
- 2.4 Menada. Done;
- 2.5 Scorpio. Done;
- 2.6 Dwarf. Done for C+ only;
- 3. Undead:
- 3.1 Skeletons (melee, ranged, magical). Ready;
- 3.2 Lich-nifon. Ready;
- 3.3 Zombie;
- 3.4 Cerberus;
- 3.5 Ghost (a.k.a death with a scythe);
- 3.6 Devil;
- 4. A mixture of the Citadel and the Dungeon species:)
- 4.1 Golem. Completed;
- 4.2 Werewolf. Ready;
- 4.3 Troll;
- 4.4 Ogre;
- 4.5 Minotaur. Ready;
- 5. Large flying creatures:
- 5.1 Dragon. Done;
- 5.2 Viviern
Their purpose is to fill the never-ending forests and fields of Dwarhan, to simulate activity around players especially at early levels, to slightly influence micro- and macro-economics.
There are no immediate plans to establish a self-contained ecosystem, even though AI 2.0 has all the prerequisites for it.
This is how they look like:
They were deliberately strongly optimized so they wouldn’t influence the FPS much.
This is how they move around:
Actually, despite rather a large volume of animated activities, they can only move around, rest and run away.
They can be butchered and their meat will certainly be in demand among innkeepers.
- This is a special vendor that is a transitional stage between traditional quests (NPC - players) and other quests (high-level players - low-level players). The thing about the innkeeper is the retail and purchase prices are strongly coupled for him. For more details, see “The Dynamic vendor balance”. In other words,
- The higher the demand for food is, the higher is its price,
- The higher are the procurement prices of food. In essence, prices got no ceiling;
- There won’t be prepared food if no one brings the raw ingredients. Or its price will approach infinity;
- The cooking cycle is spread over time and has random intervals, i.e. it's impossible to bring a piece of raw meat and immediately get a steak;
- Everybody needs food without exception. But top-level players aiming at PvP need it even more;
And of course, there’s got to be some black humor: the innkeeper sells a diss from chicken if one brings them rat meat.
? Question to readers ?
Shall we increase the drop chance of meat from rodents for players of lower-levels? Or the twinks will degrade these bonuses anyway?
This is the beloved and familiar to many mammoth and his “snowу” variant:
His animations will be accompanied with a slight shaking of players cameras that are within N meter radius from it:
This is how it looks with the fur:
Unfortunately, we need to increase the polycount of fur insertions because they got too stretched during certain animations.
We are preparing for it ramming type of behavior, i.e. it attacks after it accelerates and then it does another target run:
Perhaps, this is the most complex fur-related thing... and we decided to make it rarer in order to show the skin color:
Arguably, the leopard will be the fastest mob in Dwarrhan and it will be able to run away from most spells ;)
The new Golem replacing the old one along with several skins:
And several animations for it:
II AI 2.0
As the system got rather large-scale and universal, we begin talking about it in this report. But we will dedicate an individual report to the main part of behavior and roles.
We left unchanged systems made earlier:
- System for stats/characteristics of mobs;
- System for loot drop at death;
Everything else has been remade from zero and unified to the highest degree.
This whole AI got full-fledged non-target binded to its animations.
This is how it works
- Each creature (be either a mob, or an NPC, or a guard, etc) got a sphere (domain) for the close-quarters combat. This is how it looks:
- It can freely move and be attached to a certain position with respect to the mesh (roughly speaking the model) of the creature. Also, its position can dynamically change depending on one or either activity (upon a trigger).
- Then, each animation is modified in so-called "animation montage":
- It contains a trigger (a key) for inflicting damage in the described above sphere (domain) at a particular moment attached to the animations;
- It contains video- and audio- effects (hit sounds, footprints or players’ cameras shaking);
- It contains the system of spells that was created for playable characters;
Thus, the system allows us to drastically revise the approach to the killing of mobs and grind in general from a game design standpoint. In other words, it allows to make the grind more complex using the following vectors that must be balanced:
- increase DPS for all creatures;
- increase PD and MD of creatures from long-range attacks;
- placement of keys on animations in such a way that the active player during the melee combat can dodge mobs’ attacks but this shouldn't be an easy activity.
It has not been without earlier designs optimization:
- earlier, mobs existed separately from each other. Each one of them controlled their spawning, timers, respawning, and walking distances, and the following behavior;
- this resulted in unnecessary extra loading during the “creation moment” of the server as well as during its lifetime;
- now 99% of mobs won’t exist independently in the world;
- as some sort of a manager called the “Spawner” does the job of spawning, despawning, watching over the timers, and controlling some of their parameters. This significantly decreases the number of the separately existing process;
- The manager won't spawn mobs within its bounds if there are no players within N meters from it. This means that initially when the server is created there are no mobs inside.
- If the last player moves away from the spawner further than (N+n) meters then the manager will destroy mobs around itself but it will continue managing their timers so that a re-entry into the sphere of influence won’t result in premature respawning);
- Naturally, the sensing distance of triggers will be such that they won't appear right under the nose of the players. If large mobs like mammoth need approximately 200 meters of distance so that its appearance won't be noticed by players, then a 100 meters is enough for low wolves.
Under the condition of a large open-world concept, such a system saves about 80% of servers CPU even in case of full non-target for the AI.
Currently, we don't have plans to give it up for the sake of the “life of AI without players” because there was no intention for the independently existing ecosystem as is. And we still remember very well the problems of Ultima Online and we do not want to make the same mistakes.
A little bit about the behind-the-scene economics
The introduction of SpacialOS was stopped for the sake of AI 2.0. However, initially it was a tool that allowed to:
- Stop trying to save CPU server time for the sake of AI;
- Create worlds that live a full life of their own without players;
- And to remember forever where, figuratively speaking, each leaf from a tree fell during autumn;
These all looked great on paper. But after we calculated the server cost for such a high livin’ we answered a question for ourselves why games that use the technology got shut down so fast.
For such servers, within the universe of ROG, it would require 5.7$/month for every active player. And this is astronomically expensive.
These 5.7$/month don’t take into account the trial system. This is why the integration of SpatialOS was put on hold until optimizing the AI and measuring of the real cost of the technology.
? Question to readers ?
We are planning the following trial (free) time system when transitioning to P2P system of monetization:
- From 2 weeks till 1 month for new players;
- Accumulation of playtime during the inactivity of unpaid account;
Para.1. is intended for the decrease of the entry barrier, Para. 2. is intended for the decrease of players' return barrier.
Here is the actual question: what kind of trial period would be interesting for you?
Strict limitations of account functionality and characters are possible but without blocking the access to entering the game and similar stuff.
At the end of our introduction about AI 2.0, here is a funny GIF depicting “predators”, “victims”, and the “patrol” as well as a ragdoll system added to mobs upon their death. The description is waiting for you in the next report:
The optimization was done long ago already and we could not get around to talking about it.
First, let's talk about what it brought with it:
- The drawing distance has been increased from 0.7 to 3 km on a flat surface (for instance, water). The distance is even larger when looking down from the mountains.
- The technical fog has been completely removed. This allowed us to globally revise the lighting settings.
- New lighting and the atmosphere are more intense, bright, and clear;
Here are some screenshots from ROG Club so that it's clear what sort of negative issues the technical fog brought:
- The average FPS on maximum settings has been increased by 10-20% depending on PC Hardware.
- The average loading time of a map when entering the game has been decreased twice. This is why fewer players fell under the water. With HDD 7200RPM, even on the slowest one, the loading time is less than a minute ;)
- The load on the file system has been decreased 3 times when approaching locations with a high density of objects (like towns, villages, quarry, etc);
Initially, each continent was spread over 20 x 20 km2 of space and has the surface area of dry land about 200-250 km2. Each continent has been divided into 64 grid cells of 6.25 km2 each.
Such a rather large subdivision into grid cell turned out rather convenient from the standpoint of object distribution over them. However, after we assembled the first two counties, it became clear that we must pay for the conveniences with an unbearable amount of objects from 4000 to 17000 on each cell.
Such a number of objects almost doesn't influence the FPS since they are not getting rendered if they are invisible, but they create an extra load on CPU + RAM + data carrier.
When the cell was loading asynchronously (i.e. gradually) in the distance of 500m-600m from its borders, the statistics showed that on average players kept in memory about 3.2 cells. While the loading was asynchronous, the unloading was done synchronously. This inevitably resulted in freezing even on top PCs with PCI hard drives.
We adopted the following solution:
- Each cell was divided into identical hierarchical sublevels ( Sub-level 1 and Sub-level 2)
- The landscape, the trees, and the large stones remain on the grid cell. The LODs of the grid cell are loaded in a distance of 5 km. The grid cell shapes up as a full-fledged cell from its LODs in a distance of 500-600 meters.
- Locations with tall objects (above 4 meters) are on the sublevel-1 and they begin to get loaded in the distance of 350 m
- Locations with short objects as well as some small things in locations with tall one are moved to the Sub-level-2 and they're loaded in the distance of 200 meters from the character
In the end, we got from 6 to 20 sublevels in place of a single cell:
As you have already guessed, the division into smaller pieces and the decrease of the loading distance result in a significant decrease of objects loaded and unloaded from RAM when traveling over the world since earlier even if you're running by a village at 500 meters from it and even if it's not visible, the cell with the village was loaded fully completely.
As a result of it, the player as before would keep in memory about 3.2 cells but now they are empty and consist only of LODs of the landscape plus the trees. These are the LODs since the landscape becomes full-fledged only in the direction of the movement. And for this case, there will be several sublevels of nearness.
All we got left to do is to make LODs for the Sublevels (SL1, SL2) that would allow us to load them in the distance of 300-500m, and move the real Sublevels (i.e. loading the object in the distance of 100-150m). For the record, the character is no longer indistinguishable in the distance of 80 meters already and is less than the reticle.
It is all very simple with the weather. We had to update TrueSky for it that resulted in the breakage of clouds: they turned into indistinct zephyr. Also, the FPS dropped. On the other hand, they were looking quite sweet:
But these were temporal negative consequences and during the time of the report, they were resolved.
Basically, the weather phenomena in the form of precipitation (rain or snow) have been edited and since the clouds in TrueSky look rather effective.
They don't appear out of the blue randomly, but there are intertwined with the situation in cloud condition, I.e. the clouds are primary.
We will tell you more about the weather cycles along with another report about year cycles of TreSky since they got to step ahead and surprised us.
The same time of the day while having full clouds clear sky even though with Xavier clouds
and the little bit of rain close by:
V Mocap animations
This is how we are raking in:
And this is how we tried to re-create a hammer/pickaxe with the cleaver:
We rarely get online recently. This is why we tried to make the final report of the passing 2019 bigger and brighter even though we could not fully avoid text as we needed to talk about the AI because it's very important and significant.
We couldn’t help but confessthat things have been better, the rate of the development’s been smoother, and the tasks have been simpler and clearer. Especially we got tired from the negotiations, preparations for them, application forms, demonstrations, and commentaries about the project, for git, translations-translations, and translations again and so forth. All the routine got us seriously distracted from the development itself.
We’re confident that, in 2020, we'll get everything stabilized and we’ll not only reach the previous development speed but, with all these negotiations not in vain, we will reach a new level of funding.
We are sincerely grateful to everybody who follows the project and supports us!
We wish you Happy New Year – Let’s ROG’oms up, friends!
Your team of Reign of Guilds