June 2024
General
…
New Slime System
If you remember, I mentioned within October 2023's development diary a new system I'd created to manage fluid threads.
During this month, I redesigned a whole part of the system. I wanted to have a better application and optimization according to the different uses.
Here are my first tests with 2 x 25 points:
The basic algorithm is quite simple: the points are connected to each other according to their distance, and the connections are broken if the distance is too large.
Each point will then check the other points and existing links in every frame. The problem is that the CPU cost becomes exponential with the total number of points.
In order to achieve a better optimization, I have moved the main functions to C++. I've done a lot of work on data and cache management.
I specifically made use of KD-Tree data structures by Jon Louis Bentley.
This enables me to get the distance between two points much faster than by checking each point individually.
I am now able to achieve an acceptable level of optimization with 2 x 2000 points.
I can go up to much higher weights by using optimizations like display distance, occlusion culling, but also by limiting the number of interactions per frame or the tick rate.
The problem now is not in the calculation of the algorithm itself, but in the rendering of it.
For each thread, I use a static mesh deformed by a Spline Mesh Component, which is then updated every frame by the CPU.
Spline Mesh Components are very handy, but not at all optimized for this kind of use.
That's why I'm working on a particle system using Niagara. It will be much more optimized for this kind of task. I'll tell you more on that next month.
Slime On Skeletal Meshs
I use configurations files in order to manage slime threads on a deformable model such as a character.
A script will then use this configuration file to add the various points and manage the attachments.
In May I told you about my Nodal Editor plugin, which manages my situation system and Stuck Zones.
This time I'm going to use it again to define the various points of attachment for the thread in the configuration files.
The most complicated part was creating the different libraries to determine the best attachment zone for the different points.
The problem is that I'm not at all used to working with FSkinWeightVertexBuffer, FSkelMeshRenderSection or this kind of data in Unreal Engine.
It took me a long time, but now it works without any problems.
Now I can use my system with much more fluid-bound applications, such as the sweat threads between Tala's toes.
Or the threads of sweat between the ground and the sole.
Of course, these options are optional and can be deactivated in the game options.
Slime On Digestive System
In much the same way, I've made the fluid threads system functional with the digestive system animations.
Unfortunately, in this case the optimizations linked to the use of KD-Tree are much less relevant, as the data structure needs to be constantly updated.
New Digestive System Sculpt
I’ve worked in collaboration with Sandman, who made the 3D models and sculpts of the digestive system.
This is the current in-game rendering, but it's not the final rendering.
Digestive System Animation
With the update of the 3D models of the digestive system, I've taken a closer look at some of the animations.
This animation is sped up by ten.
I've also added more contextual animations, such as the heartbeats.
General Game Settings
As a result of bug fixes, I've had to reconsider the way I manage certain options and have created a new system for managing general game options.
Previously, if I needed to change the operation of certain game options, such as damage mode, I had to change a whole bunch of related scripts.
In this particular example, I had to alter the start menu, user interface, game master interface, game master script, player controller, game instance, and many other small dependencies.
This is due to the fact that at the time I was working on these options, everything was being done directly in the code files.
Now, as soon as I can, I do everything in modular form so that I can modify elements more easily and avoid dependencies between different scripts as much as possible.
On the subject of game settings, I now have configuration files for each type of option in which I can define their behavior and use.
For example, the Fast Travel option will only be available in the game start menu and will activate all teleporters at the start of the game.
I can also specify which options to use in different scenarios.
Still through the use of these configuration files, I am able to set the options for immortality and damage mode as modifiable in-game and replicated in multiplayer.
And in some cases directly adjustable through the Game Master.
The scripts directly involved will check the status of the options themselves.
The advantage now is that I can easily add new options and mutators in certain scenarios.
These are just a few examples.
More Cheats
I've added new cheat codes like the scale change, and I'm now using notes to get better feedback.
After running a cheat code, a message will tell you if it worked or not, and a note will tell you more about what happened.
Chat Menu
With the updated cheat codes, I've added notes support to the chat menu and re-designed the interface.
See more: Devblogs - Wips Telegram Chanel - Discord Chanel - Support the game - MMVS game