PDA

View Full Version : News: CodeForge on Optimization


Hamma
2013-09-10, 10:48 PM
CodeForge aka Ryan Elam has posted an update on Optimization

https://forums.station.sony.com/ps2/index.php?threads/operation-make-faster-game.150281/

Operation: Make Faster Game (OMFG)
Getting Our FPS Higher FPS

Hey folks,

It’s been a while since my last optimization post, so want to make sure you know that we’re going to be posting a lot more often than we have been.

WHY HAVEN’T YOU DONE ALL THIS ALREADY?

We’ve spent the better part of two years with PlanetSide 2 measuring and reviewing the elements of the game which are slow. When we’ve found things we could fix quickly, we did. When we found general optimizations that didn’t have much of a risk to them, we worked on them. But mostly, given that we were a live game since the opening of the PS2 Tech Test, we kept our optimizations as “safe” as possible. Optimizing often involves reorganizing code that has already been through rigorous testing, and that means as we move it around we can….Bust something…No matter how hard we try not to. Many optimizations that we found just required far too much “soak time” to be feasible at that stage of the project.

WHY ARE YOU DOING THIS NOW?

PlanetSide 2 has reached the point in its development where we think the core game is THERE. Designers have a vast array of options from here on out to create content, artists have at least a minimum set of tools for creating art, the UI works well and is understandable, we have an actual tutorial (no more “Welcome to the game! *POW*!”), and players around the world are able to find PlanetSide 2 and play it in their native language as available.

We have reached an opportune time, and recognizing this, Smed stepped up and said, “Fix it, now.” We all have wanted to get the time necessary to do some of these bigger changes, and do them right. Smed also recognizes fully that no matter how much work the design department or art department puts into making the game shine, it simply isn’t as fun of an FPS experience at a low frame rate.

With this proclamation, all of our teams have been given the freedom to fix things that take significant time to fix. What you’re going to get at the end of this is a serious, noticeable increase in frame rate, PLUS some ancillary benefits that are capable as a result of some of these architectural advances. Every single member of the team, no joke, is actively looking for and implementing ways to make the game faster so we can deliver a better gameplay experience to you.

ALRIGHT ENOUGH APPETIZER, GIMME SOME MEAT!

I’m going to introduce you to some fairly technical terms. If you’re Vanu, you can skip this disclaimer and you probably know it all anyway. TR, if you don’t understand something ask your C.O. If you still don’t understand, you’re probably a Heavy…don’t worry about it… If you’re an NC, all this is probably just some plot by the man to keep you down. Just read it anyway.

Physics
---------
This game has physics scenes that are unrivaled in their complexity. While a normal game may have upwards of a hundred different shapes bouncing around and solving for their collision, we sometimes have scenes with over a thousand shapes, or more! Those huge tank battles really do a number on the physics solver!

So OMFG will see us spending significant time restructuring the complexity of our physics solved in a way we call “Adaptive Level of Detail.” What this means is that we will be lowering the amount of work the simulator does, based on frame rate and distance to object. Basically, we give the physics simulation less to do by taking things that are a distance away from you and making them simulate less.

“But wait Ryan!”, you say to yourself, which is a funny thing to say to yourself, “Won’t lowering the simulation quality result in a crappy simulation!? I love PlanetSide 2’s awesome physics and would never want to see any harm done to it! PlanetSide 2’s physics are the best ever!” Well, now you’re getting a bit too…Okay…I’ll accept that compliment. To answer your question, though, we simply don’t know.

Some of the things we’re doing are experimental. We have great ideas from some of the best in the biz on how to solve our performance problems, however coding is 60% science and 60% art. Some of the tasks I’m talking to you about today are still in their early stages, and may not make it into the final game as described, or at all!

With Adaptive Level of Detail, we hope to emulate the frames we don’t simulate, “smoothing” out any simulation errors that may occur, but it is going to take a lot of work and caffeine to make it, then even more to determine if it is good enough. As far as effect on frame rate, it won’t have much of one unless you have 4 or less cores, but it will have a HUGE impact on physics “hitches” and anyone with 2-4 cores will see potentially massive increases in frame rate when in a big battle.

Overhead Manager
------------------------
Right now, when you’re in that Big Battle, we spend a lot of time drawing those little triangles (we call them Doritos, but get no product endorsement money…Can you believe that?) above people’s heads. They don’t look like much, but there is a complicated system under the hood to make sure we show them even though their owner may not be visible to you, and don’t show them when we shouldn’t and heck tons of other rules. We’ve seen real improvements from re-factoring that entire system to be more efficient and change only what’s necessary, when necessary. We’re also re-factoring its rendering code so it will be much faster as well.

Player Updates
-------------------
The more players you have around you, the more time your game client spends updating the information about those players. Be it sounds they’re playing, bullets they’re firing, stats that are changing, etc. Your client spends an amount of time per dynamic entity making sure the things that are dynamic get dynamic-ed. In an effort to make this more efficient, we are only going to update a number of them per frame and we are going to be smarter about whether or not they need a full update. In early testing, this has resulted in less than 10% of all dynamic entities actually NEEDING to be updated though right now 100% of them get their update. Needless to say, in large battles this will be nice to have.

Animation Updates
------------------------
PlanetSide 2 has a really robust animation system, with every tech animation buzz word you can think of (except for ragdoll…Yeah…Why isn’t ragdoll done yet? Seriously!?) We animate a lot more stuff than most games out there, through some very complex state networks. For our animation optimizations, we’re looking at ways to process fewer animations per frame and when they do process, have less complexity per process to iterate through while producing the same high quality result. This is tough work done through collaboration between the art and code teams, but we’re confident we will get a good result here.

User Interface
-----------------
Our user interface is incredibly complex. It may look simple (on purpose….It’s actually a heck of a lot MORE work to make something look simple!) but there are many tens of thousands of lines of code running all the time to keep that data fresh. However, now that we’ve had over a year to manage its functionality, we see areas where we can reduce the per-frame overhead and have it to give you the same data, but cost less to do so. We are actively optimizing the minimap and hud to reduce per-frame time to as little as 10% of what it currently is.

Furthermore, we are upgrading our UI middleware to its latest version, which includes optimizations that further decrease the time UI takes to draw.

Also, we are decoupling the part of the UI that manages the data, manages the on-screen movie, and renders the movie into three sections- each of which can run in a different thread. This decoupling also allows us to run each piece at a different rate, so they don’t all have to update every frame.

Occlusion/Visibility
-----------------------
PlanetSide 2 has a huge world. 64 km^2 filled with over a hundred thousand objects and thousands of players per continent! Each combination of mesh (the polygons that make up an object) and texture (the things we paint onto the mesh) has to be individually described in detail to your video card and then rendered. So how do we render hundreds of thousands of things per frame? By NOT doing it! Easy, eh?! Instead we first split the continent up in a whole bunch of ways and then use 10 man-years’ worth of code to determine what subset of those things you can actually see. This is Visibility. We also want to avoid rendering something that is behind something else, be it a “dynamic” object (like a person or bullet, something that changes) or “static” object (something that doesn’t change, like a building or Higby’s opinion). This is Occlusion.

We use a third-party code source called Umbra to do most of our Visibility/Occlusion. As part of OMFG, we are upgrading our Umbra to the latest version, which also requires a significant re-factor of how our visibility pathway works, changing several factors of our core client and tools. This is going to reduce the time spent per-frame on visibility by a sizeable amount, which means that the more complex your scene (like, for example, a base where there are thousands of objects) the more benefit you will get. We are also putting our visibility fully in another thread, so those of you with multicore systems (most of you) will see added benefit, and AMD users will see a pretty significant benefit from the parallelization of visibility operations.

Multithreaded Renderer
------------------------------
Many elements of PlanetSide 2 are already in separate threads, but each of those threads often have to be in lock-step with the main thread and the renderer. So we are taking the part of the renderer that actually talks to DirectX and we’re putting it into its own thread just like the UI renderer. This will give the main thread less to do per-frame, further increasing the frame rate for those with 4 or more cores.

More Instrumentation
---------------------------
We are working on adding even more tuning dials and nobs for ourselves, giving us even more power to see what’s happening in these big battles and where we should tune next.

I’m also excited about our ongoing efforts to create a Benchmark Level. Old-school “run through a rail and compute your frame rate” here. SOE believes in empowering its users like nobody else, and this is another example. We’re going to be giving you the ability to actually measure your frame rate in a static environment so you can, with every patch, have a one-button “How am I doing?” solver. You fly around a scene, while we compute all sorts of metrics on fill rates, object update times, UI times, and hundreds more…Then, at the end, you can see a score,discuss it and WE get that score as well, along with your hardware setup. Being able to have a static scene custom-purposed to find performance problems is HUGE. No more, “Well I got X frame rate at a bar in Indar on a Tuesday while it was raining.” Now you’ll be able to say, “Last week I got a score of 8300, but this week IT’S OVER 9000!!!!”

IN CLOSING

We’re going to keep talking about what we’re doing and why we’re doing it. These optimizations DO improve everyone’s life, not just the low-end machines. They are significant increases in performance that will change your gameplay for the better.


You are a part of this. Questions welcome.

Ryan Elam - Tech Director PS2

GreyFrog
2013-09-10, 10:51 PM
Which is all spectacular, but the most important part was left out. Now three weeks down this road, whats the bloody ETA?

disky
2013-09-10, 10:58 PM
Which is all spectacular, but the most important part was left out. Now three weeks down this road, whats the bloody ETA?

This. When are we gonna see it, guys?

bpostal
2013-09-10, 11:52 PM
Soon, of course. The way I see it as long as we're not going backwards, we're going forwards.

Snoozzzer
2013-09-10, 11:53 PM
...that's awesome. I hadn't seen this level of "Hey this is what we're doing" from devs outside of community developed mods.

Does anyone know if these re-writes will be shoved on and off the public test server to give players a glimpse and get feedback on improvements and broken-ness from 3rd parties?

...the way the servers actually manage to handle this game both perplexes and astonishes me, but that might be a trade secret...

DirtyBird
2013-09-11, 12:26 AM
Would like to see the same "updates" that they give to Smeds.

SolLeks
2013-09-11, 01:45 AM
...that's awesome. I hadn't seen this level of "Hey this is what we're doing" from devs outside of community developed mods.

Does anyone know if these re-writes will be shoved on and off the public test server to give players a glimpse and get feedback on improvements and broken-ness from 3rd parties?

...the way the servers actually manage to handle this game both perplexes and astonishes me, but that might be a trade secret...

I have with star citizen =P

I do wish more devs would do this type of stuff though.

Also, All of these optimizations sound great, I to wonder what the ETA is. Will it be some weeks away or month/s?

Maidere
2013-09-11, 02:51 AM
PlanetSide 2 has reached the point in its development where we think the core game is THERE.
This line in particular realy worries me.

NotTheMomma
2013-09-11, 03:00 AM
How long for the entirety of it? Months, I'm guessing. They probably only have four or five coders, at most, that will be the primary contributors in writing and debugging the bulk of that laundry list. Anyone not already familiar and experienced with the tools & technologies would take months to become a significant producer. Certain outside contractors/consultants might be able to get up to speed faster, but they would still have become familiar with Forgelight, the rest of the tools and hardware, as well as their configuration and utilization in that particular environment.

That said, they seem to be using some kind of Agile-like development methodology, so there might be noticeable changes rolled out every 2-3 weeks.

I just hope that we don't see frame rates go up and stability go further down. :nono:

ChipMHazard
2013-09-11, 03:56 AM
Good news about multicore support, very nice.
One thing that really got my attention, even though it probably shouldn't for this reason, is the change they're doing to do the doritos. The darn things showing up all over the place and blocking by view of enemies has been irritating me for a long time. I am really looking forward to having a more clear view of what's happening.

camycamera
2013-09-11, 06:29 AM
ah, fabulous news if i do say so myself! :D

camycamera
2013-09-11, 06:31 AM
This line in particular realy worries me.

technically, it is. they still have 9 more years to add to this game, remember that as well! :lol:

CrimsonTemplar
2013-09-11, 06:35 AM
TL;DR :rofl:

Not really. I do appreciate the painstaking effort this must be. Grateful for the multicore support. Wish we got it sooner but ah well, at least it has come now.

I think some of their effort has already appeared on PTS, since performance appears better than on live. That could be just me or the lack of people though.

Assist
2013-09-11, 07:25 AM
TL;DR :rofl:

Not really. I do appreciate the painstaking effort this must be. Grateful for the multicore support. Wish we got it sooner but ah well, at least it has come now.

I think some of their effort has already appeared on PTS, since performance appears better than on live. That could be just me or the lack of people though.

yeh that's lack of other players

Neat read, all above my head. Here's a cat - http://cheezburger.com/7778594560

PredatorFour
2013-09-11, 07:38 AM
yeh that's lack of other players

Neat read, all above my head. Here's a cat - http://cheezburger.com/7778594560

Nice kitty.

Calista
2013-09-11, 08:48 AM
This line in particular realy worries me.

No doubt. Remember when the game launched and everyone was complaining and Smed said if you don't like it then come back in 6 months? Well it is time for another one of those 6 month (if not longer) hibernation periods I think.

ringring
2013-09-11, 08:49 AM
This line in particular realy worries me.

It depends on what your concept of the 'game' is I suppose.

e.g. I know we don't have hossin and nexus and a myriad other things but the core game on which those can be built is perhaps what he was meaning.

Maidere
2013-09-11, 09:54 AM
It depends on what your concept of the 'game' is I suppose.

e.g. I know we don't have hossin and nexus and a myriad other things but the core game on which those can be built is perhaps what he was meaning.
Then I dont see why they didnt start this optimization OMFG right after Indar lattice went live. I call bs on their timing explanation.
Smed's initial explanation was a lot more realitic: he said that they can't move further and add more stuff without optimizing existing content and code.

Vanir
2013-09-11, 10:34 AM
I hope they optimize it enough so that they will bring in weather effects!

Crator
2013-09-11, 10:55 AM
Like the details given in this post by the designers. Thanks a lot for that! Very interesting.

CorrosiveBspin
2013-09-11, 11:19 AM
I hope they optimize it enough so that they will bring in weather effects!

Chyeaaa, can you imagine some Indar dust storms, Esamir snow storm and heavy rain on Amerish :D

Zadexin
2013-09-11, 11:24 AM
So basically what you're saying is that almost a year after launch the game is 'actually ready for launch'.

Hooray for bilking hundreds of subscribers to play a public beta test!

HOSSIN!
http://i.imgflip.com/nhkx.gif (http://imgflip.com/i/nhkx)

Levente
2013-09-11, 11:41 AM
also ragdolls would be nice to have. DO IT NAOWWWWW and also the empty cartridges of bullets flying out of the weapons could bounce on the ground for a while like the sparks on wall when you shoot it, could also this be done by adding in to Physx? HALO 1 had this :) :)

Calisai
2013-09-11, 11:43 AM
Then I dont see why they didnt start this optimization OMFG right after Indar lattice went live. I call bs on their timing explanation.
Smed's initial explanation was a lot more realitic: he said that they can't move further and add more stuff without optimizing existing content and code.

Honestly, the whole push for optimization was probably due to the PS4 release. They realized that the game wasn't going to be playable on the PS4, so they are pushing all development time into making it able to run sufficiently in time for Release day.

They didn't do it before now because it's a major change and has the potential to break more than it fixes. It would have required halting all new content, and they didn't think they could do that so early in the games release. The PS4 performance pushed that to the forefront and made it a priority over everything else.


Personally, if this is true... I understand it and accept it. It would have been nice to have it all optimized and tools in place as they were developing, but they've made MAJOR changes to the game since release and had made MAJOR changes to the game since tech test.

I'm just hope they succeed at making the game run better for BOTH PS4 as well as PC (as splitting into multi-core threads will help both). This can only help the game going forward at this point.

Calisai
2013-09-11, 11:50 AM
So basically what you're saying is that almost a year after launch the game is 'actually ready for launch'.

Hooray for bilking hundreds of subscribers to play a public beta test!


Welcome to MMOs. The life of the ever changing, bug infested, incomplete visions that people have come to expect... and accept.

Personally... I've had nothing fun playing this beta... I've gotten my money's worth of entertainment out of PS2 and continue to do so... I'm glad the game was released when it was... I had been waiting for a replacement game to PS1 for years.

Nobody was forced to subscribe... I knew what I was paying for with my alpha squad and membership.... Support for SOE to continue development on what is my most favorite FPS franchise. If you didn't want to pay for that... then you didn't have to.

Snoozzzer
2013-09-11, 01:23 PM
I have with star citizen =P

I do wish more devs would do this type of stuff though.

Oh yeah! Lots of good interviews - behind the scenes with various artists and engineering... Ok, my bad in neglecting the incredible dev team over there with praise. Any higher level of interaction there would involve either hiring an intern with a camera to make a reality show of programmers typing, or literally posting detailed design, algorithms and code. Which would be silly.

Though the intern thing might be amusing enough to garner even more support and pre-release players...just sayin'

Do you accept donations of coffee and red bull?

Sarloh
2013-09-11, 01:32 PM
This entire list of things... I'll just got back to shining by Decimator.

Ninhau
2013-09-11, 01:57 PM
i support anything that the developers cn do, to make the game run smoother. dont mind waiting for new fwatures. its really not fun to play a slideshow sometimes (...many times)

tkoreaper
2013-09-11, 02:42 PM
Anyone else find it odd that they're doing it now? Before the PS4? Everyone of my senses is screaming "They're doing this for the PS4" which isn't necessarily a bad thing because we've needed it for so long, but when you hide this fact and, instead, portray it as an act of public service. It may just be me, but it's more of a publicity stunt IMO.

Like I said, it's great they're finally doing it, but I just have a feeling the real reason is being veiled to sound better and more appealing. I mean, don't say it's for us when really it's mainly for your benefit because it was playing bad on the PS4.

Pointless post, but w/e... Just wanted to speak my mind.

GreyFrog
2013-09-11, 05:53 PM
I wanted to believe.

I wanted to believe that stopping all content while they fixed performance was not only necessary, but would ensure quality patches.

I wanted to believe that the loss of staff would not effect SOE's efforts in relation to PS2.

/disappointed

Ailos
2013-09-11, 08:04 PM
Would've probably been best to come out flat and say "We're optimizing for the octa-core PlayStation 4 APU." Is anybody confused about the fact that's the real reason they're doing this now?

Everything they're doing right now would've been a fuckton easier to do if they had set out with an emphasis on making lean code: anything that has "over 2 million man hours of code" is not lean. There aren't any new technologies in their engine that came out in the last 6 months that they weren't able to use before. There aren't even any new issues for them to resolve - performance wise, everything's been pretty much exactly the same in the game and in the industry as a whole the entire time, and you'd think they would've known how important optimization is - what with having built PS1 and how crappily that runs. I never bought their excuse for breaking 10 new things every time they fix an old bug, and I won't this time. Flat out, this was sloppy work and it'll end up costing them.

DirtyBird
2013-09-11, 09:11 PM
When you read this and then see what happened in the hotfix how can you have any confidence they will be able to do this right.
I'm waiting for the next tweet from Smeds telling us everything is on hold until QA is sorted.
You aint going to get optimization fixed until QA is improved.

Must be frustrating for the ppl working on this.

Ailos
2013-09-12, 01:06 AM
When you read this and then see what happened in the hotfix how can you have any confidence they will be able to do this right.
I'm waiting for the next tweet from Smeds telling us everything is on hold until QA is sorted.
You aint going to get optimization fixed until QA is improved.

Must be frustrating for the ppl working on this.

No, Smed's next tweet will say fixing QA is on hold until they can get HR to hire the right people.

vipjerry
2013-09-12, 01:13 PM
Original post transation:
"There won't be any updates in PS2 any more!"
"You can forget about exotic things like new content, meta game or incentives"
"We gave up on PS2. Take it as it is now or leave and move to some new game. This one was nice experiment but now its old and does not bring us any money"

Crator
2013-09-12, 06:15 PM
^ Ever seen this article vipjerry? John Smedley on PlanetSide 2 success
(http://www.gamesindustry.biz/articles/2012-12-12-john-smedley-on-planetside-2-success-facebook-failure)

ImThatGuy
2013-09-13, 12:11 AM
Would like to see the same "updates" that they give to Smeds.

That is a very interesting idea.

ImThatGuy
2013-09-13, 12:14 AM
Original post transation:
"There won't be any updates in PS2 any more!"
"You can forget about exotic things like new content, meta game or incentives"
"We gave up on PS2. Take it as it is now or leave and move to some new game. This one was nice experiment but now its old and does not bring us any money"

No one has given up on Planetside 2. It has issues that need to be resolved.

Concentrating on those issues as a fan-base paired with an active developer relationship to the community may help SOE create a game that the community has desired.

Wahooo
2013-09-13, 12:30 AM
I thought the whole point of having a test server was that when shit went onto live it fucking worked.

vipjerry
2013-09-13, 04:51 AM
No one has given up on Planetside 2. It has issues that need to be resolved.

Concentrating on those issues as a fan-base paired with an active developer relationship to the community may help SOE create a game that the community has desired.

I wish i'm again so young and naive...

vipjerry
2013-09-13, 04:53 AM
^ Ever seen this article vipjerry? John Smedley on PlanetSide 2 success
(http://www.gamesindustry.biz/articles/2012-12-12-john-smedley-on-planetside-2-success-facebook-failure)

Yes ive seen it 10 months ago. Today its different story...

ringring
2013-09-13, 11:02 AM
I thought the whole point of having a test server was that when shit went onto live it fucking worked.

They don't seem to be using the test server as a staging place between the development and live. They seem to be using test as a repository for code and assets in any stage of development and then for transition to live they have to create a new build - and so introduce mistakes.

Tatwi
2013-09-14, 03:18 AM
They don't seem to be using the test server as a staging place between the development and live. They seem to be using test as a repository for code and assets in any stage of development and then for transition to live they have to create a new build - and so introduce mistakes.

Likely due to lack of person-power. SOE made excellent use of the test servers in Star Wars Galaxies. Granted, that was the Austin studio rather than the San Diego one.

Many hands... gets shit done in a logical manner, when paid and managed properly.

Shogun
2013-09-14, 08:25 AM
I wish i'm again so young and naive...

me too.

but i have lost hope, that the game i anticipated more than any other game ever would live up to its potential.
soe just can´t shake off their track record.

the time when games were made to be awesome is long gone. money is the only thing that counts nowadays, as long as a publisher is involved. the only way for developers to make a really good game the way they imagine it, is going the rocky way of crowdfunding. and star citizen has shown, that the playerbase is sick of what the publishers do to games and actually would pay more money, if it was used for reasonable and innovative developement, instead of being blown into the butts of people who didn´t contribute anything to the developement or even restricted the game to be a stupid clone of some other shitty game that sold a lot of copys.

they should have stayed on their first idea, to just do a major facelift to planetside one (ps next). with an upgrade to make the gunfight feel a little more modern. but taking out all the cool systems and making the game just another loveless arena shooter was the worst idea ever!

Snoozzzer
2013-10-04, 05:25 PM
.....Any higher level of interaction there would involve either hiring an intern with a camera to make a reality show of programmers typing, or literally posting detailed design, algorithms and code. Which would be silly.

Though the intern thing might be amusing enough to garner even more support and pre-release players...just sayin'


SOE actually did this! - https://www.youtube.com/watch?feature=player_embedded&v=6kUylB5nLec

It may be a gravedig, but...SOE has a guy, with a camera, running around bugging other programmers at work and showing off his code. Thanks Alex and SOE