Putting the 'role' back in role-playing games since 2002.
Donate to Codex
Good Old Games
  • Welcome to rpgcodex.net, a site dedicated to discussing computer based role-playing games in a free and open fashion. We're less strict than other forums, but please refer to the rules.

    "This message is awaiting moderator approval": All new users must pass through our moderation queue before they will be able to post normally. Until your account has "passed" your posts will only be visible to yourself (and moderators) until they are approved. Give us a week to get around to approving / deleting / ignoring your mundane opinion on crap before hassling us about it. Once you have passed the moderation period (think of it as a test), you will be able to post normally, just like all the other retards.

Game News Bethesda: Making Games for the PC Gamers

circ

Arcane
Joined
Jun 4, 2009
Messages
11,470
Location
Great Pacific Garbage Patch
How to make a game like BioWare: take a shit on stage, mold it into the shape of a heart, and then get an audience to watch it.

How to make a game like Obsidian: take a shit on stage, step on it, and then get an audience to watch it.

How to make a game like Bethesda: take several dumps on stage and then get an audience to watch them.
 

Suchy

Arcane
Joined
Nov 16, 2007
Messages
6,032
Location
Potatoland
Gahahahahah so I checked the OP's link and bumped on this.
I admit, I use that for Arma2, which is actually helpful. But in this case it's LARP overload making your self dignity melt. Right the Codex alley.
 

gromit

Arcane
Joined
Jan 31, 2005
Messages
2,771
Location
Gentrification Station
villain of the story said:
It's amazing, really. They have shit programmers. Shit coders. Shit animators. Shit texture artists. Shit 3D artists. Shit writers. Shit game design. Literally, shit is oozing out of their entire catalogue. It's like a catalogue of sewage.

And yet, somehow, it just works when it all comes together.
Without irony, I think that's likely because of
257fxq1.jpg


I mostly mean the concept on display, but of course its advocate too. The precise word for the cause of nearly all of the "wrong things" in their games is disregard. Hand-waved lore changes, poor balance across classes, funky physics, the absence of alternate quest endings they must have been accidentally foreshadowing, leaving compile-time optimization off ostensibly because there's something rotten in your scripting...

There are few ways to explain that outside of "cared way more about something else that day, if at all."

What they clearly do regard is
257fxq1.jpg
. For all I know
Bethesda Softworks QA said:
Made Todd say "Wheee!" [Y/N]

Love it or hate it, it's obviously not not working. They'll probably have to clean up for the next go-round, though: they're running out of cherries to pop, and their heels are now an excellent target for the nippers.
 

Rhalle

Magister
Joined
Nov 25, 2008
Messages
2,192
Hilarious that if you could remove all the redundant code junk, you would see a 100% FPS increase-- and apparently even without more threading. Real multicore optimization could perhaps mean 2-3-400% increase.

That's some serious fucking Bethfail.

And you know what? I bet almost all ports are this bad, but Skyrim has sold enough copies to draw real attention to itself, and from the right people.
 

ZeniBot

Cipher
Joined
Nov 1, 2011
Messages
823
Location
Todd Howard's Sex Dungeon - Send Help
Thankyou Codex for reminding me that people still have some damn standards when it comes to modding.

Bethesda's community gives modders a bad name. There is a flood of sexual related mods here that I've never seen before happen in a mod community, sure there were nude mods for games, but these were usually shunned for looking terrible and detracting from the experience.. even to the extent of detracting from the character and their character development. As far as I am concerned, Bethesda's mod community is an insult to modding and its foundations. The few good modders out there are the champions of it, and frankly shouldn't be working on Bethesda's games for them, they should be out developing their own games.. because they clearly have better understanding of game development and design- I would gladly support them if they did this.

But soooo much crap that exists in the mod community, many of them in this present generation of modders just don't fucking get it. I can't believe that the TES community actually praises the sex mods. There is something seriously wrong there. When ever I saw a nude mod for Vampire the Masquerade Bloodlines most of the time people said "Why the fuck did you do this? the characters were already provocative enough, a bit of subtlety goes a long way".

For a game that is as popular and mainstream as skyrim, being hailed as the savors of the industry, it is disgusting the double standards that exist, allowing them to empower people to create the most morally depraved content I've ever seen in a game..

The mainstream RPG modder is a sick son of a bitch that is not fit for life. And the few good ones that do exist in my opinion should get the hell out of there ASAP. Its just not worth supporting these games. I would rather see those people go indie and make their own interpretations of Bethesda's games.

It is disgusting that their games win GOTY awards yet at the same time empower people to produce such filth. To me.. it is essentially the industry endorsing it.
 

Metro

Arcane
Beg Auditor
Joined
Aug 27, 2009
Messages
27,792
It's because the TES series attracts more E-Larpers than it actually does people who like RPGs. Their idea of an RPG is a game where you 'play a role' rather than elements like mutually exclusive character builds, choice and consequence, challenging and interesting quest content, etc. If they can E-Larp as a gay Khajit married to a burly Nord and live in a quaint bungalow by the frozen ice lake nothing else matters!
 

Kz3r0

Arcane
Joined
May 28, 2008
Messages
27,017
DarkUnderlord said:
What with all that money you'd have thought they could afford to hire people who actually knew what they were doing.

Hyuk.
They shipped ten millions of copies, why they should waste money on making a proper game?
It's Capitalism 101.
 

thesheeep

Arcane
Patron
Joined
Mar 16, 2007
Messages
9,956
Location
Tampere, Finland
Codex 2012 Strap Yourselves In Codex Year of the Donut Codex+ Now Streaming! Serpent in the Staglands Dead State Divinity: Original Sin Torment: Tides of Numenera Codex USB, 2014 Shadorwun: Hong Kong Divinity: Original Sin 2 BattleTech Bubbles In Memoria A Beautifully Desolate Campaign Pillars of Eternity 2: Deadfire Pathfinder: Kingmaker Steve gets a Kidney but I don't even get a tag. Pathfinder: Wrath I'm very into cock and ball torture I helped put crap in Monomyth
If they failed to get at least some code optimization right, I wonder how they managed to avoid memory leaks.

IMHO, both is almost equally hard to fully avoid.
Though both have different options of debugging them, from simple stuff like Virtual Leak Detector to more complex solutions full solutions that allow you to track in detail wich function in which context costs how much performance.
The last ones are rarely for free, though...

Seriously, this guy wrote about simple getter functions not being inline.
For people who don't know, this is a normal function from a class named SuperClass:
Code:
int SuperClass::getFavouriteValue()
{
    return _favouriteValue;
}

And this is the inline version:
Code:
inline int SuperClass::getFavouriteValue()
{
    return _favouriteValue;
}

And yes, that does make the code faster in most cases. Here is a nice description: http://www.parashift.com/c++-faq-lite/i ... ml#faq-9.1
 
Joined
Apr 2, 2010
Messages
7,428
Location
Villainville
MCA
thesheeep said:
If they failed to get at least some code optimization right, I wonder how they managed to avoid memory leaks.

I have a feeling that some of the random crashes are a "fix" for memory leak, as in, they couldn't fix memory leak but they track it and when it reaches a point, the game terminates.
 

Gerrard

Arcane
Joined
Nov 5, 2007
Messages
12,035
The performance degrading over time clearly indicates that they didn't avoid them.
 

Infinitron

I post news
Staff Member
Joined
Jan 28, 2011
Messages
97,479
Codex Year of the Donut Serpent in the Staglands Dead State Divinity: Original Sin Project: Eternity Torment: Tides of Numenera Wasteland 2 Shadorwun: Hong Kong Divinity: Original Sin 2 A Beautifully Desolate Campaign Pillars of Eternity 2: Deadfire Pathfinder: Kingmaker Pathfinder: Wrath I'm very into cock and ball torture I helped put crap in Monomyth
Kz3r0 said:
They shipped ten millions of copies, why they should waste money on making a proper game?
It's Capitalism 101.

After reusing the same engine for so many games over so many years, you'd think they'd make the effort to make it a stable platform for development. It's not a one-off thing, after all.

I wonder what WoW's codebase is like...
 

Gerrard

Arcane
Joined
Nov 5, 2007
Messages
12,035
By the way, wasn't there a case with Fallout 3 where some guy gave it to his students to analyze the process, and they ended up finding hundreds of memory leaks and errors causing crashes?
 

Oarfish

Prophet
Joined
Sep 3, 2005
Messages
2,511
It is disgusting that their games win GOTY awards yet at the same time empower people to produce such filth. To me.. it is essentially the industry endorsing it.

Not sure if serious. You will fit in just fine in GD. Say Hi to liberal
 

racofer

Thread Incliner
Joined
Apr 5, 2008
Messages
25,622
Location
Your ignore list.
Infinitron said:
I wonder what WoW's codebase is like...

We should expect to have embedded solutions for WoW anytime soon where, to run the game, you only need a single line of code.

Code:
# Call WoW
# JMP %EBP
 

Wunderpurps

Educated
Joined
Sep 27, 2011
Messages
569
Overweight Manatee said:
Roguey said:
I've read elsewhere on the internet that this thing breaks every scripted sequence. So much for "must-have mod" eh? Dumb modders.

If so it still doesn't let Bethesda off the hook for not enabling optimizations like every developer who doesn't have their head up their ass. Applying optimizations in reverse is incredibly hacky, its no wonder that it breaks something. It should be applied when compiled from the source, but only Bethesda can do that.

If just these optimizations are gaining 40% performance I can only imagine that, correctly compiled, the Bethesda-fixed version would be significantly faster still and with no bugs. If Bethesda fixes it, I wouldn't put it past them to ignore it.

EDIT:
Bethesda Forums said:
Things I'd like to note here:

Only a fraction of the speedup comes from using SSE2 code. The original exe also uses SSE2 code, just not in the right places where it is truly needed. This could've been prevented by using automated SSE2 vectorization and/or another math library. Interestingly, in this case, it's the dot product function that has been rewritten, which is somewhat ironically the #1 textbook example for automated vectorization in compiler demos.
Much of the speedup is gained by manually eliminating (only possible if the entire function can be reduced to 5 bytes or less), or at least simplifying calls along the critical code paths as far as possible. This doesn't even produce nearly as good results as an optimizing compiler could have because of many restrictions a compiler doesn't have to deal with in the first place, so every optimizing compiler can do and usually does an excellent job at this if told to do it. Skyrim would probably experience an execution speed gain of over 100% just by applying this single optimization, as it has drastic consequences to the amount of code that could be detected as being redundant and thus completely eliminated. I know that sounds exaggerated, and normally would be, but it isn't when you've read and profiled enough of the code to know just how bad the compiled code is.
Just 3 functions have truly been rewritten, everything else is either a variant form or an instruction-level simplification of functions consisting of things like "return *this;" which are at the very top in the profiled list because the compiler was obviously told not to inline it. So, every time a certain kind of pointer needs to be dereferenced, the game will call a lengthy function to do what can be (and is) replaced by a single instruction. Fixing this manually isn't feasible after a certain point, but the compiler can do this for the whole binary at the cost of just a few seconds extra compiling time and much better than ever possible by a human (at least at these code dimensions).
In general, the TESV code has pretty high register pressure. A huge part of this is simply due to the completely missing optimizations which would otherwise eliminate the unneeded allocations, but an x86_64 build would also definitely help improving this condition.
Jump targets are completely unaligned, including the so-called hot targets which are hit millions of times in short periods, leading to cache stress due to multiple fetches being required to execute a jump, whether correctly predicted or not. Optimizing compilers can automatically align them properly.
I guess I don't have to mention how bad the threading is; this isn't trivial to fix though. Just sad that it's almost 2012 and this thing can't even properly use two threads. Besides all the other obvious flaws, this is the main reason why the game is so strongly limited by the CPU. Single-core speed didn't grow nearly as much as the number of cores did. Everyone knew it 10 years ago, but back then they could still just wait for the hardware to provide the additional power needed to run the sloppy code - this trick doesn't work anymore.


Yeah, Skyrim is a nice game, but many obstacles we've got here have trivial fixes compared to the size of their respective payoffs (little to none extra coding required). Especially with over 10 million copies already sold, I somewhat expect that it will at least run on recent hardware without sub-30 framerates.


Question: Thanks for explaining (and of course for making the awesome mod). Interesting to read. Do you think you will be able to do more optimization fixes like this?
Theoretically, yes, of course. I'd currently estimate that an additional +10% could be achieved in the game executable itself using the same procedure as before. However, to fix a problematic function using only a normal person's tools, it has to be detected and isolated from the call graph, then its assembly code has to be reverse engineered, rewritten and tested until it can be replaced by a better performing variant.

Now that many of the biggest CPU hogs have been softened, there still is a lot of potential gains ahead, but acquiring them would require multiple times the work already invested for a smaller amount of additional performance. It all has to be hand-crafted - there are no tools to automate this. Worse yet, some of the work has to be redone when porting the changes to a different game version. This way, only very simple optimizations are even possible at all, due to the sheer amount of places where a call must be inlined. Most function calls suitable for inlining have a varying amount of setup and cleanup code for that function call and I just can't go through each of the (tens of!) thousands of references to figure out the optimal replacement at each point. A compiler does all this for free, within seconds - and not only for the first dozen of hottest targets, but for the whole game, which consists of millions of lines of assembly code.

My true hope is therefore that this little demo will create a demand that Bethesda must answer. Much like what happened with the LAA patch. This would be the best outcome for all and also the best base for any further optimizations that can only be hand-crafted.


Question: And did I understood you right that you said that if an optimization compiler would have been used by Bethesda from the start, we would have experienced over 100% better performance?
Yeah, pretty sure about that. The current patch doesn't modify even nearly 1% of the code, but still manages to cut the cycles per frame by 30-40%. The whole binary is full of redundant code, it's just way too much to ever do manually, but sums up quickly when eliminated by an optimizing compiler.

facepalm.jpg


Jesus fucking christ.

To reiterate from the previous thread, turning on optimizations takes this much effort:

1vsoptimization.jpg

Hard to believe I am coming to the defense of bethesda but most of what they said in there is complete bullshit.

There's absolutely nothing automatic about SSE in visual studio unless the new and unbearable version finally changed that, which I am sure it didn't because they don't even allow inline assembly any more.

When you select those flags it just means that the LIBRARIES will use SSE or SSE2. However your dot product is going to be written by gamebrio engine makers. In a cross platform engine or really any engine worth a shit, this is the case, and virtually all math stuff will be coded by the engine maker or else shit sucks.

Gamebrio is a shit engine so everything is written in a slow and unoptimized way, but simply switching some compiler flags is going to do exactly jack and quat.

VISUAL STUDIO IS USELESS AT VIRTUALLY ALL OPTIMIZATION. The only thing it does well is inlining, so you can compile away some getters and setters, which will does very little for performance.

So yes it COULD be much faster on PCs, but it is not a matter of just clicking some almost meaningless optimization options in the project settings, it would take moving to a less shitty engine or at the least replacing some core libraries of the engine. But unltimately the engine maker and customers don't care. The PC is faster than the console anyway so it really doesn't matter how unoptimized the PC version is, from their perspective.
 

Wunderpurps

Educated
Joined
Sep 27, 2011
Messages
569
Gerrard said:
By the way, wasn't there a case with Fallout 3 where some guy gave it to his students to analyze the process, and they ended up finding hundreds of memory leaks and errors causing crashes?

Most of those are BS, too.

Singletons get reported as leaks, and in C++ it's hard to avoid them, but they are meaningless.

The problems with fallout aren't really memory leaks per se as bad general resource management that balloons up over time.

The whole entire world's data is one big chunk. Then all the people have any offset from their initial state to store stuff. As you travel around and do stuff the game data increases and increased until it gets too big and then shit randomly breaks.
 

Infinitron

I post news
Staff Member
Joined
Jan 28, 2011
Messages
97,479
Codex Year of the Donut Serpent in the Staglands Dead State Divinity: Original Sin Project: Eternity Torment: Tides of Numenera Wasteland 2 Shadorwun: Hong Kong Divinity: Original Sin 2 A Beautifully Desolate Campaign Pillars of Eternity 2: Deadfire Pathfinder: Kingmaker Pathfinder: Wrath I'm very into cock and ball torture I helped put crap in Monomyth
If you'd read about this, you'd see that, yes, inlining does seem to have great performance benefits for Skyrim.
 

Wunderpurps

Educated
Joined
Sep 27, 2011
Messages
569
Infinitron said:
If you'd read about this, you'd see that, yes, inlining does seem to have great performance benefits for Skyrim.

I read it all, it's just nonsense.

100% speedup? That's extremely naive.

"register pressure" is actually exactly how you want to have your program. It's hard for people to comprehend but the number of instructions you execute has very little do do with performance on modern CPUs.

If you are a programmer you have no doubt heard that bottlenecks are where optimization matters. The bottleneck with code execution is getting the data to the CPU, and in some cases of bloated code getting the code itself to the CPU.

So this guy is saying that returning blah->x is 100% faster than returning blah.getX(). Well it might be but only in a sense that makes no difference.

Typical execution goes like this:

1. Fetch some data 200 time units if not in cache, 20 if in cache
2. do something. Sometimes very long, in this case it's going to be 2 time units for return blah->getX() and 1 time unit for return blah->x

So really this has no effect at all on the real performance. On the other hand if they reduced the size of the blah class and quanitized the data, IE they made it smaller by forcing you to execute more instructions, it would be much faster in all real world scenarios.

But even when we look at this optimization it comes back to the idea of bottlenecks. The biggest question you ask is usally if this increases the frame rate any. On gamebryo like every console engine out there the skinning and most other computationally intense tasks are done on the GPU since the CPU is totally useless. Meaning that the CPU is not bound because your PC is much faster than a console anyway. So again your real performance gains are going to be very little, if anything.
 

Infinitron

I post news
Staff Member
Joined
Jan 28, 2011
Messages
97,479
Codex Year of the Donut Serpent in the Staglands Dead State Divinity: Original Sin Project: Eternity Torment: Tides of Numenera Wasteland 2 Shadorwun: Hong Kong Divinity: Original Sin 2 A Beautifully Desolate Campaign Pillars of Eternity 2: Deadfire Pathfinder: Kingmaker Pathfinder: Wrath I'm very into cock and ball torture I helped put crap in Monomyth
I hear you, and yet these guys are claiming that yes, the game is CPU bound, and yes, they are getting striking FPS improvements. You're saying it's all lies?
 

Wunderpurps

Educated
Joined
Sep 27, 2011
Messages
569
Infinitron said:
I hear you, and yet these guys are claiming that yes, the game is CPU bound, and yes, they are getting striking FPS improvements. You're saying it's all lies?

It's more like delusions than lies.
 
Joined
Sep 4, 2009
Messages
3,520
Wunderpurps said:
Hard to believe I am coming to the defense of bethesda but most of what they said in there is complete bullshit.

There's absolutely nothing automatic about SSE in visual studio unless the new and unbearable version finally changed that, which I am sure it didn't because they don't even allow inline assembly any more.

When you select those flags it just means that the LIBRARIES will use SSE or SSE2. However your dot product is going to be written by gamebrio engine makers. In a cross platform engine or really any engine worth a shit, this is the case, and virtually all math stuff will be coded by the engine maker or else shit sucks.

The author himself said that SSE has negligible performance benefits compared to un-fucking certain functions that are ridiculously wasteful. Furthermore he didn't say that Visual Studio would handle that optimization automatically. I believe it is true that SSE vectorization isn't handled by Visual Studio, but GCC and the Intel compiler do.

None of this explains why the engine which is 99.5% the same as FO3's is suddenly 5x shittier.

Gamebrio is a shit engine so everything is written in a slow and unoptimized way, but simply switching some compiler flags is going to do exactly jack and quat.

VISUAL STUDIO IS USELESS AT VIRTUALLY ALL OPTIMIZATION. The only thing it does well is inlining, so you can compile away some getters and setters, which will does very little for performance.

Visual Studio can be good to excellent at optimizing, depending on the code you provide it. Of course, if you are already writing very good, fast code then your compiler can't do that much more to help you. Bethesda is not running into that problem, I believe.

So yes it COULD be much faster on PCs, but it is not a matter of just clicking some almost meaningless optimization options in the project settings, it would take moving to a less shitty engine or at the least replacing some core libraries of the engine. But unltimately the engine maker and customers don't care. The PC is faster than the console anyway so it really doesn't matter how unoptimized the PC version is, from their perspective.

The modder certainly didn't change the engine or replace the libraries, and he managed 40% speedup with a ridiculously hacky workaround. I don't find his +100% performance figure at all unbelievable.
 

Wunderpurps

Educated
Joined
Sep 27, 2011
Messages
569
Overweight Manatee said:
Wunderpurps said:
Hard to believe I am coming to the defense of bethesda but most of what they said in there is complete bullshit.

There's absolutely nothing automatic about SSE in visual studio unless the new and unbearable version finally changed that, which I am sure it didn't because they don't even allow inline assembly any more.

When you select those flags it just means that the LIBRARIES will use SSE or SSE2. However your dot product is going to be written by gamebrio engine makers. In a cross platform engine or really any engine worth a shit, this is the case, and virtually all math stuff will be coded by the engine maker or else shit sucks.

The author himself said that SSE has negligible performance benefits compared to un-fucking certain functions that are ridiculously wasteful.

Gamebrio is a shit engine so everything is written in a slow and unoptimized way, but simply switching some compiler flags is going to do exactly jack and quat.

VISUAL STUDIO IS USELESS AT VIRTUALLY ALL OPTIMIZATION. The only thing it does well is inlining, so you can compile away some getters and setters, which will does very little for performance.

Visual Studio is good to excellent at optimizing, depending on the code you provide it. Of course, if you are already writing very good, fast code then your compiler can't do that much more to help you. Bethesda is not running into that problem, I believe.

So yes it COULD be much faster on PCs, but it is not a matter of just clicking some almost meaningless optimization options in the project settings, it would take moving to a less shitty engine or at the least replacing some core libraries of the engine. But unltimately the engine maker and customers don't care. The PC is faster than the console anyway so it really doesn't matter how unoptimized the PC version is, from their perspective.

The modder certainly didn't change the engine or replace the libraries, and he managed 40% speedup with a ridiculously hacky workaround. I don't find his +100% performance figure at all unbelievable.

Does he have 100% or even 40% more FPS? No. Numbers like that are meaningless with no context, especially with an up to prepended to them.

When you make a naive test and boot up the game for 2 minutes then memory is not fragmented and you get no cache misses, and you get overoptimistic benchmark results.

So you play 5 minutes and there's zero cache misses, then the gets and sets could possibly be slower I guess. When you play for a few hours then things are less rosy, and then your instruction count doesn't matter at all because memory is fragmented and the weak spot is fetching data into memory.

So a few guys in a few cases seeminly got much better performance for a few minutes not specified in FPS, but most people even on short runs are not seeing more than 5-10 fps difference. I'm guess if they loaded the same game midway into the game and did the same stuff for about an hour the frame difference would be more like 1-2 FPS most of the time.

With the optimization, what can I say. I know for a fact you won't get any SSE instructions from your own code without writing them out yourself. When I run non graphics code I only get about 30% speedup compared to full debug mode, and the only option that does much aside from removing debug data is inlining. For graphics code it all depends on what your app is doing but hopefully if you are a decent programmer with a decent engine you are only CPU bound when you have legitimate reason, such as calculating a bunch of paths.
 

As an Amazon Associate, rpgcodex.net earns from qualifying purchases.
Back
Top Bottom