hooglagents.blogg.se

Instruments of destruction unedited
Instruments of destruction unedited







instruments of destruction unedited

It is much faster rendering using this instead of letting Unity sort out thousands of meshes/objects. Some parts of the game still render normally (ground, vehicle, trees/tires/etc), but the majority of things are custom-rendered now.īlocks/structures, debris, block-decals, and rebar all render using Graphics.DrawMeshInstancedIndirect. GPUs like it when you send them a large chunk of data and tell them to render it all at once, so I do that with everything that I can (that means creating compute buffers with the right data in them). Let's start with one of the most important items:Ī critical optimization for everything in this list: I use Graphics.DrawXXX calls (with compute buffers) instead of letting Unity draw things with MeshRenderers.

instruments of destruction unedited

Using compute shaders is difficult, because it's easy to break them and hard to tell what is broken. It's a lot, so I'm just going to make a list, and I will say: Getting this stuff below to all run relatively fast is not easy. So now we come to everything that's been layered on top in the last 4 months. There are some more minor details about how collisions are handled/etc, but that's the core system right there, and it hasn't changed since October. 95% of the time this eventually leads to a collapse if it appears weak, but once in a while enough other stuff breaks off to lighten the load and it stabilizes. If so, it applies damage to that layer, and a bit of random damage to the layers below/above it, and does the same check again in a moment. After a short while, it'll also check if any of the "layers" of blocks is looking especially weak (low HP vs. Getting back to the structures: After a block or blocks detach, structures will check if they should split into more structures. Particles are one thing that changed significantly, so I'll come back to them, since all the old particles from before are gone. There are also particles that spawn when a block detaches/breaks/etc. There's an option to enable these debris collisions, but it slows down the game quite a bit with lots of destruction going on. Note that debris collides with the player/structures/ground, but *not* blocks (or other debris). If it's small enough and loses all it's HP, it breaks into debris pieces that have physics but no HP, and that go away after a certain amount of time, or when we max out on debris. Once a block detaches, it gets some of its HP back, and can then break into smaller blocks (like Asteroids) based on its size. When a block takes enough damage, it detaches from the structure. The structure also has a list of "links", which means which blocks touch each other and the ground. No island has more than 2,300 to start, because you generate more of them from destruction before the number starts to drop over time.Įach block tracks its own hitpoints, which is based on the material (5 materials) and size. Currently, there is a maximum of 2,500 blocks at any time.

instruments of destruction unedited

Structures are made up of anywhere from 10 to 500 blocks. In game code, these are called blocks, so I'll keep referring to them as blocks here. The box sizes are pretty limited in the values they use for thickness/size/etc, but that's just for visual (and physics) consistency. This is pretty obvious, but I just wanted to state that it's not voxels. Here's a decent trailer to see the destruction in action from that version of it if you want to see (you can just watch the first 10 seconds or so): įirst let's start with what IS in that trailer, then I'll go over what has been added since then to make it better: (newest trailer here for comparison: )Īt the core, every structure in the game is made out of a bunch of boxes. The physics/destruction aspect of the game has changed a little bit since last showing the demo in October, but it's pretty much the same game everyone saw back in April of last year. The primary thing that makes the destruction in Instruments look good is having LOTS of things going on and interacting.









Instruments of destruction unedited