Mils
I finished another barrel guard this week, it’s quite a techy looking little number. It was a bit more difficult to get the normal maps on it right, but I got there in the end. I was going to push forward on the rest of the 2nd set of components but due to the need for LOD’s (Level of Detail) meshes I switched over to that. Tom is updating the Static Mesh Baker again, to be more efficient and more artist friendly (thanks Tom) We need LOD’s for that and possibly the inventory system, so I am smashing through them early this week. The Static Mesh Baking tools will be not only appreciated by me, but by anyone wishing to Mod Hurtworld. They have come so far in a short space of time, making it soooooo much easier to create static meshes for the game. Static Meshes are used a lot, and the improved tool set is a big time saver and brain melt saver also.
The top LOD will be what the First Person sees, the second one down will be used for situations like inventory, world items, medium distance versions of the guns equipped to the player and any other situation where the highest LOD just wouldn’t be the focal point. The bottom version would be for when the object is fairly distant, for example 50 metres away and further. These only need to convey the silhouette and colour of the object.
Cow_Trix
Hey folks, this week I’ve been bug-fixing and stress testing the new item visualisation stuff. I improved caching a lot, and added support for complex items like guns built from multiple sub-components, vehicle parts, machines, and more. Realtime icons now support custom colors, and the way I ended up caching them means that cool things happen like if two different guns have the same components and colors, the icon rendering system will have them share a texture and world-item data. I cleaned up responsibilities and structure a bit so now items don’t actually know anything about the concepts of icons and world-items, that’s all completely component based now.
I also stress tested the world item generation and I’m pretty happy with where that’s at. The biggest bottlenecks are now in the mesh baking system, which Tom is in the process of moving to a different thread. When that is done, even spawning hundreds of world items in a single frame shouldn’t cause that much of a stutter. I had to change how items are synchronised between the server and client, as we didn’t have a concept before of non-equipped items that needed to be synced to all local players – important so when a player drops an item that none of the other players around them know about, the server knows to tell the surrounding players everything they need to know to render it. You can see some screenshots below of me spamming spawns and ending up with a landscape littered with various objects – and it all performed pretty well!
Next up is figuring out some changes to the inventory and hotbar, that we’ve briefly discussed in past dev blogs. We’re going to take a look at multi-slot items, which will mean that there’s plenty of room to render pretty icons, as well as changing up the hotbar to maybe be more of a shortcuts bar than an actual storage space.
Tom
This week I’ve been working on improving the new spawning system as well as our mesh combining / baking tools.
The spawn window has been redesigned as more of a game over screen for the survival game mode. After dying and watching your ragdoll fall down the game over screen will show, displaying your cause of death as well as the options available to you. The cool thing about these options is that some or all of them can be set dynamically on the server with the option to set a time the option becomes available (to implement things like spawn cooldowns). Just for testing I changed up our spawn behaviour so spawn options were given to spawn at any authorized stake (very unlikely that this will ever make it to live though as it incentivises suicide for travelling and also helps players not be in the world therefore avoiding fights) but ultimately it’s up to the type of game mode to implement its potential options and because it’s defined from the server, oxide mods will be able to add their own options in.
I’ve been giving our whole mesh tools pipeline a bit of an overhaul. The mesh attachment class that holds all the mesh data (things like vertices, normals, uvs, triangles, bone weights, etc.) no longer needs to be managed by the content author, instead they manage a configuration asset that references all the data needed to create mesh attachments. The mesh attachments themselves won’t get built until building the mod (in ItemV2 ALL our content is implemented through default mods) or they can be built just in time if they are required by the editor (ie. for previewing the item). This gives us a few benefits, the workflow is much simpler for one, once the configuration file is setup the artist can make changes to the source file in their tool of choice and have the item automatically update in game after rebuilding the mod. Another advantage is that we store all the material variables without assigning a material (although a material override can be specified if not using our generic custom color shader) allowing us to defer material creation and assignment until later. This will let us do things like atlas a few items together so they share the same material (saving on draw calls).
I’ve also been working on making the mesh combiner / baker do most of its work on a separate thread. This gives us a huge performance gain as Unity no longer has to wait for a bake operation to complete before it can move on and render a frame. Now the main thread queues up the bake jobs while the worker thread takes jobs out of the queue, combines the group of mesh attachments then runs a callback on the main thread again to push the combined data into Unity’s mesh class (this is done because Unity’s API is not threadsafe, anything that inherits from UnityEngine.Object can only be touched in the main thread).
I’ve got a basic version of this working now but I need to extend it to handle some of our special use cases (like assigning new custom UVs for color lookup in the event the assigned texture space is taken by another item) so I’ll be doing that through the coming week as well as extending the vehicle LOD system so it affects all combined meshes.
TEHSPLATT
Hey people, this week has been spent finishing off assets on the vest and getting it to a game ready state. I’ve had to spend a lot of time refining my workflow since my first day here which has slowed down my work output a bit but it’s definitely been for the better. I’ve been building my models/sculpts up from a much cleaner state than before which means very little to no time spent trying to massage out lumps and bumps that are going to show up on the normal map, this allows for a much more readable final model that Unity won’t have a problem with. As you can see in the vest below, the surfaces have very little in the ways of lumpy detail while still having enough information to suggest different types of materials, this can be a difficult balancing act to get used to. The texture used for this picture is a plastic/rubber test material just to see how nicely the high res sculpt baked down, as you can see by the wire frame to the right, the mesh has a pretty low triangle count (around 3700) but can still go a fair amount lower without losing the over all silhouette. The pouches can also be used on other vests and have their UV maps layed out in such a way they can be scaled up to take up a single texture sheet of their own or scaled down and fit nicely into other clothing UV maps without changing any actual UV islands. The process after this step will most likely be working out a good looking colour scheme (possibly changing the pouch arrangement) and getting it set up in Unity to test in game.
Spencer
Hey guys, this week I’ve been working more on filling our new systems with content. I made a pretty big breakthrough with connecting different semi detached systems together via a thing I call reference curves. The problem they are designed to solve is, as the depth and breadth of our progression grows, configuring simple things like item recipes, damage of weapons, armor resistances etc creates a level of configuration paralysis where there really isn’t a way to keep all the required information in my head at once to get something close to balanced in a reasonable time.
Example
An example is PVE weapon damage. As you progress through difficulty tiers on the map, the health pool of the creatures you will face increase along with their damage, and other properties. To keep things interesting, we increase most stats at an exponential rate.
The reason linear increases are shitty for RPG progressions, is this: At level 1 you start with a bow that does 1 damage, all good. Then you level up to 2 and get a new bow that does 2 damage! You can now kill the same creatures twice as fast with double the damage of your previous weapon, you are pleased. Fast forward to level 75, your bow does 75 damage. You level up to 76 and get a new bow… your bow does 76 damage 🙁 a whopping increase of just over 1.3% which will have almost zero impact on your ability to kill stuff.
Just a quick disclaimer on the word “Level”. It’s not a level in the classic sense of the word, we’re not introducing experience or anything like that, it just helps us compare things that we expect to be at a similar level of balance.
By using an exponential progression, our numbers increase faster as we get higher level keeping the feeling of the upgrade well into the levels. The tricky part about this is we have hundreds of pieces of configuration to create that all depend on this curve. When authoring a weapon for a specific part of the progression, we need to ensure that its stats match up around what everything else will be around that level. Eg: a weapon’s dps value needs to be in the same order of magnitude as the health pool of the thing you are attacking.
Reference Curves
The real questions I am asking myself while designing much of the content is things like:
“What damage should this bow do to kill a creature in 4 hits at its equivalent level”
“How much wood could a player around level blah farm in 20 mins”
“What sort of temperature would I expect to have to deal with at level blah”
Having to continually figure out exact values for these questions for specific parts of the progression was mega tedious. My solution was to in a way store the exact question above.
This is where ReferenceCurves come in, they are an asset object that can be defined in our project (or mod), that represents a value as it progresses through the levels. Then when designing content, instead of saying this bow does 10 damage, or designing a damage curve per level on the bow item, only to have to do it again on the next item, we can defer to the reference curve for the answer to common questions.
A concrete example is a reference curve that represents “Creature health per level”. When mapping the PVE damage of a bow, I can now say “get the value from this curve and multiply by 0.2” which will set the bow to kill a creature of equal level in 5 hits. Obviously this isn’t going to be exact as creatures have different health pools, this is fine as long as we are in the right ball park.
This then lets us tweak the base health curve of creatures per level and equipment that is dependent on it will update automatically. However this sounds pretty boring, if everything is perfectly balanced always it will feel like Oblivion.
We can go one step further and slightly decouple player to creature DPS and creature health pools by creating a player to creature DPS curve that references creature health and can be manipulated relative to the creature health.
Configuring a weapon now looks like this:
Then when creating the recipe for the blueprint for this item, I can instead of hard configuring “10 wood, 15 metal” etc, I can configure “0.2 x wood farm per hour”, “0.5 metal farm per hour”
We can now write new content without thinking about stats or value ranges at all. If there is something we don’t know yet, we can create a curve for it, refer to it and figure out the formula for it later. This creates infinitely faster generation of content. These curves will also not only be referable from mods so you can slip content into our pre-existing progression with ease, you can also override any reference curve formula to tweak the balance of your server. Want creatures to do more damage? Change one curve. Think the crafting cost of blueprints is too high for wood? Change the “Expected wood farm per hour” curve. The most important thing here is that this allows us to not lock in a heap of work into a specific set of numbers. By deferring the balancing to very simple config files, we can easily tune our progressions in the likely case that what we initially come up with is shit.