Project BloodRed DevLog
Hello, fellow tech nerds! It's me yet again with another devlog (This time it did not even take half a year)! Let me outline the main things in this devlog:
Table of Contents
With this out of the way, let's begin!
Whats New
I added a main menu! No, seriously, it took some time to get it right, since I needed it to look good and memorable. It's still a WIP, so I won't show it to you just yet!
After that, I rewrote the authentication code, meaning that now you can join servers (Instead of a hardcoded server) and enter your nickname!
I have a few ideas about the authentication side, but I'll discuss them in the Thoughts section.
I also rewrote some of the ECS parts, which now works and is fully feasable! Look at that:

You may ask:
"Why is this not public?"
And I have an answer to that! It is not public because I have implemented a getter/setter pattern!
Getter Setter Pattern
What's a getter/setter pattern? It's just a pattern, where instead of accessing/modifying the values directly, we use special functions with additional checks in place to prevent invalid or unexpected results.
Here is an example of such implicator for this pattern:

This pattern is amazing, I first found out about it when I was listening to one of the podcasts/videos (I can't remember the exact one), where Alice Cecile explained this pattern.
I can say so with conviction, because this patter had saved me lots of time and removed a lot of boilerplate code from my projects.
More ECS related changes
Continuing my inner monologue about ECS, I have made a plugin to manage those components. For example, now every entity looses some hunger with time, and if they begin to starve, they will loose health.
Stamina and Health components recover with time, but I would like to have some potions to heal the player.
I also made components for stating the player activity state (Dead/Alive), their crosshair state, their current inventory and more. I love making as many Components as possible to utilize the full power of ECS!
And now let's move on to fixed things!
Fixed Things
I have found a massive issue in one of my old plugins that I completely forgot about. It's about grass spawning. And I hear you say:
Grass? What grass?
Yes, grass! I started working on a grass system to make the world more beautiful. But, I kinda forgot about it completely...
And it was performing more than 100 raycasts per chunk loaded... You can guess why I was so confused when my FPS dropped to 25 frames per second.
But because of this grass plugin (And me unable to profile my game), I found out other areas for improvement, and I added some async loading for chunk meshes.
This should improve the performance, but the game flies at 120 FPS at the moment (With the grass plugin disabled of course)!
I also fixed a few minor bugs, added some constants (For example a constant to save the current protocol version, or the default connection port), and generally improved the overall performance.
Thoughts
Lately, I got a lot of motivation to work on this project, which allowed me to skip classes and code instead make this project even more populated with systems, code, plugins and more!
I have a few thoughts of where I should lead the project.
I want to focus on those main genres:
- Survival - This should be a survival game.
- Building-oriented - The game's main goal is not only to survive, but to build a base.
- Multiplayer - Must have multiplayer support (Already implemented)!
- Raid-fighting - Defend your base agains raids of enemies!
I find the mix of those genres satisfying and fun, so why not just roll with them?
Now let's talk about how the authentication will work.
I think that the game should store a couple of private keys that allow you to login under the same nickname to a server. The game (Client side) will store a private key that can generate any amount of public+private keys for each server. So, here is an example workflow for the authentication:
Client Side Generates the Main Key --> Client Side Connects to a Server and generates another (Smaller) private key based on the main private key; and sends it to the server --> The server sends a verification request based on the private (Smaller) key to the client --> Client confirms and replies with the generated passphrase --> Auth completed!
It's just a weird small systems that came to my mind. Since each server will have it's own private key for each client, any bad actors that gets the keys from the server won't be able to do anything outside of this exact server.
Should be safe, but it's a very early WIP. If you have any thoughts or ideas on how to achieve this, feel free to Toot me on Mastodon!
What themes should I insert into this game?
I think that some wolves would be nice. I like wolves, so why not make the main character a humanoid wolf?
I already started modeling some of those parts for the character model using Blender:

I also really like cold, harsh climates, so why not make winter - the main season. I am thinking of adding other seasons as well, but winter might be the most atmospheric in my opinion.
If you have any other suggestions, I will be glad to hear about them, even if I can't implement some of them due to my time limitations...
Performance
As I already mentioned in the Fixed Things section, I have disabled the grass plugin, and added async systems into my code, in order to make it more performant. The game flies on my generic-PC, the resource that is in the most intesive use is the GPU VRAM. I like high-resolution-textures, so sometimes I use them a bit too much x3
The performance is generally good, but if you would like to host your own server for this game, then you should get at least 6 CPU cores, even if they won't be that powerful. Both the Bevy Engine and Rapier3D heavily rely on multithreading, so the more cores - the better.
I am thinking of buying an old PC to test the server performance on, or maybe even using my old ThinkPad, we'll see.
The client performance is amazing (As long as you don't have the grass plugin enabled)!
Maybe I should rewrite the glass plugin to be a shader instead? I feel like that could help a lot!
New Branding
And here is the weird part, I'm rebranding Project Blood Red to... WolfBorn!

Tell me what do you think of that!
Whats Next
Quite a lot, actually! I'm speeding up my development time and learning many new things, and thanks to that, we might see some results sooner than expected!
Thanks everyone for the support! I really value it.
Until then...
Happy hacking!
- LupusCrystal (Crystal)