Home
Blog

Devlog 2

Over the past week or so, we've taken the time to improve the item system, add temporary models, added mouse/input locking logic for UI, added a logging system, and some more.

Item System

The Old System

The original item system was made from three arrays (an ItemId array, a MetaData array (which is just a non-decimal number) and a non-networked Timer array) and determined what item it is and what state it is in.

The problem is flexibility. If I wanted to store an ammo count for a gun, I can do that. But if the gun can also have attachments, then I have to split the raw value in two (ie. first half of data is ammo, second half is attachments).

The New System

The replacement item system is pretty different, but instead of having an array of data stored and networked on the player, it is now part of an item manager. The item manager keeps track of all the item data, and uses a byte array to send/receive data over the network when the item thinks it should re-send the data.

The three main classes for the new item system work like so:

Temporary Models

We've decided to use some of the assets from SCP: Secret Laboratory. The only model so far is the Class-D, and the model will be changed once we have a replacement.

UI Improvements (sort of)

The UI looks the similar, but it now functions properly with inputs, so you no longer move or look around with a menu open.

The main menu has been getting a proper looking UI as well.

Logging

One of the things we didn't like about Godot's logging system is the lack of things like tags/prefixes/categories. So we added a pretty close replacement to the built-in GD.Print.

The main benefit from this is the dedicated/headless server console isn't flooded with debug prefixes or mapgen prefixes.

Pictures

Temporary Class-D Models The new Main Menu UI

Thanks for reading!