Networking in UE4: Server Optimizations | Live Training | Unreal Engine

>>AMANDA BOTT: HEY THERE UNREAL DEVS – WELCOME TO THIS WEEK’S NEWS AND COMMUNITY SPOTLIGHT! FIRST UP, QC GAMES, MAKERS OF BREACH A THIRD PERSON ACTION RPG WITH FAST-PACED COMBAT – DETAILED HOW THEY DEVELOPED A SET OF SYSTEMS TO CREATE FLEXIBLE, DATA-DRIVEN WAYS TO CREATE CHARACTER ABILITIES IN BREACH, PLAYERS CAN CREATE THEIR OWN CHARACTER AND CHOOSE FROM DOZENS OF CLASSES AS THEY EMBARK ON A VARIETY OF MISSIONS ACROSS THE GLOBE IN SOLO, CO-OP, OR PVP MODES LEARN MORE ABOUT THE TOOLS THAT ALLOWED THEIR ARTISTS AND DESIGNERS TO COMPOSE ABILITIES IN THE INTERVIEW BELOW. ALSO BE SURE TO CHECK OUT BREACH AS IT LAUNCHED INTO STEAM EARLY ACCESS TODAY! BASED ON A SWEDISH PEN-AND-PAPER RPG OF THE SAME NAME, MUTANT YEAR ZERO BRINGS ITS FANTASTICAL WORLD TO LIFE IN A TACTICAL ADVENTURE GAME, COMBINING THE TURN-BASED COMBAT OF XCOM WITH STORY, EXPLORATION, STEALTH, AND STRATEGY WIDELY WELL-RECEIVED AMONGST FANS AND CRITICS ALIKE, MUTANT YEAR ZERO DOUBLES DOWN ON A STRONG NARRATIVE AND ENDEARING CHARACTERS YOU CAN’T HELP BUT LOVE ITS WORLD, A POST-APOCALYPTIC LANDSCAPE OF OVERGROWN CITIES AND CRUMBLING REMNANTS OF A CIVILIZATION LONG PASSED, IS BEAUTIFULLY BROUGHT TO LIFE IN UE4 IN AN INTERVIEW WITH US, THE BEARDED LADIES SHARE THE INTRICACIES OF DEVELOPING WITH UNREAL ENGINE, CREATING THESE UNIQUE CHARACTERS, AND CRAFTING A TACTICAL STRATEGY GAME THAT MANAGES TO BREAK THE MOLD TO DRAW IN NEW FANS LEVERAGING THE SCRIPTABILITY OF THE EDITOR WITH PYTHON, THEIA INTERACTIVE BEGAN COMPILING THEIR MOST COMMON WORKFLOWS, SUCH AS IMPORT PROCESSES OR THE GENERATION OF UVS, INTO REPEATABLE SCRIPTS TO HELP THEM SAVE HOURS OF WORK! WITH A FRESH GRAPHICAL INTERFACE, OPTIM WAS BORN — THE TOOL ALLOWS YOU TO ANALYZE YOUR DATASMITH AND CAD FILES BEFORE YOU IMPORT THEM INTO UNREAL ENGINE THEIA WILL BE OFFERING OPTIM AS A SUBSCRIPTION SERVICE LATER THIS YEAR, BUT THEY’RE CURRENTLY ACCEPTING APPLICATIONS FOR ALPHA TESTERS AT THEIA.IO/OPTIM THE GLOBAL GAME JAM KICKS OFF NEXT FRIDAY, THE 25TH! WE’RE THRILLED TO BE A PART OF THE WORLD’S LARGEST JAM EVENT AND HAVE GATHERED RESOURCES TO HELP YOU PREPARE IF YOU’RE PARTICIPATING INCLUDING UE4 FOR GAME JAMS LIVESTREAM WITH TOM SHANNON WE ARE ALSO RAFFLING SWEET SWAG BAGS, WHICH INCLUDE AN UNREAL ENGINE BACKPACK, TO THOSE THAT SUBMIT A COMPLETE GLOBAL GAME JAM ENTRY IN UE4. SIGNUP ON THE PAGE LINKED BELOW TO LET US KNOW IF YOU’LL BE JAMMING! NOW FOR THIS WEEK’S KARMA EARNERS – MANY THANKS TO THESE INCREDIBLE FOLKS HELPING OUT ON ANSWERHUB! ZOLTANE, THE_BATCH, JACKY TUERER, COALFIREGAMING, KRISTOFMORVA BENVLODG, THOMPSONN13, SALIHBALKAN NEBULA GAMES INC YOU ALL ARE ABSOLUTELY MAJESTIC ONTO OUR SPOTLIGHTS FOR THIS WEEK! FIRST ON THE LIST IS WHAT NEVER WAS ACKEHALLGREN’S SHORT, STORY-DRIVEN FIRST-PERSON GAME FROM THE PERSPECTIVE OF SARAH, A TEENAGER TASKED WITH CLEANING OUT HER RECENTLY DECEASED GRANDFATHER’S ATTIC SHE FINDS THAT NOT EVERYTHING IS WHAT IT SEEMS ONTO OUR SECOND SPOTLIGHT: THINK ARCADE, A STUDENT TEAM FROM SMU GUILDHALL, RECENTLY LAUNCHED FROSTRUNNER, A FIRST-PERSON PLATFORMER SPEEDRUNNING GAME FOR PC THE GAME HAS HAD OVER 50,000 DOWNLOADS IN LESS THAN 10 DAYS WITH VERY POSITIVE REVIEWS, AND IT’S FREE ON STEAM, SO BE SURE TO CHECK IT OUT, AND OUR MANY CONGRATS TO THE TEAM! THIS BEAUTIFUL BAROQUE ROOM IS THIS WEEK’S FINAL SPOTLIGHT DEVELOPED OVER THE COURSE OF THE LAST 8-9 MONTHS, IRAKLI KUPUNIA PIECED TOGETHER ALL THE ELEMENTS AND YOU CAN SEE A MORE DETAILED BREAKDOWN ON HIS ARTSTATION PAGE BE SURE TO CHECK IT OUT! THANK YOU FOR JOINING US FOR THIS WEEK’S NEWS AND COMMUNITY SPOTLIGHT >> AMANDA BOTT: HI, AND WELCOME TO OUR UNREAL ENGINE LIVESTREAM I’M YOUR HOST, AMANDA BOTT WITH ME, YOU HAVE RYAN GERLEVE AND DAVE RATTI FOR FROM OUR NETWORKING TEAM, THANK YOU SO MUCH FOR JOIN US, AND FELLOW COMMUNITY MANAGER, TIM SLAGER >>TIM SLAGER: HI, WELCOME >>AMANDA: SO WE’RE TALKING ABOUT SOME SERVER OPTIMIZATIONS, RIGHT? >>RYAN GERLEVE: THAT’S RIGHT, YEAH SO I FIGURED I WOULD COVER SOME HIGH LEVEL OVERVIEW OF HOW THE REPLICATION SYSTEM WORKS AND, BASED ON THAT, HELP YOU GUYS GET A BETTER UNDERSTANDING OF MAYBE HOW TO OPTIMIZE YOUR MULTI-PLAYER GAMES ON THE SERVER WE KNOW THAT CAN BE A CHALLENGE, REPLICATION IS, COMMONLY A COST WE SEE IN PROFILES, STAT CAPTURES AND SO ON. I THOUGHT IT WOULD BE GOOD TO GO OVER THE TECHNIQUES YOU CAN USE WITHOUT NECESSARILY GOING IN AND MODIFYING THE ENGINE TO GET SOME PERFORMANCE THERE

>>AMANDA: SO VERY, VERY IMPORTANT HOW DOES — SO A LOT OF PEOPLE TUNED IN LAST SUMMER WE COVERED THE REPLICATION GRAPH SO HOW DO THESE — >>TIM SLAGER: I WAS LIKE, OH, I WASN’T HERE FOR THAT BUT NOW REMEMBER THE CONVERSATION >>AMANDA: HOW TO DO THESE PIECES WORK TOGETHER? >>RYAN G: A LOT OF THE OPTIMIZATIONS I’M GOING TO COVER WORK WITH THE LEGACY NET DRIVER, AS WE ARE CALLING IT NOW INTERNALLY, AND WITH THE REPLICATION GRAPH I WILL TRY TO REMEMBER TO POINT OUT ANY CASES WHERE THERE MIGHT BE DIFFERENCES BETWEEN THE TWO THE THINGS I WILL COVER WILL BE OPTIMIZATIONS YOU CAN DO OUTSIDE OF USING A REPLICATION GRAPH, AND THEN THE REPLICATION GRAPH IS KIND OF AN ADDITIONAL STEP YOU CAN TAKE THAT WILL UNLOCK MORE OPTIMIZATIONS, BUT IT MAY REQUIRE MORE WORK, MORE IN-DEPTH KNOWLEDGE OF HOW YOUR SPECIFIC GAME WORKS TO SQUEEZE THE MOST OUT OF IT, I GUESS >>AMANDA: OKAY, GREAT WE WILL DO OUR Q&A AT THE END, SO FEEL FREE TO ASK QUESTIONS IN THE CHAT AS THEY COME UP, AND THEN BRIAN WILL ADDRESS GENERAL QUESTIONS, AND DAVE, THE REPLICATION GRAPH EXPERT, FEEL FREE TO DIVE IN >>RYAN: AS A HIGH-LEVEL OVERVIEW, OR FOR THOSE THAT ARE NEW TO THE ENGINE OR WRITING MULTIPLAYER GAMES IN THE ENGINE, AT A HIGH-LEVEL, IT DESCRIBES HOW WE REPLICATE PROPERTIES TO CLIENTS, AND THAT WILL HELP PROVIDE A FRAMEWORK AND ALLOW YOU TO BETTER UNDERSTAND WHY SOME OF THESE OPTIMIZATIONS ARE USEFUL IN HOW THEY WORK YOU ALL ARE PROBABLY FAMILIAR, YOU CAN GO IN AND MARK, PROPERTIES ON YOUR REPLICATED ACTORS AS REPLICATED AND THEN THE ENGINE WILL AUTOMATICALLY MAKE SURE THOSE NEW VALUES GET SENT TO CLIENTS WHO ARE CONNECTED THE WAY IT ACCOMPLISHES THIS, IS EVERY FRAME WE RUN ON THE SERVER FOR REPLICATION, IT WILL LOOK THROUGH ALL OF THE REPLICATED ACTORS IN THE WORLD, IT WILL LOOK FOR THE REPLICATED PROPERTIES ON THOSE ACTORS, DO A COMPARISON TO SEE WHICH HAVE CHANGED, AND FOR THE ONES THAT HAVE CHANGED, SEND THEM OUT OVER THE NETWORK TO CLIENTS THIS RESULTS IN A LOT OF THE — OR THIS IS THE CAUSE OF A LOT OF THE CPU COSTS ON SERVERS IT HAS TO DO THE COMPARISON AND THE SERIALIZATION SO IN A LOT OF CASES YOU CAN SAVE ON SERVER CPU TIME BE REDUCING THE AMOUNT OF THESE COMPARISONS THE SERVER HAS TO DO THE MAIN WAY TO CONTROL THIS IS THROUGH THE UPDATE FREQUENCY VALUE, WHICH IS CONFIGURABLE ON EVERY ACTOR CLASS I WILL SEE IF I CAN BRING UP AN EXAMPLE HERE >>AMANDA: SO WE JUST PULLED UP THE SHOOTER GAME MAP >>RYAN: YES THIS IS DIFFERENT THAN HOW IT IS SET UP AT MY DESK. I APOLOGIZE >>TIM S: EVERYONE HAS THEIR LITTLE SET UP FOR EVERYTHING, SO IT IS FUN >>AMANDA: SO YOU ARE LOOKING FOR ACTOR? >>TIM S: IT IS A PER-ACTOR CONFIGURATION, OR CAN YOU CONFIGURE FOR THE ENTIRE PROJECT? >>RYAN: IT IS PER ACTOR, SO YOU CAN CONFIGURE A DEFAULT FOR ANY OF YOUR ACTOR CLASSES AND ON EACH INSTANCE, YOU CAN POTENTIALLY OVERRIDE IT IF YOU WOULD LIKE >>TIM: GOT IT >>RYAN: SO I WILL BRING UP THE REPLICATION HERE A LOT OF YOU MAY BE FAMILIAR WITH SOME OF THESE SETTINGS THE ONE I WAS REFERRING TO WAS THE NET UPDATE FREQUENCY RIGHT HERE, WHICH DEFAULTS TO 100, IT IS KIND OF — MAYBE A HIGH VALUE KEEP IN MIND, THIS WILL BE CLAMPED TO THE FRAME RATE YOUR SERVER IS RUNNING SO IF YOU HAVE YOUR SERVER IS CONFIGURED TO RUN AT 30 OR 60 FRAMES PER SECOND, IT IS NOT GOING TO BE ADDITIONAL REPLICATION UPDATES BEYOND THE NORMAL TICK RATE OF THE SERVER IN A LOT OF CASES, YOU DON’T NECESSARILY NEED TO UPDATE ALL OF YOUR REPLICATED ACTORS EVERY SERVER FRAME SO CERTAIN ACTORS THAT AREN’T CHANGING AS OFTEN, YOU COULD LOWER THIS VALUE AND THEN YOU SAVE ALL THE TIME THAT WOULD NORMALLY BE TAKEN ON CONSIDERING THOSE ACTORS FOR REPLICATION AND COMPARING THOSE PROPERTIES LIKE I MENTIONED EARLIER GENERALLY, FOR ACTORS — LIKE IN MOST GAMES, ACTORS LIKE MOST CHARACTERS OR PAWNS THAT ARE MOVING AROUND ALL THE TIME, YOU WANT TO KEEP THE NET UPDATE FREQUENCY HIGHER SO THAT MOTION IS AS SMOOTH AS POSSIBLE AND YOUR GAME LOOKS RESPONSIVE AND IT IS FUN TO PLAY

FOR OTHER ACTORS, THAT MAY NOT NECESSARILY HAVE A VISUAL REPRESENTATION IN THE WORLD THAT IS IMPORTANT TO BE UP TO DATE ALL THE TIME, LIKE MAYBE SOME OF YOUR PLAYER STATE OR GAME STATE CLASSES, YOU MIGHT BE ABLE TO PLAY WITH A LOWER FREQUENCY THAT’S ONE THING TO LOOK AT ANOTHER THING IS THIS NET CULL DISTANCE, RIGHT ABOVE HERE, SOME OF YOU MAY BE FAMILIAR WITH THIS, OR THE CONCEPT OF RELEVANCY AS WE REFER TO IT, THIS IS THE DISTANCE AT WHICH OBJECT WILL BE CULLED FOR CERTAIN CONNECTIONS SO EACH CLIENT CONNECTION IS BASED ON WHERE THEIR CONTROLLED PAWN IS IN THE WORLD, AND THIS CULL DISTANCE WILL DETERMINE HOW FAR AWAY AN OBJECT HAS TO BE FROM THE PAWN IN ORDER TO BE SENT TO THAT CLIENT IF WE ALWAYS HAD TO REPLICATE EVERY OBJECT, EVERY REPLICATED OBJECT IN THE WORLD TO EVERY CLIENT, THAT CAN ADD UP VERY QUICKLY AND OVERWHELM THE SERVER WE ONLY TRY TO REPLICATE THINGS THAT ARE NEARBY AND RELEVANT TO ANY GIVEN CONNECTION DEPENDING ON THE GAME, HOW IT IS DESIGNED, AND HOW LONG THE SITE LINES ARE AND THINGS LIKE THAT, YOU MIGHT BE ABLE TO ADJUST THIS AND TIGHTEN IT UP FOR VARIOUS ACTORS IN YOUR GAME >>TIM: SO YOU COULD HAVE A THOUSAND CLIENTS CONNECTED ALL AT THE SAME DISTANCE, AND AS LONG AS IT IS CULLED — YOU WON’T HAVE TO WORRY ABOUT IT ON THE THOUSAND CLIENTS AS SOON AS ONE PERSON STEPS FORWARD, IT STARTS FOR THAT PARTICULAR CLIENT — >>RYAN: THAT IS RIGHT, YOU HAVE TO USE A LOT OF OPTIMIZATION TECHNIQUES TO GET A THOUSAND PLAYERS ON THE SERVER >>TIM: CERTAINLY >>RYAN: BUT, YES, THAT IS THE IDEA REPLICATED OBJECTS WILL ONLY BE SENT TO AND PROCESSED FOR CLIENTS WITHIN THEIR CULL DISTANCE >>TIM: GOTCHA >>DAVE: FORCE NET UPDATE? >>RYAN: YES, THAT IS THE NEXT POINT I SHOULD HAVE COVERED THAT WHEN I WAS TALKING ABOUT UPDATE FREQUENCY I DON’T KNOW IF THERE ARE ANY — >>DAVE:YOU CAN PROBABLY JUST OPEN THE BLUEPRINT EDITOR JUST USE A BEGIN PLAY, OR SOMETHING LIKE THAT >>RYAN: FORCE NET UPDATE IS A FUNCTION YOU CAN CALL FROM C++, AND WHAT THIS DOES IS, REGARDLESS OF WHAT THE UPDATE FREQUENCY PROPERTY IS SET TO FOR YOUR ACTOR, IT WILL FORCE THE ACTOR TO DO A REPLICATION UPDATE ON THE CURRENT FRAME EVEN IF YOU HAVE AN ACTOR WITH A VERY LOW NET FREQUENCY, IF SOMETHING VERY IMPORTANT HAPPENS, SOME PROPERTY CHANGES THAT IS IMPORTANT TO GET OUT TO CLIENTS SO THEY SEE SOME REACTION OR SOMETHING HAPPEN IN THE WORLD, YOU KNOW, A DOOR OPENS FOR EXAMPLE, ONE-SHOT EVENTS LIKE THAT ARE A GOOD CANDIDATE FOR THIS WHERE, MOST OF THE TIME, YOU CAN HAVE A VERY LOW UPDATE FREQUENCY — YOU KNOW, ONCE EVERY 10 SECONDS, OR EVEN LESS, ONCE EVERY SECOND IT DEPENDS ON THE OBJECT AND THE SPECIFICS OF YOUR GAME EVEN IN THOSE CASES, IF SOMETHING HAPPENS INBETWEEN UPDATES, YOU CAN CALL THIS AND FORCE IT TO HAPPEN THIS IS ONE OF THE EASIEST WAY TO SQUEEZE PERFORMANCE OUT OF A GAME SERVER WE USE THIS HEAVILY IN INTERNAL GAMES IN FORTNITE AND IT IS HUGELY IMPORTANT FOR SERVER PERFORMANCE I HIGHLY RECOMMEND YOU LOOK INTO THIS FOR REPLICATED OBJECTS THAT ARE EXPENSIVE ANOTHER TRICK YOU CAN DO WITH NET UPDATE FREQUENCY IS TO USE THE ADAPTIVE UPDATE FREQUENCY, IT IS A CVAR — I DON’T THINK I HAVE VISUAL STUDIO PULLED UP AT THE MOMENT BUT THERE IS A CVAR NET.USEADAPTIVENETUPDATEFREQUENCY, WE HAD IMPLEMENTED IT A WHILE AGO, I FORGET THE VERSION IT ORIGINALLY CAME OUT IN, AND WE ENDED UP DISABLING IT AGAIN BY DEFAULT IN 4.19 BECAUSE IT WAS CAUSING ISSUES IF YOU ENABLE THIS, THE ENGINE WILL AUTOMATICALLY TRY TO DETERMINE THE UPDATE FREQUENCY OF YOUR ACTORS OVER TIME BASED ON HOW OFTEN THEY ARE CHANGING WHEN THE ENGINE DOES ITS OWN PROPERTY COMPARISON IF YOU HAVEN’T UPDATED THE NET UPDATE FREQUENCY ON YOUR ACTOR, THE ENGINE WILL START RAMPING DOWN THE FREQUENCY TO SAVE TIME THE ISSUE THIS WAS CAUSING IS THAT WITHOUT ADDING FORCE NET UPDATE CALLS TO YOUR CODE, YOU WERE SEEING HIGHER LATENCY FOR ACTIONS

AFTER THE FREQUENCY OF AN ACTOR HAD BEEN LOWERED SO WE DISABLED IT BY DEFAULT IN 4.19 TO PREVENT SITUATIONS WHERE PEOPLE ARE SEEING HIGHER LATENCY IN THEIR GAMES, BUT THE CVAR IS STILL THERE, THE FEATURE STILL WORKS, AND WE ACTUALLY — IT IS ENABLED IN FORTNITE WE USE IT THERE, BUT WE ALSO MAKE AGGRESSIVE USE OF FORCE NET UPDATES TO MITIGATE THESE ISSUES SOMETHING ELSE TO CONSIDER ANOTHER THING TO THINK ABOUT WITH FREQUENCIES IS THAT SINCE FREQUENCY IS CONTROLLED ON A PER-ACTOR BASIS, YOU MAY HAVE SOME INDIVIDUAL PROPERTIES ON A GIVEN ACTOR THAT MAY NOT NEED TO UPDATE AS OFTEN AS OTHERS SO THIS MAY FORCE A CERTAIN ACTOR TO NEED A HIGH FREQUENCY, EVEN THOUGH IT MAYBE HAS A LOT OF REPLICATED PROPERTIES THAT DON’T UPDATE AT THE SAME FREQUENCY AS OTHER ONES SINCE YOU CAN’T CONTROL FREQUENCY PER PROPERTY, IN SOME CASES IT MIGHT BE WORTH CONSIDERING BREAKING OUT YOUR ACTORS INTO MAYBE MULTIPLE ACTORS WHERE ONE OF THEM HAS THE INFORMATION THAT NEEDS TO BE UPDATED ADD A HIGH FREQUENCY, AND THE OTHER ACTOR CAN HAVE THE REST OF THE INFORMATION AT A LOW UPDATE FREQUENCY, BECAUSE THERE IS A COST TO CHECKING ALL THOSE OTHER PROPERTIES, EVEN IF THEY HAVEN’T CHANGED >>DAVE: THIS GOOD FOR PROPERTIES THAT ARE SET ON SPAWN AND DO NOT CHANGE THE LIFETIME OF THE ACTOR, BUT YOU NEED TO AUTHORITATIVELY SET THEM ON THE SERVER AND REPLICATE THEM DOWN ONCE SPLITTING THEM UP ON DIFFERENT ACTORS IS A GOOD WAY TO WORK AROUND THAT >>RYAN: GOOD POINT, AND BEFORE DIVING INTO ANY OF THESE TOO FAR, IT IS WORTH THINKING ABOUT — IF YOU CAN REDUCE THE OVERALL NUMBER OF REPLICATED ACTORS OR REPLICATED PROPERTIES IN YOUR GAME — YOU KNOW, MAYBE INSTEAD OF REPLICATING MULTIPLE INTEGERS, YOU CAN PACK A BUNCH OF DATA INTO A SINGLE BIT FIELD, FOR EXAMPLE MAYBE YOU CAN ENCODE STRINGS AS SOME OTHER ENUM VALUES OR SOMETHING LIKE THAT IT WILL BE HIGHLY DEPENDENT ON YOUR INDIVIDUAL GAME AND INDIVIDUAL USE CASE BUT ALWAYS BE AWARE OF EVERY REPLICATED VARIABLE YOU HAVE WILL ADD A COST, AND THOSE CAN ADD UP IN LARGE GAMES AND WITH LARGE ACTORS SO ALWAYS THINK ABOUT THAT AS WELL I GUESS, I CAN SHOW SOME OF THE NET PROFILER TOOL, WE’LL SEE HOW THE LIVE DEMO GOES >>AMANDA: SORRY ABOUT THAT, WE HAD A FEW TECHNICAL DIFFICULTIES SORRY TO INTERRUPT SO WE ARE TALKING ABOUT THE PROFILER, RIGHT? >>RYAN: YEAH, SO I WAS JUST ABOUT TO — I BROUGHT A SESSION OF SHOOTER GAME WITH DEDICATED SERVER ENABLED, I WAS GOING TO GRAB THE PROFILE NETWORK CAPTURE AND OPEN IT IN THE PROFILER TO SHOW YOU WHAT IT IS ALL ABOUT AND ALL THE USEFUL INFORMATION YOU CAN GET OUT IT THERE ARE A FEW WAYS TO OPEN UP THE PROFILER, THE EASIEST WAY IS TO BRING UP A CONSOLE AND TYPE “NETPROFILE”, WHICH WILL TOGGLE IT I WILL JUST RUN AROUND A LITTLE BIT, DO A LITTLE BIT, MAYBE TRY TO FIND SOME AMMO THEN TYPE “NETPROFILEDISABLE” TO STOP RECORDING, THEN BRING IT UP THIS IS THE TOOL. THE UI IS PRETTY OLD, AND I APOLOGIZE FOR THAT THERE IS SOME, YOU KNOW, SOME THINGS CAN BE IMPROVED HERE, BUT THERE IS STILL A LOT OF INFORMATION YOU CAN GET OUT OF IT THIS IS LOCATED IN THE ENGINE/BINARIES.NET FOLDER, I BELIEVE NOW WE HAVE TO FIND WHERE THIS BUILD WAS SO ONE SECOND WHILE I DO THAT >>AMANDA: THE BUILD ITSELF IS IN DIRECTORIES >>RYAN: THIS ONE, RIGHT? >>DAVE: IS IT IN TEMPLATES? >>AMANDA: TRYING TO REMEMBER WHERE IT IS? WOULD IT BE IN THE PROJECT FILE, OR THE ENGINE FOLDER ITSELF? >>DAVE: THE PROJECT FILE >>RYAN: AH >>AMANDA: I KNOW, WE’RE MONSTERS, KEEPING THEM INTO DIFFERENT PLACES >>RYAN: I’LL JUST BROWSE TO A FILE IN THE PROJECT– THERE WE GO IT IS TUCKED AWAY

>> AMANDA: YOU WOULD NEVER HAVE FOUND THAT [ LAUGHTER ] >>RYAN: OKAY, SO BASICALLY, I WAS JUST LOOKING FOR THIS PROJECT DIRECTORY BUT, WHEN YOU MAKE IT — WHEN YOU DO A NETWORK PROFILE CAPTURE, IT IS ALSO SAVED TO YOUR PROJECT SAVE DIRECTORY UNDER PROFILING — I GUESS, I WILL SHOW THIS TO THE STREAM THIS IS JUST — THE SHOOTER GAME PROJECT DIRECTORY UNDER SAVED > PROFILING, AND THEN IT SHOULD CREATE ONE OF THESE .NPROF FILES FOR NETWORK PROFILES — AND THEN THAT IS NOT THE ACTUAL PROFILER, BUT I WILL COPY THIS PATH >>AMANDA: RIGHT INTO THE PROFILER? >>RYAN: SO I JUST PICKED OPEN FILE, BUTTON HERE, AND NAVIGATED TO THE PROFILE I JUST TOOK SO WE CAN GO AND OPEN THAT UP, THAT LOADS AND SHOWS YOU THIS VIEW, WHERE YOU CAN SEE A GRAPH WITH A BUNCH OF DATA YOU CAN FILTER THESE ARE THE DEFAULT OPTIONS, YOU CAN SEE BANDWIDTH INFORMATION, BROKEN DOWN BY PROPERTIES IN RPCS, AND SO ON ACTUALLY, BEFORE I GET INTO THAT, BECAUSE WE WERE RUNNING IN PIE WITH SINGLE-PROCESS, IT ACTUALLY RECORDED BOTH THE SERVERS CONNECTION AND THE CLIENTS CONNECTION HERE DEPENDING ON WHAT YOU WANT TO LOOK AT, YOU CAN LOOK AT EITHER ONE THEY ARE BOTH USEFUL, THE SERVER CAPTURES ARE GENERALLY MORE SO, BECAUSE THEY WILL COVER ALL THE PROPERTY REPLICATIONS YOU CAN TAKE A NETWORK PROFILE ON A CLIENT AND SEE WHAT RPCS THEY ARE SENDING IF YOU ARE OPTIMIZING SERVER PROPERTY APPLICATIONS, YOU WANT TO LOOK AT THE SERVERS CONNECTION WHICH WILL BE, IN THIS CASE, IT WILL BE THE ONE WITH THE EPHEMERAL PORT ON THE ADDRESS I HAVE THAT CHECKED, APPLY THE FILTER, AND THE ONLY DATA THAT SHOWS IN THIS GRAPH IS THE DATA ASSOCIATED WITH THAT CONNECTION THIS IS SHOWING ALL THE DATA THE SERVER CONNECTION SENT TO THE CLIENT WHILE YOU WERE CAPTURING >> AMANDA: CAN YOU SHOW THEM HOW THEY OPENED THIS PROFILE? WE OPENED IT AHEAD OF TIME >> RYAN: YEAH, I CAN SHOW >>AMANDA: IS IT TUCKED AWAY? >>RYAN: I WILL CLOSE THAT AND DO IT AGAIN >>TIM: SO IT IS A UNIQUE BINARY RUNNING WITH THE INSTALL IN THE BUILD FOLDER? >>RYAN: YES, IT IS A SEPARATE BINARY FROM THE EDITOR IT IS INSTALLED WITH THE BUILD UNDER ENGINE > BINARIES, AND IN THE DOT NET FOLDER HERE, BECAUSE IT IS A C# APPLICATION. THE SOURCE CODE IS ALSO AVAILABLE ON GITHUB AS WELL IT IS JUST CALLED NETWORK PROFILER, THAT OPENS UP THE TOOL, YOU CAN THEN OPEN UP THE PROFILES HERE IT REMEMBERS THE PATH FROM LAST TIME >>TIM: DO YOU NEED THE PROFILE RUNNING WHILE CAPTURING PIE? >>RYAN: NO, THIS SEPARATE TOOL ONLY PARSES THE FILES GENERATED BY THE ENGINE SO WHILE YOU ARE ACTUALLY CAPTURING IN PIE, OR IT WORKS IN STAND-ALONE BUILDS AS WELL ALL THE CAPTURING CODE IS BUILT INTO THE ENGINE, SO YOU DON’T NEED ANYTHING EXTRA JUST RUN THE CONSOLE COMMANDS AND YOU’RE GOOD TO GO IF YOU HAD RUN IT IN A STAND-ALONE, LIKE ON STAND-ALONE SERVER, FOR EXAMPLE, YOU WOULD SEE MULTIPLE — YOU WOULD SEE EACH DIFFERENT CLIENT’S CONNECTION IN THIS LIST HERE, AND YOU CAN FILTER BY THOSE IF YOU WANTED TO AS WELL SO WE’RE TALKING ABOUT THIS CHART THIS CAPTURES DATA, EVERY FRAME, AS YOU CAN KIND OF ZOOM IN ON SECTIONS OF IT, OR YOU CAN CLICK ON INDIVIDUAL FRAMES TO SEE DATA ABOUT THOSE FRAMES THERE IS A LOT OF INFORMATION ABOUT BANDWIDTH USAGE HERE ANOTHER USEFUL THING IS TO LOOK AT THIS ACTORS TAB HERE, WHICH WILL SHOW YOU WHICH ACTORS WERE REPLICATED ON ANY GIVEN FRAME, OR ON THE RANGE OF FRAMES THAT WE HAVE SELECTED THE MS COLUMN IS BASICALLY THE ROUGH NUMBER OF MILLISECONDS IT TOOK TO REPLICATE THESE ACTORS, IN KILOBYTES PER SECOND HOW MUCH BANDWIDTH THE ACTOR USED, AND SO ON THE UPDATE HERTZ IS NOT —

I BELIEVE IT IS NOT ACTUALLY AVERAGED CORRECTLY ACROSS FRAMES THESE NUMBERS ARE A LITTLE HIGHER THAN YOU MIGHT EXPECT DO WE HAVE THE PLAYER PAWN? I GUESS MY PLAYER PAWN DIDN’T REPLICATE ON THIS RANGE I’M SEEING IF THE PLAYER DIDN’T REPLICATED ANYTHING HERE WHICH IS A LITTLE UNUSUAL, ACTUALLY ONE THING I DID WANT TO TALK ABOUT IS THIS WASTE COLUMN HERE, WHICH TIES INTO WHAT I WAS SAYING ABOUT NET UPDATE FREQUENCY EARLIER WASTE IS JUST CALLED WASTE HERE WHAT THAT MEANS IS THE PERCENTAGE OF REPLICATION UPDATES WHERE THE SYSTEM COMPARED PROPERTIES, BUT FOUND THAT NOTHING CHANGED AND, THEREFORE, DIDN’T ACTUALLY REPLICATE ANYTHING SO WE SPENT CPU CYCLES COMPARING THE REPLICATED PROPERTIES OF THESE ACTORS, BUT NONE OF THEM CHANGED IF YOU HAVE THAT CASE, YOU WILL SEE A HIGH WASTE ON YOUR ACTORS IN THIS PROFILE, AND THOSE ACTORS CAN BE A GOOD CANDIDATE FOR LOWERING THE NET UPDATE FREQUENCY BECAUSE IT IMPLIES THEIR PROPERTIES AREN’T ACTUALLY CHANGING THAT OFTEN WHEN THEY DO CHANGE, OR WHEN SOMETHING IMPORTANT CHANGES, YOU CAN PROBABLY USE THE FORCE NET UPDATE FUNCTION LIKE I MENTIONED EARLIER TO MAKE SURE THAT CLIENTS DO GET THOSE UPDATES IN A TIMELY MANNER YEAH, SO THOSE ARE THE BASICS OF THAT VIEW THIS MUST BE A RANGE WHERE MAYBE MY PLAYER WASN’T MOVING, BUT IF WE PICK ONE WHERE IT LOOKS LIKE THERE WAS MORE STUFF GOING ON, YOU WILL SEE SOME MORE STUFF ACTUALLY REPLICATED THIS IS WHERE DATA FROM MY GUN REPLICATED, ALTHOUGH APPARENTLY I WAS STILL STANDING STILL >>DAVE: STANDING STILL AND FIRING >> RYAN: PROBABLY YOU CAN SEE SOMETHING IN THIS WEB GUN CLASS REPLICATED SOME PROPERTIES AND YOU CAN SEE WHICH INDIVIDUAL PROPERTIES ACTUALLY REPLICATED HERE AND HOW MANY BYTES THEY USED UP IN THE FINAL PACKET WE SENT OUT THIS CAN BE USEFUL TO SEE WHICH OF YOUR REPLICATED PROPERTIES ARE TAKING THE MOST BANDWIDTH OR TIME THE ONES THAT HAVE THE HIGH COUNT ARE THE ONES WHICH ARE REPLICATING MORE OFTEN THEN THERE IS A LOT MORE YOU CAN PLAY AROUND WITH HERE, YOU CAN FILTER EVEN MORE BY ACTORS SHOOTER GAME IS FAIRLY SIMPLE, IT DOESN’T HAVE MANY DIFFERENT ACTOR TYPES, SO IT IS NOT HARD TO LOOK AT A LIST IN A MORE COMPLICATED GAME, YOU MAY WANT TO LOOK FOR A SPECIFIC ACTORS THERE ARE SOME OTHER VIEWS THAT CAN GIVE YOU, YOU KNOW, AN OVERALL VIEW, LIKE YOU CAN SEE HOW MANY TIMES SPECIFIC ACTORS REPLICATED TO SEE WHICH ONES ARE REPLICATING MOST FREQUENTLY IN YOUR GAME IT MAY BE WORTH FOCUSING YOUR OPTIMIZATION EFFORTS ON THOSE, THE SAME WITH INDIVIDUAL PROPERTIES AND RPCS AS WELL >>TIM: SO SOMETHING LIKE GUNFIRE, OR A LOT OF GUNFIRE IN ONE SCENE WILL PROBABLY HAVE A LOT OF REPLICATIONS, BECAUSE EACH BULLET IS BEING REPLICATED >>RYAN: YES >>TIM: THE MORE PEOPLE YOU ADD, THE HIGHER BANDWIDTH SO IT MAKES SENSE, BUT IT IS GOOD TO VISUALIZE AND SAY, “HEY, MAYBE THESE GUNS ARE FIRING TOO QUICKLY, OR THEY ARE REPLICATING TOO MANY TIMES.” >>RYAN: EXACTLY >>AMANDA: WE HAVE A FEW PEOPLE ASKING ABOUT THE HERTZ VERSUS FRAME RATE, AND CAN YOU EXPAND ON THAT? BECAUSE 677SPS, THAT IS NOT WHAT IT REPRESENTS >>RYAN: THE UPDATE HERTZ IN THIS TRACK? I HAVE TO GO BACK AND LOOK AT THE CODE AND SEE HOW WE’RE ACTUALLY GENERATING THAT NUMBER I THINK THAT IT IS PRETTY CLEAR THERE’S A BUG HERE WHERE IT IS NOT SHOWING THE ACTUAL UPDATE RATE, ALTHOUGH I GUESS, IF THE EDITOR IS RUNNING WITH AN UNLOCKED FRAME RATE, THAT MIGHT BE THE CASE YES, BUT I BELIEVE THE DIFFERENCE BETWEEN UPDATE HERTZ AND REP HERTZ IS UPDATE HERTZ IS HOW OFTEN WE DO THE PROPERTY COMPARISON TO SEE WHAT WE HAVE TO SEND, AND THE REP HERTZ IS HOW OFTEN WE DID GET SOMETHING SENT BASED ON THAT COMPARISON AND HERTZ AND FRAME RATE, WE JUST KIND OF USED INTERCHANGEABLY SO I APOLOGIZE THAT FOR HERTZ IS ESSENTIALLY, YOU KNOW, A FREQUENCY OF FRAME PER SECOND >>AMANDA BOTT: UH-HUH, OKAY COOL SO THOSE ARE A LOT OF THE TOOLS YOU HAVE

THERE ARE A COUPLE OF THINGS THAT MAYBE GET INTO A LITTLE MORE ADVANCED TOPICS YOU HAVE TO DO A LITTLE MORE SET UP WORK IN YOUR GAME TO GET THESE TO WORK WELL NETWORK DORMANCY IS ANOTHER BIG AREA OF POTENTIAL OPTIMIZATION WE USE THE DORMANCY SYSTEM EXTREMELY HEAVILY IN FORTNITE, FOR EXAMPLE FORTNITE SERVERS COULD NOT PERFORM AS THEY ARE NOW WITHOUT THIS SYSTEM AND OUR HEAVY USE OF IT I RECOMMEND LOOKING INTO IT, IT IS PROBABLY MORE SUITED FOR CERTAIN TYPES OF GAMES FOR EXAMPLE, IN FORTNITE, A FORTNITE MAP HAS A LOT OF STATIC ACTORS, LIKE BUILDING PIECES AND TREES AND ROCKS AND ALL THOSE KINDS OF THINGS THAT DON’T NECESSARILY CHANGE VERY OFTEN THEY SIT THERE FOR MOST OF THE GAME UNTIL SOMEONE GOES UP AND DAMAGES THEM THEY CAN BE DORMANT FOR THAT ENTIRE TIME WHERE THEY’RE NOT CHANGING AND THEN, WHILE AN ACTOR IS DORMANT, IT COMPLETELY SKIPS ALL OF THE REPLICATION UPDATES WE HAVE BEEN TALKING ABOUT IT IS SIMILAR TO HAVING A LOW FREQUENCY, IN A WAY, BUT IT WILL JUST NEVER UPDATE AT ALL UNTIL IT IS WOKEN UP FROM DORMANCY >>DAVE: I WOULD DESCRIBE IT AS A CONTRACT BETWEEN THE GAME CODE AND THE REPLICATION SYSTEM THE GAME CODE SAYS, THIS THING IS DORMANT, IT IS NOT GOING TO CHANGE, YOU CAN STOP CHECKING IT, I’LL TELL YOU WHEN IT IS GOING TO CHANGE AGAIN WHEREAS HAVING A VERY LOW UPDATE FREQUENCY, IS JUST THE REPLICATION SYSTEM SAYING “I’M NOT GOING TO CHECK THIS VERY OFTEN UNLESS YOU TELL ME.” WITH DORMANCY, THE GAME CODE SAYS, “STOP CHECKING ME, I PROMISE I WILL NOT CHANGE UNTIL YOU TELL YOU.” IF YOU DO CHANGE IT WITHOUT TELLING THE REPLICATION SYSTEM, WHEN IT GOES TO CHANGE THAT ACTOR, IT MIGHT NOT REALIZE PLAYERS DO NOT HAVE THE CHANGES YOU MADE BEHIND IT BACK THAT IS THE KEY DIFFERENCE >>RYAN: YOU CAN CONTROL DORMANCY FROM BLUEPRINTS NOW I CAN SHOW YOU SOME OF HOW IT WORKS, I GUESS I WILL COVER THE INITIAL DORMANCY FIRST, I BELIEVE IT IS IN THE DETAILS PANEL. YEAH YOU CAN SET NET DORMANCY FOR YOUR ACTOR CLASSES HERE, AWAKE IS THE DEFAULT STATE WE HAVE BEEN USING SO FAR, RIGHT, IT IS AWAKE, IT IS CHECKING THE NET UPDATE FREQUENCY ALL THE TIME, THE SAME REPLICATION YOU KNOW AND LOVE DORMANT ALL IS KIND OF — IF, DURING THE COURSE OF GAMEPLAY, YOU HAVE SOMETHING YOU WANT TO MAKE DORMANT, BECAUSE YOU KNOW YOU WILL NOT BE UPDATING IT FOR A WHILE, YOU CAN SET IT TO DORMANT ALL I GUESS SETTING IT AS THE DEFAULT DOESN’T — IT COULD MAKE SENSE FOR SOME ACTORS THE MAIN DIFFERENCE I WANTED TO ILLUSTRATE IS THE DIFFERENCE BETWEEN AWAKE AND INITIAL IF YOU HAVE AN ACTOR PLACED IN THE MAP AND IT WON’T BE CHANGING FOR A WHILE, YOU CAN SET IT TO INITIAL DORMANCY, AND LIKE DAVE SAID, IT WILL NOT EVEN BE CONSIDERED FOR REPLICATION AT ALL UNTIL GAME CODE TELLS IT TO WAKE UP IF YOU HAVE A LOT OF REPLICATED ACTORS PLACE IN A LARGE MAP, IF MOST OF THEM CAN BE INITIALLY DORMANT, YOU CAN HAVE HUGE GAINS IN TERMS OF SERVER PERFORMANCE THIS IS EXACTLY WHAT FORTNITE DOES, FOR ALL OF THOSE ACTORS THAT ARE IN THE MAP WHICH MAY NOT BE CHANGING FOR A WHILE, LIKE BUILDINGS AND TREES AND STUFF LIKE THAT >>DAVE: YEAH, THE KEY IS IT IS ONLY FOR IN MAP ACTORS, IT IS BASICALLY SAYING, “TELL ME THE REPLICATION SYSTEM, EVERYONE HAS IT, YOU DON’T HAVE TO KEEP TRACK OF WHO HAS IT.” VERSUS AN ACTOR WHICH IS AWAKE AND THEN GOES DORMANT, THE REPLICATION SYSTEM HAS TO MAKE SURE EVERYONE GETS THE LAST UPDATE BEFORE IT CAN COMPLETELY FORGET ABOUT IT DORMANCY INITIAL, PRETEND I DON’T EXIST BECAUSE EVERYONE HAS ME AND UP TO DATE THE REPLICATION DOES NOT EXIST UNTIL IT TRANSITIONS OUT OF THE INITIAL DORMANCY STATE INTO EITHER DORMANT ALL OR AWAKE DEFINITELY, INITIALLY DORMANT ACTORS ARE, BY FAR, THE CHEAPEST IN REPLICATIONS THEY BASICALLY JUST GET IGNORED >>RYAN: EXACTLY THAT WORKS BECAUSE, LIKE DAVE SAID, THE STATE OF THOSE REPLICATED PROPERTIES OR THE VALUES ARE THE SAME ON THE CLIENT AND THE SERVER WHEN THEY LOAD THE MAP AND SPAWN THESE ACTORS SO THERE IS NOTHING —

THERE IS NOTHING TO DO IN THAT CASE UNTIL SOMETHING CHANGES WHEN SOMETHING DOES CHANGE AND YOU WANT TO MAKE SURE ALL OF THE CLIENTS GET THAT UPDATE FOR A DORMANT ACTOR, YOU CAN USE SET NET DORMANCY SO YOU CAN SET NET DORMANCY — SO LET US SAY YOU CHANGE THE REPLICATED PROPERTIES ON THE INITIALLY DORMANT ACTOR, FOR EXAMPLE YOU CAN CALL SET NET DORMANCY RATE, FROM C++ OR BLUEPRINT, AND THIS WILL CAUSE IT TO WAKE UP IN THE REPLICATION SYSTEM, IT WILL START UPDATING THERE NORMALLY — IT WILL DETECT THE CHANGED PROPERTIES AND UPDATE ALL THE CLIENTS IT WILL REMAIN AWAKE UNTIL YOU SET IT TO BE DORMANT AGAIN IN ADDITION, SOMETIMES IT IS ALSO USEFUL TO SIMPLY CALL FLUSH NET DORMANCY, WHERE YOU CAN DO THIS IF YOU KNOW YOU ARE ONLY GOING TO DO A BRIEF CHANGE FOR A SINGLE FRAME — YOU CHANGED ONE PROPERTY AND YOU WANT TO SEND THAT UPDATE OUT AND HAVE THE ACTOR GO DORMANT AGAIN BECAUSE YOU ARE PROBABLY NOT CHANGING IT AGAIN FOR A WHILE IT IS LIKE A FORCE NET UPDATE, BUT FOR DORMANCY DEPENDING ON THE SITUATION AND THE GAMEPLAY OF ANY PARTICULAR ACTOR, YOU CAN USE THESE CALLS TO MANIPULATE THAT STATE >>DAVE: AND I THINK FORCE NET UPDATE WILL IMPLICITLY CALL FLUSH NET DORMANCY AND, IN ADDITION TO THAT, IT WILL ALSO DO WHAT FORCE NET UPDATE DOES, TELLING THE REPLICATION SYSTEM REPLICATE THIS RIGHT NOW, SO IT IS MODIFYING THE FREQUENCY ASPECT OF THE WHOLE THING FLUSH NET DORMANCY DOES NOT CHANGE DORMANCY STATUS, BUT IT SAYS, “HEY, I CHANGED, YOU HAVE TO AT LEAST GET THIS ONE THING, THIS ONE CHANGE HAS TO GO THROUGH.” SOMETHING CAN BE SET TO DORMANT ALL, YOU CAN CALL FLUSH NET DORMANCY, CHANGE SOMETHING, AND THAT ONE UPDATE WILL GO OUT TO EVERYBODY AND THEN IT WILL GO BACK TO BEING DORMANT IT WILL STAY DORMANT AND NOT CONTINUOUSLY CHECK, IT WILL MAKE ENSURE EVERYONE GETS THAT UPDATE USUALLY YOU WANT TO GO TO — YOU WANT TO GO FROM DORMANT ALL TO AWAKE, IF YOU ARE GOING TO — IF WILL HAVE A PERIOD OF TIME WHERE IT IS GOING TO CHANGE, SAY, IN FORTNITE WHEN A BUILDING TAKES DAMAGE AND IT REGENERATES OVER A PERIOD OF TIME, WE WILL SET IT AWAKE, REGEN HEALTH, AND ONCE IT IS FULL HEALTH, GO BACK TO DORMANT IF IT IS A ONE-OFF CHANGE, IF IT IS AN EDIT OR SOMETHING IN THE FILE, YOU WILL CALL ONE FLUSH NET DORMANCY >>RYAN: ALL GOOD POINTS DORMANCY SOUNDS SO SIMPLE WHEN WE EXPLAINED IT THIS WAY >>TIM: JUST LIKE GOING TO BED AND WAKING UP >>AMANDA: THATS IT >>TIM: BUT THIS HELPS A LOT WITH OPTIMIZATION, MAKING THE PINGS LOWER >>DAVE: YEAH, YOU ARE CALLING IT AT A HIGHER LEVEL, YOU ARE NOT CHECKING TO SEE, WELL, WHEN IS THE LAST TIME THIS REPLICATED, AND YOU ARE NOT CHECKING IF ANYTHING CHANGED — AT A VERY HIGH LEVEL, YOU’RE SAYING “THIS IS NOT CHANGING, THE GAME CODE TOLD ME THAT AND I NEED TO MAKE SURE THAT EVERYBODY HAS THE UP TO DATE STATE AND THEN I CAN GO ON.” SO IT IS A PRETTY GOOD OPTIMIZATION >>RYAN: LIKE I SAID, THE VAST MAJORITY OF REPLICATED ACTORS IN FORTNITE ARE DORMANT MOST OF THE TIME IT IS A HUGE REASON WHY WE CAN GET FORTNITE SERVERS TO PERFORM AS THEY DO, JUST BY USING THIS >>TIM: THE MORE YOU KNOW >>RYAN: THEN I GUESS, THERE IS ANOTHER ADVANCED TOPIC I CAN MENTION BRIEFLY I MAY ENGAGE DAVE FOR THIS, TOO BUT — SO IF I CAN GET VISUAL STUDIO >>DAVE: SO THERE IS A SOURCE FILE, A NETSERIALIZATION.H IS WHERE ALL OF THE FAST ARRAY SERIALIZER IS, AND THERE IS A LENGTHY COMMENT AT THE TOP OF IT EXPLAINING HOW TO USE IT I WOULD, YOU KNOW, IF YOU ARE LOOKING WHERE TO GO FOR THIS STUFF, I WOULD OPEN THE HEADER FILE, AND READ IT — NETSERIALIZATION.H IT WILL GIVE YOU THE MORE SPECIFICS, BUT RYAN AND I WILL GO OVER THE HIGH-LEVEL OVERVIEW OF WHAT THAT THING DOES I CAN JUST START TALKING ABOUT IT WHILE YOU KEEP LOOKING — SO, THE IDEA IS THE FAST ARRAY SERIALIZER PATTERN

IS USED WHEN YOU HAVE AN ARRAY, A T ARRAY, OF STRUCTS AND YOU WANT TO REPLICATE THAT — BASICALLY, IT IS USEFUL IN CASES WHERE YOU HAVE ARRAYS OF STRUCTS AND THE DATA INSIDE THE STRUCT IS BIG AND DOESN’T CHANGE THAT OFTEN AND YOU DON’T WANT THE REPLICATION SYSTEM TO CHECK ALL — YOU DON’T WANT REPLICATION SYSTEMS TO GO THROUGH EACH ELEMENT OF THE ARRAY, OR EACH ELEMENT IN THE STRUCTURE, AND SAY DID THIS THING CHANGE OR NOT THE FAST ARRAY SERIALIZER ALLOWS THE GAME CODE TO HAVE MORE CONTROL AND TELL THE REPLICATION SYSTEM WHEN ITEMS ARE ADDED, REMOVED, OR CHANGED FROM THAT ARRAY IT IS KIND OF LIKE THE DORMANCY IDEA, WHERE IT IS LIKE THE REPLICATION SYSTEM IS DOING LESS PULLING, BUT IT IS RELYING ON THE GAME CODE TO TELL IT WHEN TO ADD AND REMOVE THINGS, AND WHEN THINGS HAVE CHANGED THE WAY IT WORKS INTERNALLY IS, WHEN YOU CALL MARK ITEM DIRTY, OR MARK ARRAY DIRTY, YOU ARE ACTUALLY INCREMENTING AN INTEGER, SOMETIMES WE CALL IT A CHANGE LIST, OR A REPLICATION KEY, AND YOU ARE INCREMENTING AN INTEGER BEHIND THE SCENES THE REPLICATION SYSTEM, WHEN IT GOES TO COMPARE WHAT THE SERVER HAS TO WHAT EACH CLIENT HAS, IT LOOKS AT WHAT THAT CLIENTS NUMBER WAS IT DOESN’T LOOK AT WHAT THE DATA WAS IT SENT TO THE CLIENT LAST IT ASKS, WHAT IS THE CHANGE LIST THIS CLIENT IS ON IF THERE IS A MISMATCH, THEN IT GOES IN IT DOES IT AT THE HIGH-LEVEL AT THE ARRAY ITSELF, THE ARRAY ITSELF HAS ONE OF THE CHANGE LISTS AND IT WILL QUICKLY JUST NOT LOOK AT ANYTHING IN THE ARRAY, IF THAT HIGH-LEVEL NUMBER ISN’T DIFFERENT IF IT IS DIFFERENT, THEN IT WILL GO THROUGH EVERY ELEMENT IN THE ARRAY AND CHECK THE CHANGE LIST NUMBER ON EACH OF THE ELEMENTS FOR THE ELEMENTS THAT ARE NEW OR HAVE CHANGED SINCE THE LAST VERSION WE SENT THE CLIENT, THE WHOLE DATA — ALL THE DATA IN THAT ELEMENT OF THE ARRAY WILL BE SENT OVER THE OTHER NICE THING ABOUT IT IS, ON THE RECEIVING SIDE, YOU GET SOME NICE CALL BACKS THAT TELL YOU WHEN ELEMENTS WERE CHANGED, WHEN THEY WERE ADDED, OR ABOUT TO BE REMOVED IT LENDS ITSELF TO GAME CODE THAT WANTS TO MANAGE THAT IT IS GOOD FOR THINGS LIKE INVENTORY SYSTEMS, THE GAMEPLAY ABILITY SYSTEM MAKES HEAVY USE OF IT IN GENERAL, IF YOU HAVE THAT KIND OF DATA — I MEAN, IDEALLY, LIKE RYAN SAID, YOU WANT TO REPLICATE AS LITTLE DATA AS POSSIBLE, BUT INEVITABLY, GAMES HAVE INVENTORY SYSTEMS AND THESE TYPES OF THINGS SO THIS IS A CONVENIENT WAY OF — YOU GET A LOT OF PERFORMANCE AND IT IS CONVENIENT FOR THOSE CALL-BACKS ARE YOU LOADING THIS UP? >>RYAN: IT IS LOADING THE SOLUTION STILL IT IS TAKING ITS TIME, YEAH >>DAVE: SO WHAT YOU END UP DOING, YOU HAVE THE CONTAINER CLASS WITH THE ARRAY OF ITEMS IN IT I’VE BEEN TALKING ABOUT AN ARRAY OF STRUCTS, IT IS AN ARRAY OF STRUCTS THAT WRAPS THE ARRAY OF STRUCTS YOU SUB CLASS THE CONTAINER FROM THE BASE FAST ARRAY SERIALIZER CONTAINER STRUCT, AND THEN YOU SUB-CLASS THE ITEMS IN YOUR ARRAY, THEY NEED TO BE A SUB-CLASS OF THE FAST ARRAY SERIALIZER ITEM I CAN’T REMEMBER WHAT THAT STRUCT IS CALLED RIGHT NOW YOU DO THAT, YOU DO SOME STUFF WITH STRUCT TRAITS THAT TELL THE UNREAL REFLECTION SYSTEM THAT THIS TYPE HAS A CUSTOM NET DELTA SERIALIZE FUNCTION, AND THEN IN YOUR CUSTOM NET, DELTA SERIALIZE FUNCTION, YOU CALL THIS TEMPLATED FAST ARRAY SERIALIZE FUNCTION WITH YOUR TYPES AS A TEMPLATE OF YOUR ARGUMENTS, AND IT WILL DO WHAT I JUST DESCRIBED LET US SEE, SO SOME OTHER THINGS ABOUT THAT IS — SO THE ORDER IS NOT ACTUALLY GUARANTEED IN THIS STUFF I BELIEVE THE COMMENTS SHOULD CALL THAT OUT FOR THE MOST PART, IT WILL BE, BUT WITH PACKET LOSS, DROP PACKETS, REORDERED STUFF, IT IS NOT A STRICTLY ORDERED THING IN A LOT OF WAYS, IT IS CONCEPTUALLY A MAP UNDERSTOOD THE HOOD, WE HAVE THESE KEYS AND THESE VALUES, WHERE WE HAVE THESE KEYS AND VALUES WE CARE ABOUT SYNCING UP THE CODE DOES NOT CARE QUITE AS MUCH ABOUT THE LOCAL ORDER IT IS POSSIBLE FOR THE CLIENT TO DO WHATEVER IT WANTS

AND ADD STUFF TO THAT ARRAY LOCALLY AND, AS LONG AS YOU DON’T HAVE CONFLICTS IN THE REPLICATION KEY FOR THOSE ITEMS — IT WILL SORT OF BE TRANSPARENT YOU WILL GET THE REPLICATED VERSION ON TOP OF IT, AND THE LOCALLY PREDICTED OR ADDED ELEMENTS IN THAT ARRAY CAN STILL EXIST THE ABILITY SYSTEM USES THAT FOR PREDICTIVE GAMEPLAY EFFECTS AND THAT KIND OF STUFF SO THIS IS THE FILE I WAS TALKING ABOUT >>RYAN: SO, NETSERIALIZATION.H, I FOUND IT SO THERE IS A COMMENT, LIKE DAVE SAID, THAT GOES THROUGH THE BASICS OF HOW IT WORKS, I JUST DID A SEARCH IN SHOOTER GAME, BUT I DON’T THINK SHOOTER GAME HAS IT — >>DAVE: IT PROBABLY DOESN’T >>RYAN: WE CAN LOOK AT ONE OF THE ABILITY SYSTEM CLASSES — >>DAVE: YOU CAN GO TO GAMEPLAYEFFECT.H >>AMANDA: ONE MORE, THERE WE GO >>TIM:IT IS A LITTLE HARD TO SEE >>DAVE: YEAH, ZOOM IN A LITTLE >>AMANDA: WHAT IS THE FILE– WHAT IS THE ELEMENT YOU ARE LOOKING FOR? >>DAVE: THE FILE IS GAMEPLAYEFFECT.H I’M LOOKING FOR ACTIVEGAMEPLAYEFFECT — OKAY. SO THIS IS THE CONTAINER CLASS, YOU CAN SEE IT IMPLEMENTS, OR IT INHERITS FROM A FAST ARRAY SERIALIZER AND THEN, MAN, THIS IS — THIS COMPUTER IS CHUGGING YEAH WE WILL SEE >>RYAN: I THINK IT IS DOING THE FIND STILL >>DAVE: YEAH — >>AMANDA: A SECRET FIND? >>DAVE: THERE IT IS IT IS PARSING THE SOLUTION TOO LET ME SEE — LETS DISABLE VAX IT MIGHT BE VISUAL STUDIO, MAYBE IT IS A LITTLE BETTER NOW OH, THIS MIGHT NOT HAVE BEEN THE EASIEST ONE THERE IS A LOT OF CRAP IN HERE HERE IS THE STRUCT TRAIT THING I WAS TELLING YOU ABOUT YOU HAVE TO DO THIS, TO SAY “I HAVE THE CUSTOM NET SERIALIZE FUNCTION” — STRUCTS HAVE A CUSTOM NET SERIALIZE FUNCTIONS, WHICH IS THE WAY WE TAKE THIS STRUCTURE AND PACK IT — WRITE IT OUT TO THE NETWORKING STREAMS THE DELTA SERIALIZE FUNCTION IS THE SAME IDEA, EXCEPT THAT YOU GET — YOU CAN GET THAT CALL PER CLIENT YOU HAVE A SPACE TO KIND OF DO BOOKKEEPING TO FIGURE OUT WHAT YOU LAST SENT THE CLIENT, SO YOU CAN DETERMINE WHAT THE NETWORK PAYLOAD SHOULD BE, BASED ON WHAT THE CLIENT WAS LAST SENT OR ACKNOWLEDGED >>RYAN: IT ALLOWS YOU TO IMPLEMENT THE COMPARISON I WAS TALKING ABOUT EARLIER FOR DEFAULT FOR NORMAL REPLICATED PROPERTIES THE ENGINE HAS THE BUILT IN DELTA COMPARISON WHICH I HAVE BEEN TALKING ABOUT THIS WHOLE TIME THAT TAKES UP CPU CYCLES — THIS OVERRIDE LETS YOU IMPLEMENT THE COMPARISON YOURSELF, WHICH IS HOW THE FAST ARRAY SERIALIZER WORKS >>DAVE: LIKE I SAID, SO THIS THING DOES A — LETS SEE IF VAX CAN FIND IT >> RYAN: YOU DISABLED VAX >> DAVE: I DISABLED VAX, RIGHT THIS IS PROBABLY NOT A GOOD EXAMPLE TO PICK, BECAUSE THIS ACTUALLY LEADS TO MORE COMPLICATED STUFF THIS IS THE CALL I WAS TELLING YOU ABOUT

THIS IS ALL YOU REALLY HAVE TO DO IN YOUR NETDELTASERIALIZED, YOU JUST CALL A FASTARRAYDELTASERIALIZE WITH THESE TEMPLATE ARGUMENTS, AND THEN YOUR GAMEPLAY EFFECTS INTERNAL, DELTA PARAMETERS COME FROM — THEY GET PASSED IN GAMEPLAYEFFECTS_INTERNAL, THIS IS WHAT I WAS TALKING ABOUT THIS IS THE ACTUAL — YEAH. THERE IT IS LIKE I SAY, HERE IS THE ACTUAL T ARRAY UNDER THE HOOD WE’RE GOING TO REPLICATE. WE’RE REPLICATING FACTIVEGAMEPLAYEFFECT AND THE FACTIVEGAMEPLAYEFFECTS, INHERITS FROM A FAST ARRAY SERIALIZER ITEM, WHICH HAS WHAT I WAS TALKING ABOUT, THE CHANGE LIST OR THE REPLICATION KEY ID IS BUILT INTO THE BASE CLASS, AND THAT BASE CLASS HAS, YOU KNOW, IT HAS THE MARK ITEM DIRTY I WILL GO BACK TO THE HEADER FILE, TO MAKE IT EASIER OKAY, SO BASICALLY — MARKITEMDIRTY IS A CALL ON THE ACTUAL ARRAY ITSELF, BUT THERE SHOULD BE — I BELIEVE — THAT FUNCTION SHOULD EXIST ON THE ITEMS ITSELF IF YOU HAVE THE ITEM, YOU CAN CALL A MARK ITEM DIRTY THE MAIN POINT BEING, THESE ARE THE FUNCTIONS YOU WANT TO CALL WHEN YOU ARE MUTATING THE ARRAY, AND THEN THE CALLBACKS YOU GET ON THE CLIENT SIDE, WHEN THAT STUFF HAPPENS, ARE WHAT I WAS TALKING ABOUT EARLIER, PREREPLICATEREMOVE, POSTREPLICATEADD AND CHANGE, THOSE CAN BE HANDY THIS IS THE ABILITY SYSTEM DOING STUFF, AND “THIS THING IS ABOUT TO BE REMOVED, LETS SEE IF WE HAVE TO INVOKE ANY EVENTS OR BOOKKEEPING” THE SYSTEM DOES. SAME THING WITH ADDING, WHEN A NEW ONE COMES IN, IT DOES ALL OF THESE CHECKS AND SOME TIMING STUFF TO FIGURE OUT IF A THING JUST HAPPENED, OR IF IT IS JUST TRYING TO FIGURE OUT IF THE ITEM WAS JUST ADDED, ON THE SERVER, OR IF IT IS LIKE YOU ARE FINDING OUT ABOUT IT THROUGH RELEVANCY, OR JOIN-IN-PROGRESS TYPE OF STUFF YOU CAN BREAK SYSTEMS WHICH TAKE ADVANTAGE OF THAT THE BIG ADVANTAGE OF FAST ARRAY SERIALIZER, IT IS SIMILAR TO THE NET DORMANCY AND THE OTHER STUFF WE ARE TALKING ABOUT, YOU ARE HINTING OR TELLING THE REPLICATION SYSTEM, “DON’T COMPARE ALL OF THESE BAG OF BITS EVERY TIME I WILL TELL YOU WHAT BAG OF BITS YOU NEED TO SEND WHEN THEY CHANGE.” YOU CAN GET A LOT OF PERFORMANCE OUT OF THAT, DEPENDING ON THE SYSTEM IF YOU HAVE AN INVENTORY SYSTEM, THAT HAS A TON OF ITEMS AND PRETTY GOOD-SIZED STRUCTURES, THIS WILL BE A PRETTY GOOD WIN FOR YOU IF IT IS A SMALL LIST, IF THERE ARE THREE ITEMS IN IT, AND THEIR A COUPLE BYTES EACH, IT IS PROBABLY NOT WORTH IT YOU STILL GET THE CALLBACKS, WHICH IS NICE TOO YEAH, I THINK THIS IS — THAT COVERS THAT >>RYAN: I ENCOURAGE YOU TO READ THE COMMENT IN THE NETSERIALIZATION.H THAT SUMMARIZES ALL OF THIS YOU CAN ALWAYS REFER TO IT LATER IF YOU WANT TO IMPLEMENT THIS IN YOUR OWN GAME >>DAVE: IT IS C++ ONLY, THIS IS DEFINITELY SOMETHING THAT DOESN’T REALLY EXPOSE WELL TO BLUEPRINTS IF YOU ARE IN THAT REALM, YOU KNOW — MAYBE THE ABILITY SYSTEM IS A GOOD EXAMPLE OF A SYSTEM THAT USES THIS STUFF, BUT IT DOESN’T EXPOSE THOSE CONTAINERS TO BLUEPRINTS, BUT BLUEPRINTS HAVE — THERE IS AN API FOR ADDING AND REMOVING THOSE EFFECTS, IT IS LAYERED — THAT IS HOW I RECOMMEND LOOKING AT IT >>AMANDA: THERE IS A LOT THERE >>TIM: A LOT OF INFORMATION A LOT OF IT IS WEIGHTED — >>AMANDA: IS THERE ANYTHING ELSE? WE HAVE LOADS OF QUESTIONS >>RYAN: YEAH, WE WENT OVER ALL THE BROAD TOPICS

THAT I WANTED TO GO OVER TODAY IF WE HAVE TIME FOR QUESTIONS, WE CAN ROLL WITH THAT >>AMANDA: OKAY SO ONE QUESTION; THEY ARE ASKING IF THERE IS ANY REASON WHY REPLICATION OF VARIABLES, OR DISPATCHING OF RPC IS SINGLE THREADED SO IS THAT TRUE? AND THEN WHY? >>RYAN: YES, THAT IS TRUE DO YOU WANT TO TAKE THIS? >>DAVE: I MEAN, WE BOTH CAN ANSWER IT, I GUESS IT IS A LEGACY THING, THE ENGINE LONG AGO WAS SINGLE THREADED, AND THAT IS HOW IT HAS BEEN, I THINK >>RYAN: THERE IS A LOT OF — SO THE MAIN REASON FOR THIS, THE REPLICATION UPDATE — THE WAY IT WORKS RIGHT NOW IS IT KIND OF INHERENTLY HAS TO READ OR WRITE ACTOR PROPERTIES THAT ARE UPDATED ON THE GAME THREAD WE CAN’T, LIKE — THE ENGINE DOESN’T HAVE THE THREAD SAFETY MECHANISMS UNDER THE HOOD TO ENSURE THAT THOSE GAMEPLAY ACTORS — ACTORS UPDATED ON THE GAME THREAD ARE ALL — THAT ALL OF THAT STUFF IS THREAD SAFE >>DAVE: ONE EXAMPLE, THERE IS PREREPLICATION, THAT IS WHAT IT IS CALLED, RIGHT? THERE ARE VIRTUAL FUNCTIONS ON ACTORS GETTING CALLED, BEFORE AN ACTOR GOES TO REPLICATE SO IF YOU WERE GOING WIDE WITH ALL OF THIS STUFF, YOU ARE HAVING MULTIPLE THREADS THAT WERE POTENTIALLY TRYING TO REPLICATE THE SAME SET OF ACTORS TO DIFFERENT CONNECTIONS, YOU GET INTO CASES WHERE SOMEONE CALLS PREREPLICATE, SET IT UP, WHILE IT IS IN THE MIDDLE OF THAT, SOMEBODY DOES IT TO THE SAME ACTOR AND KNOCK EACH OTHER OUT THERE ARE SOLUTIONS, BUT THAT IS PART OF THE FRICTION THE OTHER THING IS MULTITHREADING SERVERS DOESN’T ALWAYS — IT ISN’T ALWAYS BENEFICIAL IT IS LIKE A REALLY, REALLY COMPLEX TOPIC IT IS SOMETHING WHY FORTNITE DOES PRETTY WELL WITH SINGLE-THREADED SERVERS BECAUSE IT PACKS THEM SO TIGHTLY GOING WIDE WITH OUR INDIVIDUAL SERVERS ISN’T ALWAYS — THERE’S TRADE-OFFS THERE, AND IT MIGHT NOT BE THE BEST SITUATION IT DOESN’T MEAN THERE AREN’T SITUATIONS WHERE THEY WOULD BE A GOOD THING TO HAVE, BUT I’M JUST TRYING TO GIVE YOU MORE CONTEXT AS TO WHY IS IT LIKE THAT >>RYAN: YEAH, GENERALLY DEDICATED SERVERS HAVE HISTORICALLY BEEN SINGLE-THREADED, LIKE DAVE MENTIONED IT MAY BE MORE BENEFICIAL ON WIRELESS AND SERVER TYPE SITUATIONS, BUT WE HAVE ALL THE FRICTION OF THE GAME THREAD UPDATES THAT ARE — THAT CAN BE PROBLEMATIC WE ARE LOOKING INTO WAYS TO KIND OF MULTITHREAD SOME OF THE LOWER LEVEL, LIKE SYSTEM LEVEL, TASKS THAT HAPPEN IN NETWORKING, LIKE SOCKET CALLS AND PACKET PROCESSING LIKE COMPRESSION OR ENCRYPTION, BUT ALL OF THAT HAPPENS AT A LOWER LEVEL BELOW WHERE ALL OF THIS IS EXPOSED TO GAME THREAD >>AMANDA: ALL RIGHT THEY ARE WONDERING, WHY DOES SERVER PERFORMANCE DEGRADE, THE LONGER THE SERVER HAS BEEN UP? >>RYAN: I WOULD SAY THAT PROBABLY DEPENDS ON HOW DIFFERENT GAMES BEHAVE THERE ARE SEVERAL THINGS THAT COULD LEAD TO THAT — IF YOU HAVE A LONG-RUNNING GAME SESSION THAT IS SPAWNING ACTORS THROUGHOUT GAMEPLAY, AND THOSE ACTORS ARE STAYING AROUND, MAYBE YOU ARE SPAWNING PICK UPS OR ITEM DROPS OR PROJECTILES OR THINGS LIKE THAT, WHICH INCREASE OVER TIME, AND THEY ARE NOT BEING CLEANED UP CORRECTLY; THEY ARE STILL BEING CONSIDERED FOR REPLICATION, AND THEY BUILD UP OVER TIME OVER THE COURSE OF THE MATCH, AND EACH ADDITIONAL ACTOR IS GOING TO ADD COST OVER TIME >>DAVE: YOU WOULD BE SURPRISED HOW MANY THINGS END UP LEAKING THAT EXAMPLE IS KIND OF LIKE — ACTORS MIGHT LEAK, AND THE SIZE OF THE WORLD MIGHT GROW, BUT INTERNALLY THINGS LIKE TIMERS, ON THE THE WORLD’S TIMER MANAGER — WE HAD CASES WHERE TIMERS LEAK, WHERE SOMEBODY WILL SET A REPEATING TIMER AND THE ACTOR WHO IS LISTENING TO IT GOES AWAY AND NOBODY IS LISTENING TO IT ANYMORE THE FACT THE LIST CAN GROW SO HIGH, AND SOME OF THE OPERATIONS ON THE LIST END UP BEING LINEAR, AND THOSE TYPES OF PROBLEMS, IT CAN BE SURPRISING HOW MUCH THOSE CAN FILTER IN I DON’T THINK THERE IS ANYTHING INTRINSICALLY ABOUT LETTING A SERVER RUN IDLY FOR A LONG TIME

IT SHOULD NOT DEGRADE IF PERFORMANCE IS DEGRADING ON A SERVER, IT IS ONE OF THESE REASONS WE ARE TALKING ABOUT AND THERE IS AN INFINITE NUMBER OF WAYS THAT CAN HAPPEN THOSE ARE THINGS WE’VE SEEN >>AMANDA: THE COMMON THINGS >>DAVE: YEAH >>AMANDA BOTT: THEY ARE WONDERING IF THE SERVER TICK IS SET TO 30 FRAMES PER SECOND, IS IT USELESS TO SET NET UPDATE TIME TO BE GREATER THAN 30? >>RYAN: YES. BUT IT SHOULDN’T HURT ANYTHING — >>DAVE:COULD IT AFFECT PRIORITIZATION? I’M NOT SURE I HAVE TO LOOK AT THE CODE TO SEE HOW IT WORKS >>RYAN: I DON’T THINK SO >>DAVE RATTI: IT PROBABLY CLAMPS IT IT IS PROBABLY LIKE — IF TWO ACTORS ARE REPLICATING EVERY FRAME, BUT ONE HAS A HIGHER FREQUENCY THAN THE OTHER ONE WHEN IT GOES TO CALCULATE, HOW LONG OVER DUE FOR REPLICATION IS IT, IF THAT CALCULATION IS DIFFERENT, IT MIGHT BE DIFFERENT BETWEEN THE TWO. I DON’T THINK IT IS >>RYAN: IN THE LEGACY NET DRIVER, THE DRIVES THE — >>DAVE: THE NEXT DATA TEST >>RYAN: — FOR AN ACTOR THE WAY THAT FREQUENCY IS CHECKED IN THE ENGINE, IT WILL COMPARE THE CURRENT TIME AGAINST THE NEXT UPDATE TIME FOR THAT ACTOR, AND WHEN IT UPDATES, WE SET THE NEXT UPDATE TIME BASED ON THE FREQUENCY IT WILL NOT AFFECT PRIORITIZATION, IT IS A BINARY THING, EVERY FRAME, IF THE ACTOR IS UPDATED OR NOT >>AMANDA: WHAT IS THE COST OF USING REP NOTIFY VARIABLES OVER THE USUAL REPLICATED? >>RYAN: THERE’S A TINY BIT OF EXTRA BOOKKEEPING AT THE ENGINE LEVEL WHERE WE HAVE TO, KIND OF, QUEUE UP THOSE FUNCTIONS, THE NOTIFY FUNCTIONS TO BE CALLED WHEN WE DEFECT A CHANGE HAS OCCURRED THEN THERE IS THE COST OF THE FUNCTION CALL TO INVOKE THOSE AND THEN WHATEVER ACTUAL IMPLEMENTATION OF THAT FUNCTION DOES I DON’T THINK IT IS ANYTHING TO BE PARTICULARLY CONCERNED ABOUT >>DAVE: SERVER SIDE, IT IS NEGLIGIBLE, THERE MIGHT BE EXTRA BOOKKEEPING, BUT THE SERVER DELTAING PROPERTIES, IT WILL NOT CALL REP NOTIFY >>RYAN: THAT IS A GOOD POINT, THE SERVER DOESN’T EVEN TRACK ANYTHING FOR IT IT IS ALL TRACKED CLIENT-SIDE IT SHOULD HAVE NO AFFECT ON SERVER PERFORMANCE, BUT THE CLIENT WILL DO THAT TINY BIT OF EXTRA BOOKKEEPING >>AMANDA: ALL RIGHT WHAT ARE SOME RED MARKS, OR NUMBERS, THEY SHOULD LOOK AT IN THE NET PROFILE, OR NET PROFILER, AND WHAT WOULD YOU CONSIDER GOOD AND BAD FOR MULTIPLAYER GAMES? >>RYAN: THAT IS REALLY HARD TO ANSWER GENERALLY BECAUSE IT IS GOING TO DEPEND ON YOUR SPECIFIC GAME, WHAT YOUR TARGET FRAME RATES ARE, HOW MANY ACTORS YOU HAVE, HOW MANY REPLICATED ACTORS YOU HAVE, AND WHICH OF THOSE ACTORS ARE MOST IMPORTANT MOST GAMES PROBABLY HAVE A CHARACTER OR SOMETHING THAT WILL NEED A LOT OF — IT WILL SPEND MOST OF OUR REPLICATION, TIME, AND RESOURCES ON MAKING SURE CHARACTERS ARE UP TO DATE OTHER OBJECTS IN THE WORLD USUALLY TAKE LESS TIME IT IS REALLY ABOUT HITTING THE FRAME RATE TARGETS >>DAVE: YEAH, WHEN I DO THIS WORK, I DON’T USUALLY START IT WITH A BUDGET IN MIND I LOOK AT THE BIG PICTURE, BREAK IT DOWN AND SEE WHERE THINGS ARE PROPORTIONALLY, AND LOOKING AT THE TARGET FRAME RATES AND WORK BACKWARDS FROM THAT THAT SAID, I PROBABLY HAVE AN INTUITION ABOUT WHAT NUMBERS ARE REALLY BAD, BUT I DON’T — I WOULDN’T KNOW IT UNTIL I SAW IT IF YOU PULL UP THE NETWORK PROFILER AND SAW, LIKE, I GUESS ALL OF THE 100 PERCENTS IN ALL OF THE WASTE COLUMNS, THAT IS A RED FLAG IF YOU SAW, YOU KNOW, YOU SEE AN ACTOR TAKING, I DON’T KNOW, WHATEVER — 25 PERCENT OF, YOUR BALANCE BUDGET, CERTAIN NUMBERS ARE ALARMING, BUT IT IS HARD TO GIVE ABSOLUTE NUMBERS GAMES ARE DIFFERENT, SOME GAMES GO OUT OF THEIR WAY TO BE LOW BANDWIDTH, OTHERS DO NOT MIND AS MUCH, SOME CARE ABOUT SERVERS PERFORMANCE OTHER PEOPLE, IF IT IS GOING TO KEEP UP WITH THE FRAME RATE, IT IS FINE, THAT KIND OF THING SO IT IS HARD TO SAY >>AMANDA: IT IS A CASE-BY-CASE BASIS DO WE HAVE ANY PLANS TO HAVE THE NETWORK PROFILER ADDED TO THE UI OF THE EDITOR? SO INSTEAD OF HAVING TO RECORD, SAVE, AND LOAD SEPARATELY? >>RYAN: WE ARE THINKING ABOUT WAYS TO DO THAT WE DON’T HAVE ANY SPECIFIC PLANS OR DATES, BUT IT IS DEFINITELY A PAIN POINT INTERNALLY AS WELL WE WOULD LIKE TO IMPROVE THAT SITUATION >>TIM: SO IT IS NOT A NO

>>RYAN: NOT A NO, NO >>AMANDA: DOES FORCE NET UPDATE OVER RISE DORMANCY? >>DAVE: IT FLUSHES DORMANCY, IT WILL NOT PUT YOU INTO THE AWAKE STATE, BUT IT FORCES AN UPDATE TO GO THROUGH AND THEN THE ACTOR WILL STAY IN ITS DORMANCY STATE — LET ME CLARIFY, IF IT IS DORMANCY INITIAL FLUSH NET UPDATE, THAT WILL TRANSITION YOU OUT OF DORMANCY INITIAL INTO DORMANCY ALL, BECAUSE THE IDEA OF DORMANCY INITIAL IS YOU HAVE NOT CHANGED SINCE THE INITIAL STATE YOU HAVE CHANGED ONCE SINCE THE INITIAL STATE, BUT ONLY — WELL, YOU WILL NEVER GO BACK TO DORMANCY INITIAL IT WILL MAKE ONE UPDATE GO THROUGH, AND THEN KEEP YOU AT WHATEVER DORMANCY LEVEL YOU WERE >>AMANDA: ARE THERE ANY RESOURCES WE HAVE ON REMOTE DEBUGGING DEDICATED SERVERS? ARE YOU AWARE OF ANY GOOD ONES WE UTILITZE? >>DAVE: WELL, WE KIND OF — WE WILL DO — WE KIND OF DO A LOT AT THE SYSTEM LEVEL WHERE WE HAVE A CHEAT COMMAND IN FORTNITE. YOU CAN TYPE CHEAT WHATEVER YOU WANT AND THAT WILL EXECUTE THAT COMMAND ON THE SERVER, LIKE RCON OR OTHER SIMILAR COMMANDS BASICALLY, THAT ALLOWS YOU TO RUN CONSOLE COMMANDS FROM A CLIENT ON THE SERVER THAT ALONE IS USEFUL LOT OF THE TIMES, I WILL BE USING THAT, RUNNING CONSOLE COMMANDS AND THE SERVER LOG UP AS I’M WORKING AND I WILL USE THAT TO POKE AROUND AND DO OBJECT LISTS OR WHATEVER KIND OF ENGINE DEBUGGING STUFF ALREADY IN THERE ADDITIONALLY, INDIVIDUAL SYSTEMS — REP GRAPH HAS SOME OF THIS STUFF EVEN THE ABILITY SYSTEM HAS SOME OF THIS STUFF, TOO, WHERE I WILL SET UP AN RPC, THAT I CAN SAY, “HEY, FROM CLIENT TO SERVER, I WOULD LIKE TO KNOW THIS INFORMATION” AND THEN THERE WILL BE A SERVER TO CLIENT, RPC TO GO BACK AND TELL THE CLIENT WHAT YOU NEED TO DO, AND SOMETIMES YOU CAN THEN WRITE MORE CODE TO DRAW IT UP ON THE SCREEN IT IS VERY MUCH ON A PER-CASE BASIS, YOU HAVE TO — YOU HAVE TO THINK ABOUT THAT STUFF DO I NEED TO DEBUG, YOU KNOW, SERVER LOGIC FROM A CLIENT IF YOU DO, YOU NEED TO PLAN AHEAD FOR THAT IT WOULD BE NICE IF THOSE WERE MORE GENERIC, BUT I DON’T KNOW >>RYAN: ONE OF THE THINGS YOU MENTIONED, RUNNING CONSOLE COMMANDS ON THE SERVER — YOU CAN TAKE THE NETWORK PROFILE CAPTURE I SHOWED EARLIER, IF YOU ARE RUNNING ON STAND ALONE, YOU HAVE A COOK’S BUILD OR WHATEVER, YOU YOU WANT YOUR CLIENT LOCALLY AND YOU WANT THE DEDICATED SERVER TO RECORD ONE OF THOSE NETWORK PROFILES, YOU CAN DO THAT IF YOU SEND THE CONSOLE COMMANDS TO THE SERVER >>AMANDA: DO WE HAVE INTERNAL RULES FOR RELIABLE AND UNRELIABLE CALLS? >>RYAN: DON’T USE THEM UNLESS YOU ABSOLUTELY NEED TO >>DAVE: THAT’S A GOOD RULE OF THUMB I WOULD NEVER USE A RELIABLE MULTI-CAST EVENT IT EVEN HAS BEEN DEBATED IF IT SHOULD BE ALLOWED CLIENT AND SERVER RPCS, THERE ARE MORE CASES WHERE THOSE CAN BE RELIABLE IT DEPENDS, IT IS — I WOULD TRY TO FRAME IT LIKE THIS: JUST BECAUSE YOU THINK IT IS IMPORTANT, LIKE, THE PLAYER WOULD HAVE A BAD EXPERIENCE IF THEY DIDN’T GET THE UPDATE IS PROBABLY NOT A REASON TO MAKE IT RELIABLE IF IT IS LIKE, MY CODE WILL NOT FUNCTION IF THIS DOESN’T GET THERE — I’M BUILDING IN ASSUMPTIONS THIS WILL BE THERE, THEN THAT’S A GOOD CASE. A GOOD EXAMPLE IS THE ABILITY SYSTEM, THE SERVER WILL TRY TO ACTIVATE ABILITY, AND THEN SEND A RELIABLE CONFIRM OR DENY. THOSE ARE IMPORTANT BECAUSE BOTH SIDES ARE DOING BOOKKEEPING ABOUT IF THEY ARE ACTIVATING ABILITIES YOU DON’T WANT TO HAVE THAT CODE IN ADDITION TO HAVING TO ABSORB, A PACKAGE — YOU DON’T WANT THAT CODE TO DETECT A DROPPED PACKET YOU WANT THE ABILITY SYSTEM CODE TO RELY ON IT — THIS ABSOLUTELY HAS TO GET THERE IF IT IS AN RPC THAT IS GOING TO, LIKE, PLAY AN EXPLOSION OR AN EFFECT, JUST BECAUSE YOU THINK IT REALLY SHOULD GET THERE, I WOULD PROBABLY MAKE THAT AN UNRELIABLE THING I THINK, RELIABLES CAN BE —

THEY CAN BE A LITTLE TRICKY, BECAUSE THEY WRITE TO THE SEND BUFFER IMMEDIATELY THERE’S A LOT OF EXTRA BOOKKEEPING IF YOU GET INTO CASES WHERE YOU HAVE A LOT OF PACKET LOSS AND A LOT OF RELIABLES GOING THROUGH, YOU HAVE THE POTENTIAL TO REALLY CAUSE A TRAFFIC JAM AND ALL OF THIS CHAOS CAN KIND OF HAPPEN SO, I DON’T KNOW >>RYAN: I WOULD SAY, ABSOLUTELY DON’T — PRETTY MUCH BAN THIS INTERNALLY — DON’T SEND A RELIABLE RPC EVERY FRAME, ESPECIALLY FROM A CLIENT THAT COULD HAVE AN UNCAPPED FRAME RATE, FOR EXAMPLE THAT CAN QUICKLY EXHAUST THE RELIABLE BUFFER AND CAUSE BACK UP IN THE NETWORK STREAM AS THEY ARE RESENT, IF THERE IS ANY PACKET LOSS AND SO ON ANYTHING SENT EVERY FRAME IS USUALLY UPDATING SOME PROPERTY-LIKE VALUE THAT IS UNRELIABLE AND YOU WANT THE LATEST VERSION OF THAT VALUE ANYWAY IF SOMETHING IN THE MIDDLE IS DROPPED, IT DOESN’T REALLY MATTER THINGS LIKE, THE CHARACTER POSITIONS AND STUFF LIKE THAT >>DAVE: THAT IS LESSON NUMBER ONE, YOUR STATE SHOULD BE REPLICATED THROUGH PROPERTIES, USE RPCS FOR EVENTS, LIKE ONE-OFF THINGS THAT ARE YOU EITHER GET IT OR YOU DON’T KIND OF STUFF IF YOU ARE EVER DOING IT THE OPPOSITE WAY, IF YOU ARE REPLICATING THE PROPERTY ALL THE TIME, USING PROPERTIES TO REPLICATE EVENTS CAN BE DICEY REPLICATING STATE THROUGH EVENTS, RPCS, THAT IS REALLY BAD, THAT IS WHAT I WOULD STAY AWAY FROM >>RYAN: THE RULE OF THUMB I TRY TO ENCOURAGE OTHER PEOPLE TO FOLLOW AND I FOLLOW, IF YOU ARE WRITING AN UNRELIABLE CLIENT RPC, SERVER TO CLIENT RPC, CONSIDER WHETHER IT SHOULD BE A REPLICATED PROPERTY INSTEAD OF AN RPC IN MOST CASES, THEY CAN, AND MOST CASES IT WILL WORK OUT BETTER IF THEY ARE >>AMANDA: ALL RIGHT WE DO HAVE A FOLLOW-UP QUESTION, WE TALKING ABOUT SERVER PERFORMANCE DEGRADING OVER TIME, AND THERE IS CLARIFICATION DUE TO TIME PRECISION CAN WE EXPLAIN THAT? THERE’S A LOT OF FRAGMENTING COMMENTS >>RYAN: SO ONE THING THIS MAY BE REFERRING TO IS THE INTERNAL TIMER ON THE NET DRIVER IS A 32-BIT FLOAT THAT STORES SECONDS IF YOU HAVE A LONG-RUNNING SERVER OVER A DAY OR SOMETHING, I FORGET THE EXACT NUMBER OF HOURS WHERE THE PRECISION BREAKS DOWN, BUT IN THAT CASE, YOU CAN RUN INTO PROBLEMS BECAUSE THE INTERNAL TIMER ISN’T HIGH PRECISION ENOUGH REALLY, I THINK WE JUST NEED TO MAKE THAT A DOUBLE OR SOMETHING AND FIX THAT PROBLEM YOU ARE WELCOME TO DO THAT, TOO, IN YOUR BUILD OF THE ENGINE IF YOU NEED THAT >>AMANDA: DO YOU HAVE ANY INFORMATION, OR ANYTHING YOU CAN SHARE, ON WHAT THEY CAN EXPECT FROM YOUR TEAM IN THE FUTURE? NO? [ LAUGHTER ] >>RYAN: MORE OPTIMIZATIONS, WE ARE CONSTANTLY TRYING TO IMPROVE THE LOWER-LEVEL SYSTEMS, ASIDE FROM WHAT I COVERED TODAY THAT ARE EXPOSED TO THE GAME LEVEL, HOW WE REPLICATE THINGS INTERNALLY, THERE IS STILL ROOM TO IMPROVE THAT CODE IN THE ENGINE WE’RE LOOKING TO IMPROVE THAT >>AMANDA: WE CAN WRAP IT UP THERE >>RYAN: THAT’S THE MAIN THING THAT I CAN TALK ABOUT >>AMANDA: THAT SOUNDS GOOD >>TIM: THERE’S A LOT OF QUESTIONS YEAH >>AMANDA: IT ALWAYS FEELS LIKE NETWORKING IS KIND OF MAGIC IT IS VOODOO AND SO — THERE IS CERTAINLY A LOT TO UNCOVER, IT IS VERY VALUABLE THANK YOU FOR JOINING US TODAY QUICKLY, I’M GOING TO DROP THE SURVEY INTO THE CHAT IF YOU WOULD LIKE TO JUST LET US KNOW WHAT YOU THOUGHT OF THE STREAM TODAY, AND YOU CAN TELL US WHAT YOU WOULD LIKE TO SEE IN THE FUTURE THERE HAVE BEEN A LOT OF REQUESTS FOR MORE NETWORKING STREAMS AND THIS IS A RESULT OF THAT SO DEFINITELY BE SURE TO FILL THAT OUT, AND ALSO WE PICK ONE PERSON FROM THE LIST TO SEND A T-SHIRT TO SO YOU CAN ALSO GET SOME SWEET SWAG, WHO DOESN’T LOVE THAT? >>TIM: WE WILL REACH OUT BY EMAIL

IF YOU ARE INTERESTED IN GETTING A SHIRT, PUT A GOOD CONTACT EMAIL INTO THE SURVEY >>AMANDA: YOU ARE UNDER NO OBLIGATION TO ADD ONE ALSO, ALWAYS CHECK FOR LOCAL UE4 MEETUPS IF YOU’RE MAKING A PROJECT, IT’S GREAT TO GET FEEDBACK CHECK OUT MEETUP.COM/PRO/UNREALENGINE, AND WE WOULD LOVE TO SEE MORE OF YOU THERE WOULD YOU LIKE TO TALK ABOUT THE SPOTLIGHT AND THE COUNT DOWN? >>TIM SLAGER: EVERY WEEK, WE START THE STREAM WITH A 5-MINUTE SPEED DEVELOPMENT IF YOU ARE WORKING ON A GAME, WE WOULD LOVE TO SEE IT, WE LOVE TO SHOW OFF THE WORK PEOPLE ARE DOING TAKE 30 MINUTES, COMPRESS IT INTO 5 MINUTES, SEND IT TO US AT COMMUNITY@UNREALENGINE.COM, INCLUDE A PNG OF YOUR LOGO AND A SHORT DESCRIPTION OF YOUR GAME YOU MAY SEE YOUR GAME FEATURED ON THE COUNT DOWN WE NEED TO MAKE SURE IT IS 5 MINUTES, NOTHING MORE, NOTHING LESS IT CAN BE ANYTHING FROM LEVEL DESIGN, TO DOING BLUEPRINTS, TO SEQUENCER, WHATEVER IT IS, YOU WERE DOING WORK ON IF YOU HAVE SUBMITTED ONE AND WANT TO SEND AN UPDATED ONE, WE WOULD LOVE TO SEE IT AS WELL >>AMANDA: WE’RE ALWAYS LOOKING FOR MORE COMMUNITY SPOTLIGHTS, FEEL FREE TO REACH OUT TO US; WE ARE OFTEN SCRUBBING THROUGH THE FORUMS WE ARE LOOKING AT RELEASED PROJECTS OR WORK IN PROGRESS, WE LOVE TO SEE WHAT YOU ARE WORKING ON, AND KEEP AN EYE ON SOCIAL MEDIA ALL THE THINGS THANK YOU, BOTH, FOR COMING THIS IS DEFINITELY A WEALTH OF INFORMATION, PEOPLE IN CHAT ARE TAKING NOTES AND THEY HAVE TONS OF IDEAS ON HOW TO IMPROVE THEIR GAME YOU ARE HELPING TONS OF FOLKS OUT SO WE WILL SEE YOU NEXT WEEK WHEN WE TALK ABOUT THE GAMEPLAY ABILITY SYSTEM SEE YOU THEN BYE!