1. This forum section contains Blog style threads from the Developers, and/or threads with details about what they have been working on, previews of upcoming content, and sometimes backstory associated with the content. Players are permitted to reply to these threads if the developer has indicated it is permissible by leaving the thread unlocked. Please note that TOS applies, and any abuse or trolling will be moderated.
    Dismiss Notice

Chris' Daily Work Blog

Discussion in 'Developer Work and Blog posts' started by Chris, Apr 5, 2017.

Thread Status:
Not open for further replies.
  1. Chris

    Chris Tech Lord Moderator Ambassador SOTA Developer

    Messages:
    2,470
    Likes Received:
    27,551
    Trophy Points:
    190
    Gender:
    Male
    9/26/2017

    Getting stuff done...
    • Evasion added to the list of Damage Avoidance skills. I missed it because I did a search for the token that represents "DamageAvoidance" in the source files. Evasion hadn't been touched in a long time and was in the old serialization format and didn't register in my search. Torport did show up but it only grants the bonus while in the early parts of the skill so I did not add it as it is not really a defensive skill.
    • Increased the focus burn from Chaotic Feedback from 1 to 2. (Note, my other possible change for the near necessity of this skill is to leave it at 1 focus burn and then make it increase focus costs more)
    • Spellbinder's Stance. This is a tricky one as it is already fairly powerful BUT not being able to move and being made a huge target with weakened defenses is a massive downside. Still feels like it needs a little more juice. To reward that "Stand Still" aspect, the spell will grant a spell critical bonus of 1% for ever 5 seconds the caster stays in the stance.
    • ...mixed in some IT work here
    • Fixed some issues with Quad Slash because clearly blades are what need the love! :) All but the first attacks on quad slash were hitting a smaller forward angle so it was easy to hit with the first attack and then miss with the next three. Also, Quad Slash wasn't getting the Double Slash bonus.
    • ...
     
    Last edited: Sep 26, 2017
  2. Chris

    Chris Tech Lord Moderator Ambassador SOTA Developer

    Messages:
    2,470
    Likes Received:
    27,551
    Trophy Points:
    190
    Gender:
    Male
    9/27/2017

    • IT: Setup a new internal data box for faster long term access. Dell R620 1U rack server 192GB, 2x6core 2.3ghz Xeon processors, 8 600gb 10k hardware raided SAS drives. Thank you ebay, $1050... For those who didn't know, you can get some amazing last gen server hardware on ebay for about 10-20% of what it cost 3 years ago. Most big companies dump them because new boxes have a better CPU power to watt ratio. What we really needed for this was memory, a LOT of it, for big data mining on elsticsearch and this will do just fine.
    • Getting a build done! We have a build but it has some serious issues. We're shooting for kicking off a gold candidate ASAP!
     
  3. Chris

    Chris Tech Lord Moderator Ambassador SOTA Developer

    Messages:
    2,470
    Likes Received:
    27,551
    Trophy Points:
    190
    Gender:
    Male
    9/28/2017

    B.R.E.!

    • Added a max cap of 75% to the amount of healing debuff that can be applied. Worst case, players will always be able to get a 25% heal/regen value.
    • Purify will no longer remove the negative effects of Chaotic Feedback.
    • Decided that for ACLFest, I will carry around a 12' pole with a silver serpent on the top of it. If any fans are going to ACLFest and want to come chat us up, feel free! I will say that our throats get dry and tired from talking over the music while we're out there so anything you can do to help us with that problem *cough*bring us beer*cough* would be appreciated! :) Oh, and by "silver serpent, what I really mean is a 2' card board cut out of a silver serpent shape covered with aluminum foil. We're going to weekend 1 and at least a half dozen of us will be out there including myself, Starr, Burningtoad, Attenwood, and others.
    • This makes me happy. This is a per hour chart for media load times. The left side is yesterday and this morning leading up to the patch. The Right 5 or 6 bars are the current release:
      [​IMG]
    • Still work to do but we're getting there!
     
    Last edited: Sep 28, 2017
    Thwip, Myrcello, Vaiden Luro and 28 others like this.
  4. Chris

    Chris Tech Lord Moderator Ambassador SOTA Developer

    Messages:
    2,470
    Likes Received:
    27,551
    Trophy Points:
    190
    Gender:
    Male
    09/29/2017

    So far so good on the release!

    Major change coming to defensive stance but first an explanation of the relationship between Damage Resistance and Damage Absorption. When you get hit, your defenses stop some of the damage. Damage Resistance is the max number of points that can be stopped. Damage Absorption is the max percentage of the hit that can be stopped. So in techy language:

    DamageStopped = MIN( DamageResistance, DamageAbsorption*DamageForHit)

    So if you have a total of 30 Damage resistance and 25% damage absorption and get hit for 100 points of damage the math looks like this:
    Damaged Stopped = MIN(30, 25%*100) = 25 since that is the lesser of the two numbers.

    So almost the exclusive source of Absorption is armor. A full suit of plate give you around 55-60% Damage absorption. A full suit of cloth might only give 20% and leather roughly 32%. The defensive stance skill would give 60% or more absorption at high level. This pretty much made plate mail pointless and made it super easy to tank in cloth using other damage resistance sources. This was never the intent of the skill

    So after reevaluating defensive stance and comparing it to the goals of the stances, I've made some changes to Defensive stance that will go live on Monday. Except for passive stance, the stances were supposed to enhance some aspects of your active skills to fit a certain need. So with that in mind, I've removed damage absorption aspect of defensive stance and replaced it with a new feature that makes the active defense skills more effective.

    With an 100 skill in defensive stance it will give a 40% bonus to defensive skills. Note, this is a 50% modifier so if you use parry and get a 20% parry chance, 50% more brings that up 30%(150% of 20%), not 70%. Current list of skills this will benefit:
    • Glancing Blow
    • Absorb Impacts
    • Deflect (Also increases damage stopped)
    • Bolster Balance
    • Dig In
    • Testudo
    • Dodge
    • Evasion
    • Parry (Also increases damage stopped)
    I expect this to go live in the Monday patch and look forward to your constructive feedback. As usual I will set this skill to give you 100% experience back on untraining for at least the rest of R46.
     
    Thwip, amberdust, Rentier and 31 others like this.
  5. Chris

    Chris Tech Lord Moderator Ambassador SOTA Developer

    Messages:
    2,470
    Likes Received:
    27,551
    Trophy Points:
    190
    Gender:
    Male
    10/02/2017

    Note: Botting quest turn ins is still botting. Dealing with this now. Temp bans applied and details handed over to CS. In their hands now.

    Diving into profiles from the Friday dance party. TONS of things to fix when loading into a crowded scene. Starting scene logic too early in the load process so it competes with lots of setup logic. In high activity spot, like say a dance party, the messages for actions and events are slowing down the delivery of the items to load list.

    Fixed cabalists so they can no longer be gusted.
     
    Last edited: Oct 2, 2017
    Thwip, Ancev, Rentier and 28 others like this.
  6. Chris

    Chris Tech Lord Moderator Ambassador SOTA Developer

    Messages:
    2,470
    Likes Received:
    27,551
    Trophy Points:
    190
    Gender:
    Male
    10/10/2017

    Sorry for the lack of updates. Busy 2 weeks with the Unity Unite conference last week and then I was off for the day for a 3 day concert that I attended with a number of other team members!

    Yesterday:
    • Artifact work
    • Script to allow artists to generate a report on tree usage in maps and also globally replace trees. This is for load times and memory reasons. Many maps have WAY too many tree variations in them currently and they are extremely memory and load time intensive
    • Leads meeting
    • New user experience discussions
    Today:
    • ....chaos....
     
  7. Chris

    Chris Tech Lord Moderator Ambassador SOTA Developer

    Messages:
    2,470
    Likes Received:
    27,551
    Trophy Points:
    190
    Gender:
    Male
    10/11/2017

    Moved the server room power to a new dedicated circuit we had installed so we wouldn't blow the fuses once a week. /cheer (This is our local server room. The real server room is at a co-location center)

    Looked over various test results and it looks like we will be moving to Unity 2017.2 for R47! This will require a full reimport of the project which takes about 2 full days without a cache server.

    Created a new linux VM on our new beefy server box, setup a private key, installed nodejs and other dev stuff and then installed the new, multithreaded Unity cache server. Rsync'd over all the old cache data to the new box. This is the server our Unity Editors talk to to reduce asset import times. Old one sucked and would crater and disconnect people if more than 3 or 4 people were hitting it at once. This was important to save the team hours or days on the switch to 2017.2.

    Back to ....chaos...
     
  8. Chris

    Chris Tech Lord Moderator Ambassador SOTA Developer

    Messages:
    2,470
    Likes Received:
    27,551
    Trophy Points:
    190
    Gender:
    Male
    10/12/2017

    Woohoo, 4 hour post mortem day!

    Before that starts, I'll give players reasons to hate me.
    ...Artifacts will no longer be repairable in R47...
    ...Earth magic strength modifier decreased slightly ....
    ...Fizzle rates on heavy armor chest pieces going up a few points...
    ... fixed a bug where stone fist had a longer range than it should...
    ... fixed a bug where stone fist was using the wrong strength bonus...

    Note, multiple reasons for the Artifact changes. The biggest being that we plan to make them enchantable/masterworkable. They will also likely get a bit more powerful in some cases. Drop rates for many artifacts will now go up slightly and they will start with higher starting durability.

    In case you haven't gone through the full thought process yet, this will make them more powerful but far more temporary. Crafters will be even more important with this change because you better have a rock solid crafter because if he screws up, you just killed an artifact. Enchanting and MW reduce durability on an item that can't be repaired.
     
    Last edited: Oct 12, 2017
    Thwip, Arpanet, firesparx and 30 others like this.
  9. Chris

    Chris Tech Lord Moderator Ambassador SOTA Developer

    Messages:
    2,470
    Likes Received:
    27,551
    Trophy Points:
    190
    Gender:
    Male
    10/13/2017 - 10/16/2017
    • Blarg, sick but still at work because we have a new employee! Woot woot
    • Still mulling over ideas for how best to transition to a post repairable artifact world. Leaning towards leaving all artifacts in game now in the current system and removing their drops. Then making 2.0 versions of them with new features and no repair. Not certain I will do this, just considering this option.
    • Setting up new employee computer and desk and accounts
    • SOTACon! Huge success and thanks to all that attended. Next year I will plan on NOT being sick so I can take part in more of the activities!
    • Ongoing discussions of option of moving to Unity 2017.2 for R47. Feels risky right now though it does offer faster load times, 3.3 seconds average per scene. Might just move the build machines but not the whole team.
    • ... artifacts...
    • Added a "Lance Mastery" skill in Polearms. New passive that increases max critical hit damage with polearms. Not happy with the name... :/ Polearms have the worst passives of any of the weapon trees and this was another step in my "Make Solazur stop bitching about polearms" campaign.
     
    Last edited: Oct 16, 2017
  10. Chris

    Chris Tech Lord Moderator Ambassador SOTA Developer

    Messages:
    2,470
    Likes Received:
    27,551
    Trophy Points:
    190
    Gender:
    Male
    10/17/2017

    Stayed at home to try and get over this nasty cold a bit quicker. I have a history of chronic bronchitis so I try to be safe with this stuff so I don't lose a month recovering. Paid off as I'm feeling significantly better AND I'm now caught up on the new Star Trek show. I strongly approve of the new Star Trek. It is a bit different than past Star Trek with a more extreme focus on a single, non-traditional lead but introducing some interesting new ideas.

    10/18/2017

    • Trying to wrap up a LOT of loose ends and get 30+ new artifacts into the game.
    • Renaming the new Polearm skill to Bec de Faucon (Thanks @Spoon !)
    • ...
    Now to clarify the current plan for artifacts. For R47, existing artifacts will still be repairable but the new varieties will not be. For R48, the existing artifacts will move to not be repairable through normal means. For R48, all artifacts will become salvageable and will yield an essence that can be used to repair/recharge other artifacts. I actually talked a bit about that change at the SOTACon this weekend so not sure if people got wind of it from that or if great minds think alike and we came up with it in parallel.
     
  11. Chris

    Chris Tech Lord Moderator Ambassador SOTA Developer

    Messages:
    2,470
    Likes Received:
    27,551
    Trophy Points:
    190
    Gender:
    Male
    01/19/2017

    BAM. More optimization work payoff for load times. I think I've mentioned that we have one dedicated slave box that is used for nothing but load time testing. It runs a daily test on our dev server where it loads the game, logs in, loads Novia, then loads a map, then loads back to Novia and logs all the relevant load time information per scene. This is a modest, 4 year old i5 machine with 8GB RAM. Yesterday, Scrambler got in his changes to the AI to allow creation to be deferred along with a few other optimizations.

    So here are the 5 worst maps in yesterday's builds along with their times:

    Novia_R3_City_Brittany_Alley 45.8 seconds
    Novia_R3_Island01_01 43.7 seconds
    Novia_R3_City_Brittany 43.3 seconds
    Novia_R3_City_Brittany_Estates 39.2 seconds
    Novia_R7_Forest02_01 39.1 seconds

    And now in today's build:

    Novia_R3_City_Brittany_Alley 19.0 seconds
    Novia_R3_Island01_01 22.2 seconds
    Novia_R3_City_Brittany 25.3 seconds
    Novia_R3_City_Brittany_Estates 19.7 seconds
    Novia_R7_Forest02_01 20.7 seconds

    Yah, you read those numbers right. The 5 worst maps in the game had their load times reduced between 18 and 27 seconds. Can I get a "Hell yeah!"?

    This change does little to help smaller maps but those are doing better in general and need less love. More data to come shortly but first I have to take the new coder to lunch!
     
  12. Chris

    Chris Tech Lord Moderator Ambassador SOTA Developer

    Messages:
    2,470
    Likes Received:
    27,551
    Trophy Points:
    190
    Gender:
    Male
    10/20/2017

    Lots of little changes today.

    • Fixed the damage caused by a glancing blow. It was supposed to be a 1/3rd damage hit but was actually doing 1 to 1/3rd median damage which works out to be 1/6th damage.
    • Reduced the bonus from defensive stance by about 25%
    • Added "Block Power" bonus to the "Stand Your Ground" passive in the shield tree. Increases amount stopped by shield
    • ...
     
  13. Chris

    Chris Tech Lord Moderator Ambassador SOTA Developer

    Messages:
    2,470
    Likes Received:
    27,551
    Trophy Points:
    190
    Gender:
    Male
    10/23/2017-10/24/2017

    Crazy number of little bug fixes and tweaks. Too many to list here....

    I'll be out tomorrow for a funeral for my wife's 100 year old grandma. Back for launch on Thursday. Trying to get a solid build done tonight! Wish us luck.
     
    Thwip, Rhiannon, Beaumaris and 24 others like this.
  14. Chris

    Chris Tech Lord Moderator Ambassador SOTA Developer

    Messages:
    2,470
    Likes Received:
    27,551
    Trophy Points:
    190
    Gender:
    Male
    10/31/207

    Yay, final patch is out for R47 and I can breath again!

    R48 release is largely going to be focused on large group, multigroup, PVP, and dance party frame rates. Already making some big progress on these fronts. Just found a major performance leak (coroutine that was never cancelled and would build up over time) and refactored a buff system that caused major performance issues in these situations.
     
  15. Chris

    Chris Tech Lord Moderator Ambassador SOTA Developer

    Messages:
    2,470
    Likes Received:
    27,551
    Trophy Points:
    190
    Gender:
    Male
    Tap tap tap... anyone still checking this? :)

    Ok, after a few weeks off due to a CRAZY busy release, I'm jumping back into doing my daily blog.

    So first up, go donate to MY Mustache of the Avatar page! https://mobro.co/catnipgames?mc=1
    I'm tired of Dale Cooper and Starr getting all the monies!

    So today has also been crazy busy as we got ready for what we hope is our final patch of the release. Some people, especially on Macs, reported worse performance this release. I'm hoping this is fixed in today's build.

    That was the short version... here is the long one to kick off my return to blogging with some tech stuff. We are generally CPU bound on most boxes. We used to rely heavily on dynamic batching of graphics elements to reduce draw calls. That means that if there were 20 cups in the scene, it would make one new mesh that contained all the chairs in it and push that to the GPU instead to reduce the draw call count. Draw calls are generally what kill graphics performance not poly counts.

    Well, about 6 months ago we switched to using graphics instancing on the GPU. This basically lets us push one model for the chair to the GPU and then a list of places to draw it. This is far more efficient as it means we don't have to batch the meshes on CPU. After some testing, I turned this off for R48 because it actually seemed to hurt performance in most scenes. Well, turns out that how much this helps or hurts depends on your system. Many systems, especially Macs not running on Metal, saw huge decreases in performance. So dynamic batching will be re-enabled in the patch later today. Crossing our fingers that this fixes most of the performance issues.
     
  16. Chris

    Chris Tech Lord Moderator Ambassador SOTA Developer

    Messages:
    2,470
    Likes Received:
    27,551
    Trophy Points:
    190
    Gender:
    Male
    Back to work after an exten
    ded break!

    Held a meeting this morning to plan our attack on performance issues over the next two weeks. Rough break down on issues...

    • Based on ongoing profiling, problem is still largely the single threaded game loop on the CPU. Performance for almost all users is directly proportional to the speed of their CPU on one core.
    • We're seeing large, additional CPU cost for rendering higher screen resolutions. We should see higher GPU costs but not CPU except maybe a little time for copying buffers around.
    • We still have N Squared game loop issues. Those have to be dealt with. The worst is a function that returns a list of nearby entities. This should be a trivially cheap call but due to some extra baggage, it was eating up a quarter of the frame time during the last dance party profiling I did.
    • We have too many CPU performance problems that were originally fixed by only running them periodically. Doesn't help to only run stuff every 1/5th of a seconds if you're only running 5fps. Once we get into the death spiral of bad performance, staggering calls to functions doesn't improve performance. The slower the game gets, the more frequent and slower these staggered calls get which makes the game slower. Repeat until gridlock. :/
    • Have to work more on occlusion system. There is one built into Unity but it has always been horrible. If you could get it to work, it decreased GPU load by putting more load on the CPU which is the opposite of what we need. Going to do some serious testing of the changes they made to it for new version of Unity, 2017.2.
    • We need to dramatically decrease our RPC(Remote Procedure Call) count. Currently we have a number of very inefficient systems that send multiple RPCs when they should only send one. For example, someone playing an emote could send 4 or 5 RPCs when it should only send one. RPCs are fairly expensive and as they are sent based on events that do not scale with time, they will start piling up as frame rate drops.
    Also, had a 2 hour plus leads meeting just now.

    Working on all of these for R49! Wish us luck!

    Also HUGE THANKS to Xavier Starfall and also Margaritte McLean for their donations to my Movember fundraiser! If anyone else wants to help make sure I stay ahead of Starr, go here and give me a few bucks! https://mobro.co/catnipgames?mc=1

    BTW, update on my "porn 'stache" progress with OneAndOnly looking on from behind:

    [​IMG]
     
  17. Chris

    Chris Tech Lord Moderator Ambassador SOTA Developer

    Messages:
    2,470
    Likes Received:
    27,551
    Trophy Points:
    190
    Gender:
    Male
    BAM! Major performance progress today!! But before I talk about that, first a huge shout out to Hannah Alpenglow and also, to Envy, you sir are truly legend! If anyone still wants to donate, I would say help out some of my MustacheOfTheAvatar team members as I'm starting to feel sorry for them now! https://moteam.co/moustache-of-the-avatar

    Ok, back to performance talk...

    So first off, a little tech explanation for some terms you've probably heard me or one of the other coders use. The term "N Squared" is a common tech term that refers to problems that get worse in a non-linear way. So if something is constant time, that is awesome. If it is 1 ms (millisecond) cost in one frame then it cost 1 ms every frame no matter how complex.

    Then there are elements that scale in a linear manner or N. So if you have 1 player it might cost 1 ms and if you have 5 players, it might cost 5ms because each of them has to run it. This is less than optimal and we can sometimes work around these issues and make it constant by basically doing 1 per frame rather than doing all 5 in one frame.

    Then there are the evil N Squared *gasp* performance problems. So this would be something where you have to do something per thing per thing, not a typo... So using the previous example this is something that needs to be calculated for every player for every other player out there. So with 1 player it might cost 1 ms but with 5 it cost 25 ms and with 10 it would cost 100ms! This is evil and should avoided and we had a few instances of these in the game. Oh, and for Umuri or the other techy guys out there, Yes, I know that a test per player per player for 5 players would really be Summation (N-1)->i=11 Xi in the commonly optimized way but you can bite me, I'm calling in N Squared. Common examples of N squared stuff are bubble sorts and visibility or relevance calculations. Anyways, these things are evil... and we're killing them.

    Before I jump in to talk about what improvements we made that will make players cheer I'll go over another techy topic, what these stupid ms (milliseconds) mean and why you care! So I think most people know that an ms is a millisecond or 1/1000th of a second. Now to put that in terms of stuff you're probably even more familiar with, if we want our game to run at 60 fps (frames per second), that means each frame must 1 second divided by 60 or less in length. So in ms, that is 1000ms/60 = 16.666 ms for 60 frames per second. For 30 fps it is 1000ms/30 = 33.333ms. 30fps is the minimum a game should run to look good. Below that it starts getting choppy and feeling less cool to even casual gamers. Also worth noting that the GPU AND the CPU need to average less than those times because the game will run at the slower of the two. If the CPU is slower, the GPU doesn't get the information it needs in time. If the GPU is slower, the CPU has to wait. The GPU and CPU don't run in lock step, btw, as the GPU can run a frame or even two frames behind the CPU.

    So now that we got that out of the way, at the last dance party the average frame times we were seeing were around 70-80ms in medium quality on my machine. That means roughly 12-13fps, which sucks. Of that 70-80ms was a single function that was an N Squared problem doing tests from every entity to every entity. That function was eating up in the 16-20ms range. In other words, if all we were doing was running that one function, we still wouldn't be doing 60fps most the time.

    So as of today, that function has been rewritten to be a constant time function that will run in less than 0.01 ms and in roughly constant time. So 20ms to 0.01ms. /cheer That was the first big item...

    Next big item was a GPU and CPU bottleneck, our terrain shader. We have used the same triplanar shader for 3 years. We're so used to it we don't even think about it. (I'll save explaining what a triplanar shader and why it is important for terrain until tomorrow) Today I did some evaluation on it and found it sucks. The per pixel cost to render it is hideous. But wait, it should fall back to a cheap renderer at a distance, right? Buzz! Because of some bugs in a couple of different systems, world builders were turning the point where it switches to the fast renderer to be basically infinity! Yikes!

    So changing our terrain shader would be months of work and not an option which leaves getting the fall back shader issues fixed. So upon further investigation there were two bugs blocking them from turning it to a reasonable high quality to low quality switch point. First, textures on terrain have to be set to be read/write for them to work in the fast map generation. Read/Write textures are textures that get loaded both into the GPU and CPU memory. We avoid them if possible because they double the memory footprint. If they aren't it just generates a white textures for the fast shader and looks horrible. Unity was just quietly ignoring this issue until a recent release where they added a warning. /cheer! Better late than never!

    Second issue is that the UV mapping of our triplanar shader has a UV density that doesn't match the base map generator. So at a distance, when it would switch to a different qualtiy, the texture scale would explode and be obvious!

    So, we fixed all the textures that were not read write and I updated the terrain shader to match the base map UV. Tomorrow I will batch export 400 maps with terrain with new values so that the near and far shaders match and then we can turn down the distances!

    So what's the gain for all this work? In my test case of standing on the docks in Brittany and looking at the town area, this one change cut the total GPU render time by 33% and shaved another 2-3ms off the CPU time. This is huge but even more huge is that this cost was one of the costs that scaled proportionately with pixel count. So players trying to run at 4k were suffering even more on both the CPU and GPU.

    I have to run get an amazing 3 year now so I'll stop here but I'll write some more tomorrow!

    Also, dedicating this post and tomorrow's to all the people who donated to make my porn'stache worth the suffering!
     
  18. Chris

    Chris Tech Lord Moderator Ambassador SOTA Developer

    Messages:
    2,470
    Likes Received:
    27,551
    Trophy Points:
    190
    Gender:
    Male
    BAM. Tons of progress being made on performance! I think we won't get it all fixed this release but we're definitely making some big leaps on speeding up the game loop code and reducing graphics with little or no downside.

    Ok, so I promised a quick description of what a "Tri-planar shader" does. For fun and as an Office Space tribute, I'll refer to this as a TPS for the rest of today.

    So, I can't really adequately explain what a TPS is without first explaining how terrain systems work. So, first, why do games need a terrain system? Well, creating and simulating ground is tough! We need something that can render fast, is easy to edit, and doesn't take up a ton of memory despite having to make up the bulk of outdoor maps. Solution? A terrain system!

    Unity uses the most common style terrain system which is a height map based system. So rather storing the terrain as a bunch of polygons, instead it stores the elevation in a giant 2d array of points, much like a greyscale image. The higher the value at each point the higher the elevation. This is pretty much like a grey scale topographic map. For an example of one, here is what Australia would look like:
    [​IMG]
    The bright white areas are high elevation areas. The low areas are darker, possibly desert areas?

    Anyways, the terrain engine uses the elevation of the points to build lists of triangles by calculating in game positions for the points and connecting adjacent points. While this sounds costly, it is actually pretty fast and can be cached off so it doesn't rebuild each frame. The beauty of using a system like this is it also allows easy, level of detail based on range from the camera.

    So imagine the grid is 512 x 512 elevation points. The engine breaks this up into 32 x 32 point chunks. so a grid of 16 x 16 of chunks that are each 32 x 32 points. For chunks that are further away, when it builds it's mesh of triangles from the points, instead of using every point, it uses every other point. For stuff really far away, maybe it only uses every 4th point. This greatly reduces the polygons that must be created to represent the points which means we'll get much better performance.

    So painting textures onto the terrain is also done with a giant grid. A set of textures is assigned to the map and you can "paint" the textures onto the mesh with different weights. Very fast production speed and easy for artists to understand! There is a down side though which is due to both height and painting information being stored in a single 2d plane. If you have areas that have large vertical changes, that doesn't increase the density of the texture. So the result of all that is that cliffs and steep hills and shorelines end up with some weirdly stretched visuals on terrain systems.

    So, the standard shader for terrains essentially only renders in 2d to one plane and the results are then stretched into 3d. The triplanar shader applies textures fairly evenly in 3d without stretching stuff horribly.

    [​IMG][​IMG]


    So, though the shader can do cool stuff, it is super expensive and was breaking our fallback methods for faster rendering. The fallback has now been fixed so stuff at a distance will render with a fast shader and the stuff up close will render with TPS.
     
    Raven Swiftbow, Womby, Gia2 and 36 others like this.
  19. Chris

    Chris Tech Lord Moderator Ambassador SOTA Developer

    Messages:
    2,470
    Likes Received:
    27,551
    Trophy Points:
    190
    Gender:
    Male
    Out sick yesterday but sort of well today. Mostly just in to try and infect other people...

    Continuing work on performance. We're in an ongoing battle with Unity's CPU side render performance. Right now we're still losing but hoping to change that this week.
     
  20. Chris

    Chris Tech Lord Moderator Ambassador SOTA Developer

    Messages:
    2,470
    Likes Received:
    27,551
    Trophy Points:
    190
    Gender:
    Male
    Detailed explanation of the math behind the experience point "soft cap". I call it a soft cap, because the xps you gain decreases once you hit 1mln/hour but they don't go away. Also, it doesn't have some count that resets once an hour. Ok, some tech design explanations coming up so don't freak if you don't understand. Going to talk about the challenges and then the implementation.

    Design and tech requirements:
    • Reduce applied experience once player exceeds roughly 1mln/xp per hour over time
    • Must run on the server and be managed by the server (duh..)
    • Must not be reset by logging out for a few seconds and then back in again
    The last one is the part that makes it tricky. Since we have to save the state, it is impractical to just write out a log of all the stuff you killed in the last hour with a time stamp. That would quickly become a serious burden on the server and be a ton of data to write out.

    To achieve nearly the same result with just two values, here is the design I came up with. Reminder, players don't need to know the implementation, just when it impacts them.

    First number is an XP Accumulator value.
    Second number is the server time you last gained xps.

    So math works something like this:


    When the player gains xps from killing something (questing doesn't count against it) do the following:
    • Calculate hours since last xp gain X 1mln xps and subtract it from the accumulator but accumulator can't below 0. Note, hours will almost certainly be a tiny number like 0.0083 if you're killing stuff every 30 seconds.
    • Is accumulator > 500,000? If yes, decrease the amount to be given out on a sliding curve based on how much beyond 1mln with a theoretical max of around 2mln.
    So it subtracts 1mln xps an hour spread out over the hour. The 500,000 number is basically to give players a half an hour buffer before we start reducing the xps. So the reality is that you could login and earn 1.5mln xps in the first hour, log out for a half hour, come right back and do it again and never have reduced experience. Also, you could early 500k xps in 2 minutes and never see a penalty.


    If you don't understand the math, don't sweat it. Just know that you can average a million xps an hour and if you go too far over that over a long period of time, you'll start seeing diminishing returns for xps that exceed 1mln per hour.
     
  21. Chris

    Chris Tech Lord Moderator Ambassador SOTA Developer

    Messages:
    2,470
    Likes Received:
    27,551
    Trophy Points:
    190
    Gender:
    Male
    Just fixing bugs the last few days.

    Just a heads up that I just discovered something that apparently was believed to be a feature that is actually a bug. Fixing it will make ranged users rage but honestly, I have to fix it and I'm shocked I'm just now hearing about it. Rapid fire was NEVER supposed to get more shots when stacked. It does more damage already. Doing extra shots at the same time means the total damage from it is off the charts.

    The other thing that I will be fixing with it is that it continues even if the target takes cover half way through. Once it starts, you can't avoid it. This is because it was actually setup as a DOT with normal ticks instead of a sequence of unique effects. That means the line of sight checks were only being done once.
     
    Last edited: Dec 12, 2017
  22. Chris

    Chris Tech Lord Moderator Ambassador SOTA Developer

    Messages:
    2,470
    Likes Received:
    27,551
    Trophy Points:
    190
    Gender:
    Male
    Due to rage over the bug fix for Rapid Shot, I will be adding the entire ranged tree to the 100% unlearn list.

    Also, other changes today that were both needed and help high end ranged, Piercing Shot will no longer be blockable by shields.

    Additionally, melee attacks that currently are listed as "Armor Piercing" will, brace yourselves, ignore damage avoidance... *drops microphone and walks off stage*

    This change primarily helps ranged and polearms. It also gives a PVP counter to the high damage avoidance players.
     
  23. Chris

    Chris Tech Lord Moderator Ambassador SOTA Developer

    Messages:
    2,470
    Likes Received:
    27,551
    Trophy Points:
    190
    Gender:
    Male
    RELEASE DAY!

    As of 4PM I believe I identified and fixed the issue that was causing massive frame rate loss and memory leaking for some players. This will be fixed for the morning patch.
     
    Raven Swiftbow, Womby, Thwip and 18 others like this.
Thread Status:
Not open for further replies.