Press Kit Wiki

Hurtworld Update #34

Gavku

So some more character work and some weapon stuff from me this week. Having blocked out some character forms I needed to wait for them to be rigged and skinned so that we could eyeball the defamation and general shapes. So I moved over to creating some of the new hair and beard styles as they aren’t effected by skinning. Trying to get a better spread of shape variety than the ones we currently have in game. The textures aren’t final as we are planning to bake a bunch of these down onto one texture atlas.

HeadStyles

We plan to have modifiable weapons, with a variety of attachments. So to test this we will use a pretty stock standard MP5 and give it a couple of scopes, stocks, silencer, and clip sizes. If this all works they way we want it to, we will go about adding a bunch more, both stock weapons and ones with more of a Hurtworld feel 😉

MP5

Cow_Trix

I’m in modding-town this week. You may have seen a new item appear on the Workshop in the past few days. It’s my little test mod for the upcoming expansion of the SDK! The Shigi Statue. Not a high-quality mod by any means, as that model is some real programmer art, but it does look pretty neat in a base!

workshop

All the ground-work is laid, and architecture built as far as I can tell. Probably still some kinks to iron out, but at this point you can make a bunch of construction attachments in the SDK, export them out as a package, upload them to Steam, and then just by putting a line in your server’s autoexec, it’s in and working! You can only add items to the Construction Hammer at this point, although we’ll be able to do items soon when ItemV2 goes live.

So how will this all look to a mod maker who wants to create their own set of pieces? Well, I’ll be making some documentation to explain in detail how everything fits together. You won’t have to do any coding or anything like that, and for the most part I think you’ll be able to find an existing piece in the default set that is similar to what you’re making and just adjust the configuration slightly. You’ll be able to use your own models, textures, and materials all native to Unity, or use our existing assets (which will make your mod super duper small and quick to download!). A server can also choose to not load the default construction pack if they want! So you’ll be able to do mods that completely replace the default set!

And how will it look to players? Well, you’ll just join a server as usual, and it will download whatever mods it needs. And you should be good to go! Workshop handles all downloading and updating. Good on ya, Valve.

There’s currently a few limitations that I want to try and get rid of before we go live, like the ability to define your own construction attachment point types in a mod. But we’re most of the way there. As always – I can’t wait to see what the community does with these tools. And I can’t wait to extend them even further!

shigiStatue

Spencer

Some good progress on ItemV2 this week. I’ve been punching on with the Unity animator system to allow me to drive our equipment animations explicitly while still letting Unity’s Mechanim drive things like walking jumping etc.

There are some cool APIs called Playables that are almost usable, but do to the fact that additive blending (layering animations over eachother nicely) are missing we are restricted to a few nasty hacks. Specifically the hard part is doing smooth transitions between equipment animations while explicitly setting the position in an animation we are each frame. The reason we need to drive the animation position each frame is to give us the ability to do things like attach a magazine mod to a weapon that gives 20% faster reloading. Trying to propagate that the speed of the reload animation needs to be increased, and by how much to ensure it doesn’t get out of sync with our simulation state machine is very tricky. What we do instead, is tell the animator each frame:

Set animation player to “Assault Rifle Reload”
Set animation position to 30% of the animation
Render Frame
Set animation player to “Assault Rifle Reload”
Set animation position to 31% of the animation
Render Frame

This works like a dream, and allows the state machine to drive the animations without double handling and leaving places for the animations to get out of sync. The problem comes in when we try to cancel the reload. We want to smoothly interpolate back to the idle position or to another animation. There is a Crossfade method we can call, however as soon as we tell the animator next frame where we want it to be, it trashes the Crossfade snapping to the new animation which looks like balls.

To workaround this, we were forced to drive the speed of state on the Equip layer by a generated parameter, and only explicitly tell the Animator where to be when it isn’t where we want it. If everything is working correctly, we set the speed of an animation before playing it, and call Crossfade whenever we want a change and allow it to play out. If we detect it has drifted from our own State Machine simulation, we force it back into place and let it keep going solo.

This is working like a dream now. What this means for us, is that we no longer need to think about how equipment animates. We build our equip state machine that controls the logic and don’t need to double handle anything. We can also now modify on the fly, any duration or speed property of any state in our simulation by parameters like Attack Speed, Reload Speed, Fire Rate, Draw Speed, Bad Melee hit recovery etc without worrying that synchronizing our animator is going to be a nightmare. As these properties are liquid, we will be generating random bonus values when procedurally generating items, rarely will you see 2 items that are created equal!

Once again, all these systems are completely modifiable as Equip is mostly state machine configuration which writes out to JSON.

Here is a complete state machine for the melee weapons in action in all its client side predicted, perfectly deterministic, arbitrary configuration driven glory:

Mils

‘Keep your City Beautiful’ Is not my motto.

I’ve been throwing garbage all over the place, trashing the city. I made some sets of boards that litter the streets, these help break up the road texture. I’m using geometry currently, which may change to a decal system in future, where texture is applied to create a similar effect.

When building the city I use a system of making geometry then fitting the geo into a part of the texture sheet that looks good. This means we save on texture memory and load times. The only downside is that we don’t make as many unique textured objects. The upside is we don’t end up like GTA V and have a billion year load screen and better performance. This is important, because we have a lot of players running some lower end machines.

StreetLevelDecor_0006_Layer 2 StreetLevelDecor_0007_Layer 1

I have added some fenced off areas with sea containers to reflect perhaps a quarantine/walking dead/martial law type vibe. This will give players some cover when moving up or across streets and helps fill the streets and break up the playspace.

StreetLevelDecor_0000_Layer 8

I’ve changed the bottom floors to a two storey internal lobby situation. The shopfronts have changed to reflect that also. I will probably make a couple more general shopfronts to mix this up a bit.

StreetLevelDecor_0001_Layer 7 StreetLevelDecor_0002_Layer 6 StreetLevelDecor_0003_Layer 5

StreetLevelDecor_0004_Layer 4

 

Tom

This week I’ve been diving deeper into our equipment system working on integrating baking into our code base. With Spencer’s help we’ve been working on a new skinned mesh data format that will give us both a nice format for sharing custom gear through asset bundles (that can then be shared through Steam workshop) as well as allowing us to spread out the baking process over several frames to eliminate any frame rate spikes.

The plan is to distribute our base character model with the SDK allowing anyone to create their own equipment and then skin it to our characters skeleton so it will deform properly under animation. Once this step is completed there will be an importing step as part of Shigi Tools that will convert the mesh into our new format as well as run all the preprocessing we can to speed up the bake.

Generally when meshes are created they only store references to the bones that deform them (i.e. a character’s shoes don’t need to know anything about the arm bones).
Whilst this is efficient memory wise it creates a problem when baking as the final mesh needs to know about the entire skeleton, which requires joining the bone lists together and then updating the bone weight references to ensure they still point to the correct bone in the new list.

Another potential problem is when 2 equipment pieces are created and share the same bone (ie. the hats and the masks share the head and neck bones) but don’t share the same space (i.e. The hat might have its origin at the neck and a mask might have its origin at the nose). When this occurs you get conflicting data about the bind-pose for the bone (and this is what was releasing the kraken last week). The bind-pose represents the position of the bone in the skeleton when the mesh was skinned to it (relative to the meshes local space) and is used to transform the mesh into the proper position under animation. In the shot below you can see that the head model and the hair model have a different origin and orientation, you can also see the bind-pose for the neck bone according to both meshes, because bones to bindposes have a 1:1 relation per mesh we need to make these the same values. To solve this we have to transform all the meshes into a shared space (the characters root usually makes the most sense).
Luckily all this processing doesn’t have to be done at real-time if we push it into an import step when creating the asset.

SkinningProblems

It’s still going to be a little while until this stuff shows up in game as it’s being integrated into the larger overhaul of the item system that Spencer has been working on.
We’ve still got testing and things to work out with the best way to handle customization and random variations but we are really excited to see what you guys will come up with.

 

Hurtworld Update #33

Mils

So this week we tested out culling methods for all the trash and objects that we will be adding to the street level. We had planned on using groups of objects placed and repeated around the city at first. The idea is that Unity will batch objects that are the same and therefore use less resources.

In the image below the yellow blobs indicate object groups that would be visible to the player within a specified radius.

ObjectCull02

After doing some further testing it turns out that placing objects individually then using a grid culling system is actually more efficient. This version (which I’m very glad won out) allows me greater control with placing objects. I can get more unique scenarios if I am not restricted to predefined object groupings.

In the second image below the shaded in yellow grid spaces show all objects within that grid space that would be visible to the player. This version is the more efficient.

ObjectCull01

And some images of a few more items that I managed to create after going through the object cull testing.

SLD02 SLD03 SLD01

Tom

Hi everyone, I’m Tom, the new developer at Bankroll. My first week has been mostly been getting setup and trying to get up to speed with the codebase.
I’ve been working with Mils on our environment workflow, creating tools to bake mesh objects together intelligently saving on both memory and draw calls. We can also bake groups of objects into clusters given just a custom cluster size, this provides a nice workflow to setup LOD and culling groups. So far we’ve seen good results from baking lots of detail objects as well as larger modular building pieces. Once these tools mature a bit internally you should see them pop up in the MapSDK for everyone to use.
I’ve also been prototyping baking skinned (animated) meshes together at runtime to speed up our equipment system as well as being able to load and re-target imported meshes to our skeleton at runtime. At the moment I’ve got bugs that look like the kraken has been released (see below) but hopefully this will eventually serve as the beginnings of a system to allow you to share custom equipment through the Steam Workshop.

Cow_Trix

This week I’ve been working on a couple more optimizations, fixes for exploits and bugfixes. Large servers should load a bit quicker, and the issue of players getting disconnected for high ping when joining a large server should now be resolved. We also plugged up another exploit that could be used to create rock bases, which are a really sucky thing as they do give a player or group pretty much raid immunity. We should be pushing out a patch, 0.3.5.3 within the next 24 hours, depending on how testing goes. This patch will contain lots of little fixes, some mentioned above, as well as double loot crate spawn speed in Diemensland, which should make towns a bit more viable for farming runs.  Multiple terrains should now also be supported, which some community maps have been limited by up to now.

mods

I’ve also started on creating an architecture for mods and extensions to Hurtworld. I’ve talked about this before, with extending the construction system to allow for community made construction pieces. Players will be able to make furniture, new walls, new material types, new attachments, new decorations, you name it! We’re pretty excited for this. What’s required first though is a system to manage the mods. Luckily, Steam Workshop and Unity do a lot of the heavy lifting for us, and will make this architecture (hopefully) much more painless than it would be otherwise.

When you connect to a server, the server will share a list of dependencies, a list of mods that it needs to download from the Steam Workshop. This is done right now with community maps. Then, your game will download all the required mods (or just find them if they are already downloaded and up to date), load them into the game, and you’ll be good to go! While this sounds simple, it does require a bit of a rework as to when things are loaded and unloaded into memory. Currently, construction attachments are initialised and cached when the game starts. We’ll need to move this initialisation step into when you join a level, and make sure we’re properly unloading the assets when you disconnect. Otherwise, joining servers with different mods enabled consecutively is going to result in some pretty broken and weird behaviours!

We’ll be putting all these tools into the SDK (do we need to get rid of the “map” bit now and just call it the Hurtworld SDK?). Just as we did with the maps, we’ll give out all the current construction attachments in the SDK as well, so you can pull them apart and see how their made before you make your own. I’m really pumped to see what the community does with these tools!

Gavku

More character stuff for me this week 😉 I foresee I will be doing character work for a while as we have quite a few ideas that we wish to implement and test. Before jumping straight into creating the new gear, modelling the high poly, retopologizing, baking out maps etc, I have been knocking up rough approximations of some of the forms we may wish to use. This gives us a way to eyeball shapes and silhouettes and figure out if they are a direction that we wish to head, and hopefully raise any issues we might stumble upon down the road and lower the amount of reworking of assets.

Troublesome areas tend to be where sets of things intersect ie: the waist or neck are. I generally need to make sure that pieces play nice with each other and hopefully avoid any traits that we dont find appealing like soggy hips that can make it almost look as if the character is wearing a nappy.

BlockFront

BlockBack

Here are a few more character concepts showing mechanical/engineering type gear and some random facial pieces.

Welder

There is also a sheet showing a sort of early game light armoured ranger type set and a more heavily armoured set.

GearRangers1

Spencer

Most of this week has been working away on the Item system. As I am deep in code land, there isn’t much high level stuff that would interest non technical people. Instead I will go into a bit of detail about the internal workings of the Item restructure. Beware: Here be dragons.

The existing item system used a hierarchy structure, where a base object defines behavior that all is descendants require. For example a weapon item needs a list of effects, a mesh attachment to the player, some simulation logic for equipping etc. Then each more specific version of weapons like Automatic Gun or Hatchet require less boilerplate code to implement.

This works to a point, but as most systems in games, the hierarchy gets so large that items end up with an array of functionality that they don’t actually require because some ancestors required it (kinda like humans with an appendix).

As in the near future we will be proceduraly generating items with vastly varying properties, visuals and behaviors, duplicating all of the data stored for a typical item would result in you running out of ram very quickly. Some servers get up to 50,000 item instances (1 stack = 1 item instance) after a couple of months of playtime. Currently as our items are static, these item instances simply refer to one of a few hundred item definitions that don’t change. Once we start pumping out completely new items and runtime, the item memory footprint will become exceedingly large. This leaves us with 3 simultaneous challenges:

  • 1. Support generating similar items without having to redefine common behavior (in both code and memory)
  • 2. Be simple enough to configure that we can move the definition to the mod sdk
  • 3. Support all future types of items we can imagine
  • 4. Not have any negative performance impact

To solve this I have been working on breaking the Item system from a hierarchy of inheritance to a composition model (similar to the structure of Unity itself).

In this model, the item object doesn’t have much information on it at all, instead it becomes a collection of simpler building blocks with limited knowledge of each other. This was very difficult before as the driving force behind equipment simulation was blocks of monolythic code that needed to be synchronized over the network. Since the restructure to let a configurable state machine drive the simulation and simply fire off events for more complex happenings, there need not be a central piece of code for the simulation of each item.

An example of building blocks to make up an item:
Static Mesh Attachment (Configured with a reference to the pickaxe model / material)
Item transitions (Turn to ash when temperature gets too high)
Effect builder (Configured with 15 player damage, and 15 mine damage)
Simple tooltip builder (Configured with name/description/reference to effect component)
Mine impact event handler (to receive events from the state machine when a mine raycast should be executed)

All of these components can be re-used across many different items and more can be added to produce any functionality that can be easily re-used, the configuration of which will be done inside the unity editor with a custom inspector I will create over the next few weeks. This should make things like new guns, player gear and other items trivial to create inside the SDK.

I have also been working on a concept to extend the vehicle skinning system to enable coloring of player gear pieces. We now have a technical proof for the system which will allow a schematic item dropped from a creature to have randomly generated colors on parts of it, and also allow dying your pieces to recolor them. I will probably handball this to Tom in a couple of weeks.

If you are wondering why I am spending so much time on rebuilding the Item system when I am working on Infamy, this is a required building block for the changes we intend to make. Significant changes needed to be made to items, so while here is probably the best time I will get to improve the foundations in all areas needed to support future plans. This makes changes take longer in the short term, but will start paying dividends in a couple of months.
 

Hurtworld Update #32

Spencer

Lots on this week as I push on with ItemV2, new patch is now live which should really shake up raiding with increased explosive drop rates, construction resistances and starter huts.

Studio Upgrades

I’ve also spent a bit of time this week upgrading the work environment for the team. We have expanded into a larger space, re-organized the office (needed some room for a vive :P) and most importantly opened up space for new people! For a few months we’ve been on the hunt for kick ass programmers to expand the team and help us push out updates more quickly. There is a massive amount of stuff we want to do with Hurtworld, and our bottleneck is always on the code implementation side. I have pretty high standards when it comes to programmers, there was a danger of growing the team too quickly after release that we would lose the quality standard we are aiming for. Today I am happy to announce he who will be known as “Tom” has joined our ranks. We are still on the lookout for more top programming talent in, or willing to move to Melbourne. If you have shipped real games, have Unity experience, writing code is your passion, and can work from our office we want to hear from you.

ItemV2 Progress

I now have item state machines running on a deterministic client side predicted model with no corrections (yay!). I’ve taken the extra step here to build some infrastructure around loading the state machine data from JSON config files which will be streamed from the server allowing full modablility. Here is a sample of the melee weapon logic:

weaponstructure

Not the easiest thing to edit by hand, I should have a UI tool to add to shigitools for the map sdk soon.

Gavku

This week I have mainly been working on coming up with some new character gear. Hopefully with a larger variety of gear we can start to move away from players pretty much running around looking like Ronald McDonlad with red winter jackets and yellow rad pants. 😉

These are a few examples of more of a scavenger type of armour, bit pieced together, and one with a nod to an aussie icon.

GearBlog1

These ones have a bit more of a modern feel. With tactical vest and pants.

GearBlog3

A few more examples of different types of vest and armour, these ones feel a little bit more in line with our aesthetic. Also a take on a more heavy duty hazmat suit.

GearBlog2

Lastly a take on a more heavy armoured set up, and some lighter bone armour.

GearBlog4

Also I have been testing the build to make sure that the new update runs smoothly. As can been seen below 😛

Cow_Trix

Lotta work this week getting the new patch out. There’s been quite a few optimizations, especially with the construction system, that should improve things across the board.

There’s nothing like the wild for stress testing new systems. Since the construction system came out, you guys have been pushing it to its limits. This has shown where it’s good, and where it could use improvement. I’ve done a couple of significant optimizations with how the construction system stores and transfers data over the network.

One of the biggest bottlenecks was a bandwidth issue where, on massive savegames, players would take a substantial amount of time to connect and sometimes fail to connect entirely. When connecting, the server sends a stream of information to you about the structures in the world. This includes what attachment it is, it’s position, and rotation. What attachment something is is represented by the Attachment Identifier, which is basically made up of a Category, Subcategory, Size and Material. Previously we sent this whole chunk of information, which was actually of undefined network size as Category and Subcategory were strings, but was at minimum 32 bytes. Now, we precalculate an index of the attachment, which we can store in a ushort at a much smaller 2 bytes.

We also saw that the construction system was taking up a lot of RAM. Using the SEA Infini Wipe server save, as that server has been really struggling with the RAM load, I tried to track down where we were spending this RAM and where we could be saving it. There’s something very cool about loading up saves and seeing people’s bases – we get to walk around and see what people have been making. I found that we were allocating a majority of memory in registering attachment points. The issue turned out to be how we were representing overlapping attachment points of different rotations. When you look at a point and right click, and an attachment rotates, you’re actually cycling through multiple attachment points which are rotated in different directions. It turns out we were accounting for every rotation, and not just the six which are possible. So this was an enormous saving for memory usage. We saved about 60% of memory allocation associated with the construction system with this optimization.

Mils

Before making more decoration for the cities I was also tasked with getting the new version of Easy Roads (V3 beta) to work so that we can create better roads. Since the plugin is in beta it took a bit of time to find a workflow that will allow us to create the improved road networks we want leading out of the city into the suburbs and industrial areas.

I’m adding more street level decor to the City at the moment. Adding some parks to the city, using some one-off feature objects to create a memorable gamespace. The dried up water feature/fountain, circular low wall and some stands of trees help create this park space.

StreetLevelDecor_0005_Layer 1StreetLevelDecor_0000_Layer 6 StreetLevelDecor_0001_Layer 5

Adding low walls and electrical boxes to the sidewalks is helping add to the clutter that I think we need to make a convincing street level scene.

StreetLevelDecor_0002_Layer 4 StreetLevelDecor_0003_Layer 3 StreetLevelDecor_0004_Layer 2

These street level assets are great but we need to do some optimising to keep the frame rates up. This week I will be grouping small clusters of assets together and duplicating them throughout the map. We need to do this because of a bunch of inefficiencies that come in to play with large numbers of game objects and lod groups. By clustering meshes together we can cull big chunks at a time. We could cluster our entire city together, however this would bloat our mapsize and therefore ram usage and load times.

Dev Blog