Unturned II Devlog #031

Spectator mode is in, storage and QoL tweaks, and more!

https://blog.smartlydressedgames.com/unturned-ii-devlog-031/

Transcript

4.20.3.0 update with spectating, quality of life improvements, and more!

Sorted from most to least interesting.

Two devlogs a week apart?! Next week there is an Unturned update I should put together. Following that my hope is to continue focusing on Unturned II for at least a couple months.

Spectating


Spectating NelsonDesktop (in-editor player name)

You can now press ‘P’ to switch to spectator mode. It should show essentially 1:1 what the other player is seeing, or allow freecam flying. In the future this will of course be limited to a permission, and be integrated with server settings.

For the most part this was straightforward to setup because it’s been planned for from the start. One twist was that several pieces of code, especially the UI, were watching the local player rather than the view target player, but these have been cleaned up.

Another interesting case was spectating yourself in splitscreen. The game was tagging objects in the stencil buffer with a controller index which would not work correctly if both splitscreen views were from the same pawn. This controller tagging was reworked as a viewer bitmask so that, for example, a focused interactable is relevant to viewer 0, viewer 1, both or neither.

Storage Depth

Being able to store a backpack within a backpack within a backpack within a backpack within a backpack is a bit much.

One workaround to this would be to limit container space to be smaller then the storage item itself, but that would make them much less useful.

What I decided is to limit the storage depth to three inventories deep. This allows a first aid kit within a backpack within a backpack, but not another container within the first aid kit. To transfer this item hierarchy into a storage crate one of the interior containers would need to be removed.

Quality of Life

Drag-dropping items into the nearby inventory grid locally stores their preferred drop positioning. This allows the nearby inventory to be somewhat sorted.

Items drag-dropped behind the inventory panel are dropped into the world.

In the previous update there was an infinite weight bug when removing items from sub-storage. The cause was simply due to not subtracting the removed sub-storage weight. Several automatic tests are now in-place for weight bugs.

Holstered items (e.g. guns in the backpack) now weld to the collision hull for item physics in the world.

Attachment Listener Code Cleanup

Quite a few places throughout the code wanted callbacks when any child or grandchild item was attached or detached. This was leading to a lot of repetition binding attach/detach events for all nested items.

Moving the grandchild (grand-grandchild, etc.) binding into attachments themselves seemed overkill, and it’s nice that all of the attachment events as-is are blueprintable.

What I decided was to create a listener class for these as well as attachment observers, and register raw pointers to itself with the hierarchy of items. Other systems then create a subclass of the listener and call back into themselves as-needed. Many of the weapon and UI cases have been converted to this now.

Snow Improvements

Outfit meshes now register themselves to displace snow. When implemented snow ghillies will not displace snow.

Snow and season previewing now work in the editor. This was sort-of implemented a year ago, but there were complications because only one instance can be managing the render targets at a given time and was disabled. These intricacies have been sorted out, so PIE takes priority and then the focused level editor viewport.


Unreal Level Editor

Previous post: Devlog #030

26 Likes

4.20 LAOOOO XDDDDDD chi

6 Likes

4.20 The absolute madman.

1 Like

The last update was 4.20 as well. In fact this whole year of updates will be marked 4.20 because it is in fact 2020

8 Likes

Yer on the money, Pally’o!

7 Likes

Devlogs a week apart, and they’re on fridays? Oh yes.
Also, let’s cherish the 4.20.xx updates, they’ll only last for a year.

2 Likes

its very lit

1 Like

damn. this is a good year for unturned II

5 Likes

i look at this and immediately assumed bullshit

LOOKS LIKE I WAS FUCKING WRONG

2 Likes

We can always take it back from you—to make you right, that is.

4 Likes

big brain molton

3 Likes

Nelson it’s doing a very good job,this update came out fast

2 Likes

Finally new update

1 Like

it’s been a week :frowning:

8 Likes

hey will we get realistic reloads? say for instance your mag is in a coat/pants pocket vs. a backpack (can’t reload from backpack basically)

4 Likes

Nelson has confirmed reloading from chest rigs in the past so it is safe to assume this is already considered.

4 Likes

To be honest, I don’t like that. You should be able to reload from a backpack. Sure, it might take a bit longer to account for the fact that you’re pulling a new mag from a bag, but it’s for example, near the top, or located inside one of the side pockets, you should be able to do it.