Braxnet Online 2 - November 2024 devlog
Okay, this is going to be a long one. I lost my job at the end of October, so I’ve had a lot of time to work on this.
I picked up development again in November 2024, after a long break. I had been waiting for multiple things to be fixed, but I got a bit impatient.
Components
I started with porting old Entity system code to the new Scene system. It was a bit of a hassle, but I got it working in a few days, having completely scrapped a lot of the code and only using it as a reference.With the old Entity system, I usually had a megaclass for every single specific item, like a furniture entity that had both lighting, sittable spots, inventory, and other features. This was a nightmare to maintain, and I had to copy-paste a lot of code between classes. With the new Scene system, I could just have separate components for each feature, and then attach them to the gameobject. Items are now defined in a custom game resource, and the “entity” itself is a prefab with a bunch of components attached to it.
Inventory
The persistence system got a complete overhaul, with less focus on JSON polymorphism and instead using a custom attribute on component properties that automatically get picked up by the persistence system. This makes it a lot easier to add new properties to components, as you don’t have to create a new DTO class for every entity.
Because of the persistence system overhaul, the inventory system also got a big update. Mainly I got rid of generics, because those suck.
Interactions
Each component now supports multiple interactions. For example, a couch can both be sittable and have a storage compartment. This is done by having an IEnumerable of Interaction structs in the component that gets shown in the UI when you hover over the object. The interaction is now both executed on the client and server.
Carriables
A new system for equipping things, both regular items and weapons. It’s pretty janky but it works. Weapons have magazines that sit in your inventory and can be reloaded.I added hands for punching, a lighter for lighting things on fire, and a pistol for shooting things.
Temperature
Certain things now have a temperature, like consumables. You can heat up food on a stove or cool it down in a fridge. I’m going to add a decay system later that will make food go bad if you don’t store it properly.It also has a transform mechanic where if you heat for example a raw burger patty with a space heater, it will turn into a cooked burger patty.
Fire
When things catch on fire, it will spread to nearby flammable objects. If the object is explosive, it will explode. I’m going to add a fire extinguisher later for the fireman job. It will also heat things up, so you can cook food on a fire.
Game menu
Complete overhaul of the game menu (old F4 menu). I don’t know yet what tabs I want, but I got a good base to work with. It will show things like your character and settings.
Other
User interface got updated to be more modular, and I spent some time choosing a cool font and some colors.
Apartment system got fixed up, but as the dedicated server is still broken as of writing, I can’t test it properly.
Added simple notifications for all kinds of things.
Added back the clock with the bedtime alarm and hourly chime.
Created a door entity from scratch that works pretty good with the built in player controller. Much easier to work with now that’s it’s not an entity, so I have complete control over ownership and access.
Stocks system was fixed up, but I still have the graphs to do.
Sounds system was also fixed up with categories and search.
Item grabber was added, basing it off the one in scenestaging. It doesn’t feel that great yet.
There’s now a toilet and shower meter that you’re going to have to keep an eye on.
Mail system was fixed up to be more stable.