Last year, at least going by kickstarter update, Nathan Fabian was at least one of them:Who's responsible for how characters move in this game anyway? It looks p. awkward.
May 20 2015
On Moving Floors
Nathan Fabian here. At my day job I make pretty pictures out of billions of finite elements for one of the Department of Energy labs. At night I dabble in game development, including some consulting through my company, Longshot Studios. I was a backer of Torment and have been working with the team part time for almost a year. Currently, I'm working mostly on our animation system, but I wanted to talk a bit about a recent Torment challenge I worked on. It gets a bit technical, but the final result is pretty cool.
Imagine you are handed a pylon. It is a very ordinary sort of pylon. In fact it’s only a computer model—a few tens of polygons, quite unremarkable for a pylon. But your mission isn’t just to hold this, it is to take it forth and multiply! 100 by 100 pylons to create a dynamic floor where each individual piece can move up and down independently, changing the shape of the floor on the fly. This single pylon must become a mega structure of 10,000.
“No problem,” you say, “I have the power. I have code!” You execute a loop, create 10,000 pillars, and your graphics card (GPU) catches on fire (not literally). This was not the incantation we were looking for.
Modern graphics cards are extraordinarily powerful and can render hundreds of millions of triangles per second. For someone who grew up reading Michael Abrash books and articles, it feels indistinguishable from magic. Back then, we were happy to get resolutions of 320x240 because “Look! Square pixels!”
Where did our incantation go wrong? Why was the devil box not appeased?
Draw calls.
Draw calls are a phrase used to describe whenever the CPU asks the GPU to do anything. For both chips, talking on the motherboard’s bus is like shouting across a noisy room; it takes a bit of back and forth to get the message across and it slows things down. The less frequently we do that the better. What we asked for originally was 10,000 draw calls. That’s about 9,999 too many when what we want to render is just one structure. So we need to find a better method to leverage.
Fortunately, there’s a method known as “Instancing,” which solves the problem. Unfortunately, we can’t use it out of the box and still run systems that only support Shader Model 3 (older Windows, OSX and Linux). Fortunately, Unity – our engine – has a batching system, both static and dynamic, which is useful for this purpose. It takes small polygon objects and constructs them into one larger many-polygon object that represents the whole. Unfortunately, it doesn’t work very well in this particular case.
More importantly, it’d be bad code to rely on it. Just as writing teachers instruct, “Write what you know,” a programmer should write what she knows into the code and only use algorithms to figure out what she doesn’t know at runtime. In this case, we know what we want: it’s a floor with 100 by 100 pylons. By grouping these pylons up, they will require far fewer draw calls. Since Unity limits meshes to 64000 vertices, rather than grouping the entire cluster into a single mesh, we’ll separate them into half a dozen smaller sections.
Now we are set… almost.
Our floor doesn’t currently move up and down. We could redo this batching process every time one of the pylons moves, but this will be slow if we want to animate the pylons every frame.
Quick check in with VFX: “Do we want to anim—“ “Yes.” “Okay then.”
It turns out that without stepping outside of Shader Model 3, we are able to use a shader to shift vertices around. We just need a little help from a texture. The pixel color values within the red channel will define our height (in a range from 0 to 255, where 0 is the lowest position, black, and 255 is the highest position, bright red), which represents any distribution range of height with a discretization of 256 steps. In the vertex program of the shader it looks like this:
float4 lkup = float4((v.texcoord1.xy + _DisplacementOffset.xy) * _DisplacementScale.xy, 0.0f, 0.0f);
float4 dispV = tex2Dlod (_DisplacementTex, lkup);
float dis = (dispV.x + dispV.y/256 + dispV.z/65536) * _VerticalScale + _VerticalOffset;
By using additional color channels beyond just the red channel and pre-multiplying the displacement on the CPU (and then dividing by that factor on the GPU as shown here), we can achieve additional precision beyond the 256 discretization levels, up to 256^3 in this case by using the red, green and blue channels. Technically we can get 256^4 values by using the alpha channel, but we likely don’t need that many; we can reserve that last channel for additional information, if needed in the future.
In order to animate the floor, we just need to change out the texture or individually manipulate the pixel color values of the texture. While this is an additional draw call, it is only one more, which is not nearly as bad as the 10,000 we started with.
Now we are set… almost.
We need to fit this shader’s lighting into the rest of the awesome lighting pipeline. While not complicated, it does require duplication of the lighting code into this new shader, so that the pylons can be properly positioned in the vertex portion before the lighting calculations take place.
With all this in place we get a dynamically moving floor, rendered at interactive rates, that looks like this:
[src]
Aug 13 2015
One more thing I'd like to talk about is user interface. As conversations are the core of TTON’s gameplay, the first interface we developed (around a year ago) was the Conversation UI, as seen in the First Glimpse video. We began creating our interfaces using a popular and powerful interface plug-in known as NGUI. Leading up to Unity 5 (late last year), Unity released an improved native user interface layer, UGUI. We assessed it at that time and determined that UGUI would solve several technical obstacles we had encountered, so we decided to switch over. Currently most of our interfaces use UGUI, but our Conversation UI remained with NGUI, while our engineers focused on support for Crises, animation, and various other features required by the team. (In fact, at least the first Alpha Systems Test will be released with this NGUI version of the Conversation UI, but we have plans for an even better one.)
As we gear up for a Beta release in the future, we’ve now undertaken the work of rebuilding the Conversation UI in UGUI. This includes adding in various enhancements we’ve identified over the last year. This work is notable because it is a shift from engineers focusing on functionality required by the team to focusing directly on the player experience. We now have two of our five full-time programmers concentrating on UI development. We’re prioritizing revising the Conversation UI over work on the front-ends of other interfaces (such as inventory and level advancement) because we want to first ensure high quality of our core gameplay. This will allow us to, for example, better integrate Effort use into conversations.
Our second UI priority is Crisis UI. As Crises are one of the more experimental aspects of TTON, we believe it will be especially important for their UI to be well-polished, intuitive, and smooth to use. We’re currently completing a major iteration pass on the Crisis UI. The previous version provided the functionality that Crisis designers needed to test and iterate on their content, but was too user-unfriendly for others. After this round of revisions is complete, the team will be better able to assess and give feedback on the Crises. There will be some additional minor iteration on the new version and then it will be ready to include in an Alpha Systems Test.
[src]
rendered at interactive rates
rendered at interactive rates
Not according to the beta testers.
Good thing I've got 24GB, I might be able to have Firefox open besides too so I can shitpost about it as I'm playing.
TBH I think the negative reaction to Lando makes a buncha people here look kinda pathetic.
Early Access on Steam for $45. The lowest Kickstarter beta tier was $75.
People gonna be piiiiiiiiiissed.
Early Access on Steam for $45. The lowest Kickstarter beta tier was $75.
People gonna be piiiiiiiiiissed.
Actually I'm pretty sure the lowest was 55 $(or maybe even lower than that). I paid that, as a backer. And I have beta and deluxe everything.
it's out on steam?
where the fuck is my key???
You receive beta test access (which is the same as Early Access on Steam) if your pledge tier came with beta test access included among its rewards, or as an add-on. You can find more details on your Torment Account -> Rewards page on the site, there is a widget there which tells you if your reward level comes with beta access or if you'd want to go for an add-on. It is also possible to remove most rewards at this point and swap around for the base game + beta add-on if you want to join the beta but would prefer not to pledge extra for it.
https://forums.inxile-entertainment.com/viewtopic.php?f=32&p=168502#p168502
wowit's out on steam?
where the fuck is my key???
You receive beta test access (which is the same as Early Access on Steam) if your pledge tier came with beta test access included among its rewards, or as an add-on. You can find more details on your Torment Account -> Rewards page on the site, there is a widget there which tells you if your reward level comes with beta access or if you'd want to go for an add-on. It is also possible to remove most rewards at this point and swap around for the base game + beta add-on if you want to join the beta but would prefer not to pledge extra for it.
https://forums.inxile-entertainment.com/viewtopic.php?f=32&p=168502#p168502
Even if you pledged less than that, you can get the beta for "2000 points". What's weird is that the steam page only says the name of the game, it's not a beta thing like the alpha was.Early Access on Steam for $45. The lowest Kickstarter beta tier was $75.
People gonna be piiiiiiiiiissed.
It is also possible to remove most rewards at this point and swap around for the base game + beta add-on if you want to join the beta but would prefer not to pledge extra for it.
Even if you pledged less than that, you can get the beta for "2000 points". What's weird is that the steam page only says the name of the game, it's not a beta thing like the alpha was.Early Access on Steam for $45. The lowest Kickstarter beta tier was $75.
People gonna be piiiiiiiiiissed.
It's very poorly explained. Basically you get the beta key automatically if you got one of the tiers with the beta, as I did. That beta is also the final copy, apparently. If your pledge included the final copy, you can use 2000 points ($20, I guess?) to get the copy you've already paid, but sooner.
That's the thing, you don't have to. I got the beta without spending more points.Even if you pledged less than that, you can get the beta for "2000 points". What's weird is that the steam page only says the name of the game, it's not a beta thing like the alpha was.Early Access on Steam for $45. The lowest Kickstarter beta tier was $75.
People gonna be piiiiiiiiiissed.
It's very poorly explained. Basically you get the beta key automatically if you got one of the tiers with the beta, as I did. That beta is also the final copy, apparently. If your pledge included the final copy, you can use 2000 points ($20, I guess?) to get the copy you've already paid, but sooner.
The point system is silly as shit, but not actually all that confusing. Several reward tiers have beta access included. If you pledged enough for a reward tier with beta access, spend your points on that tier and you have the beta. $1=100pts.