Star Citizen: Around the Verse - Serialized Variables
Transcript — every row opens the video at that moment
- 00:00:16
hello and welcome to another episode of around the verse our weekly look at star citizens ongoing development I'm Chris Roberts and I'm Aaron Roberts and together we're Robert Square anyway uh I'm out in La work with Chris and the team on the upcoming 3.0 release um Squadron 42 and Beyond yeah and it's nice to have you out here hosting ATV with me uh we've got a lot of cool stuff planned uh going forward for 3-0 and Beyond and making sure the entire production team is on the same page as essential yeah absolutely tracking the progress of all the new features and assets we have planned is an absolutely massive task yes you know it definitely is uh and there is a lot of Technology coming online soon that we're excited about uh one of those is serialized variables which is the subject of our featurette today and while it may sound like high school algebra it's actually a critical system that's a core element of what we call
- 00:01:05
Star Network and but first before all that let's go to talk to Eric Karen Davis right here in Los Angeles for a studio update hey everyone welcome back to Los Angeles I'm senior producer Eric Karen Davis back with our monthly Studio update since I last saw you we've been focused on closing out final features and tasks for SC Alpha 3.0 and Squadron 42 part of this month I visited our Frankfurt and wils offices and worked closely with their teams for variety of reasons and now I'm glad to be back home to give you this update our narrative team has been quite jam-packed this month as well with item 2.0 coming online they have been knocking out a massive amount of component descriptions needed for the 3.0 release everything from coolers to Shield generators to Quantum drives the team has been also working on NPC voice packs for 3.0 as they wrote and recorded roughly 2800 lines for generic NPCs to really liven
- 00:01:53
up the world speaking of massive amounts of dialogue lines one of the challenges in dealing with the universe of this scale is keeping track of the various ious characters and lines that the player will encounter to keep track of all this the team has created a first pass at the persistent Universe character tracking sheet to provide a single resource for reference of lines file names for departments like audio animation facial capture and performance capture and overall status and priority for the massive amounts of dialogue for NBC's Mission givers and much more once this is completed it will help us immensely as we move through the integration of new Mission givers and NPCs in the future and lastly the team has been in the process of walking through the locations and writing up documentation of what we'd like to see as far as props posters signs branding and setd addressing to really make much more immersive environmental
- 00:02:41
storytelling also as part of the upcoming 3.0 release we're very excited about introducing cargo's mechanic and to ensure your ship is technically equipped we've wrapped up developing the cargo grids to provide the visual element of transporting Commodities like minerals scrap and food the number of Commodities you'll have will manifest as stacks of CR crates located within the ship's cargo hold Limited in capacity by the dimensions of the grid your ship can use you'll be able to park vehicles and other loose items into the cargo hold as well but just beware that it will limit the amount of grid space you'll have available for bought or scavenge Commodities code is wrapped up on the feature welld designed has now implemented the new cargo grids into all the ships that can carry cargo so you'll be hauling to your heart's content in no time engineering has also just finished up implementing the solar system content or what we've been calling object
- 00:03:30
containers into a hierarchy to ensure that outposts on a moon or Planet as well as space stations in near orbit are all in the correct planetary Grid at all times so for instance grimhex is now located inside the grid of the Moon yella for the time being and then speaking of the all powerful object containers we've also just been provided the much needed object container editing when creating a gameplay level we build that level with a combination of assets and object containers originally object containers had to be built in a dedicated object container level which unfortunately made the contents of the object container only editable in the actual object container level are you confused yet in other words when designers are building levels with object containers but want to modify the contents of that object container the only way to do that is to exit the current level open the object container
- 00:04:17
level do some tuning save export and leave then they'd have to move back into the level what the team has done now allows the designer to edit the contents of an object container save and Export all while inside the level this creates a much better experience for our design team and it's really going to save tons of time now as a general approach in game development we always try to make something once and make it perfect but since reality never meets expectations we are always looking for ways to reduce the time needed in what we call the discovery phase of a problem one of the hardest parts about getting a code bug is finding out what is causing it and where it's located so establishing tools and processes to reduce that time not only helps get to the speed resolution but also gets our talented programming team back to that feature we're also excited to develop So to that end we've
- 00:05:06
reworked the handling of vehicle internal damage states to significantly easier to set up now and debug interior damage States will be changed based on the cumulative health of a ship formerly It Was Written in flow graph but now it has been integrated into the vehicle component so that it can be used in a variety of places this new debug and setup process should do just that help us find the problem quickly solve it fast and get back to feature Dev time now on ifcs we've now moved the entire intelligent flight control system of our ship's update process to batch update because ifcs is very isolated from the physics engine taking in values like velocity Mass center of mass Etc and outputting one linear and one angular impulse there's no reason ifcs needs to be updated in lock step with the physics thread this change will be much more efficient El eliminating a major
- 00:05:53
bottleneck and hopefully allowing a larger number of simultaneous players on a server we've talked about also making progress on this for a little bit now and we've now completed the new Quantum Drive 2.0 we've removed the old code from the previous Quantum drive system that controlled things like V effects and sound effects playback as well as object obstruction detection and Alignment code we've also moved the targeting of a Quantum point to the Target selector on a ship so that drive now only cares about the travel Point itself this reduces complexity of the drive code and should make it run smoother we're doing some bug fixing as well as some features that attach to the Quantum Drive such as closing all external doors when doing a jump to help prevent accidents by jumping out of a ship traveling at high fractions in the speed of light this should all result in a smoother working Quantum Drive that is ready for design and art to really start
- 00:06:40
tweaking and implementing on all the ships it's also ready for UI to start creating a much more realistic feel for how such an event should be handled in game as well as a few other features like the star map now over on the LA ship front the RSI Aurora has gone through a final art check this week All That Remains are any incoming bugs while going through desig implementation animation updating sound effects and V effects Etc with this ship and we've also established up to 14 different skins for the designers to utilize as well the Anvil Terin is finalizing its gray box phase which means it's setting up the exterior hierarchy polishing proxies and baked and migrated animations for the interior we've currently polishing the geometry in the cockpit and the habitation and now moving into final art we've just handed the Terin over to Tech design for their gray box set up on the ship as
- 00:07:28
well [Music] also now that the conversion for ships
- 00:08:20
to item 2.0 is underway it's made sense to update our ship stats page on the website and we're really excited to finally be able to get to the up to the minute stats for all of our ships for all of you met out there the design has now been finalized icons finished and refined meaning and everything's being updated on the web as we speak they're being implemented on the RSI website with more details to come in the very near future now Tech Arts roles tends to increase the closer you get to a major release and as performance begins to take priority over feature and asset development using a plethora of internal tools Tech art has been reviewing the release to identify code and content fixes that would dramatically improve performance one in particular is called status scope which PL plots graphs from data logged on a perf frame basis and more generally it's the system that produces and manages that data in essence it provides a way of recording
- 00:09:08
values such as FPS number of draw calls Etc from Star Citizen and showing how they change over the course of a playthrough this really helps our development team find ways to improve performance by looking for frame time offenders now Tech animation improved the animation format that animations are saved as and then reloaded into a scene in our worst case scenario a scene could take up to 50 minutes to load into Maya due to the amount of characters and length of the scene but with this Improvement the worst load time has been dramatically reduced by over 82% meaning cinematics won't be waiting long to make quick iteration and over on the skinning front a female transfer mesh has been created and the male transfer mesh has been massively updated now these transfer meshes are used in conjunction with all of our skinning tools to automate basic skinning of all of our new characters Tech animators can now spend time perfecting The Waiting of a
- 00:09:57
mesh allowing for a higher quality and a more accurate deformation in less time on many of our heads we've run into an issue where the eyelids had some vertex normal issues which led to eyes looking pretty odd our Tech art team has now identified the issue and because the vertices of the eyelids were so close together the normal would get flipped but only on a few verts so this was now been fixed and characters can now sleep with ease and speaking of characters the team here has been knocking out countless costumes for squadron 42 and Star Citizen currently in production another female character is finishing up her in-game asset and then will be sent over to texturing and rigging along with our OMC undersuits that have all
- 00:10:43
finished up in-game modeling and they're heading on over to texturing the team also has several other levski specific characters the civilians and the miners which are currently being textured then we'll head over to rigging and implementation into their final resting place in game on the great planet of Delmar and now another exciting news now that we're in a modular armor system we're reworking some of our Legacy uee and pirate armors to bring them up to the quality of our current assets this will allow them to be swappable with all those assets we've officially started High Poly on some of your favorites now we'll be moving on to the in-game modeling and texturing path rework and speaking of customization along with the new eye options we'll have a multitude of styles of hair coming in the upcoming releases starting with a select group for 3.0 these are in various states of production and heading toward the final finish line we'll have a select group
- 00:11:32
ready for the initial release and we can't wait to cover up those hairless heads and finally we have more finished rigged and Implement character starting with the male Marine BDU which will make its appearance in several places including the bridge of the Idris The Male Deb crew can now safely Eva outside the ship in the vacuum of space when doing his work and lastly the female light armor has finished up her implementation pass along with the female explor flight suit which will support her in the far reaches of the game Galaxy well that's about it and wraps us up here in Los Angeles as always thank you for allowing us to create this game we've always dreamed about and we look forward to giving you more updates in
- 00:12:19
the near future have a fantastic rest of the week we'll see you back in Los Angeles in no time so it'll be nice to see people hauling something other than big Benny's vending machine and unsuspecting NPCs uh as great as all those videos were the team has worked hard to give you a proper mechanic for the 30 release yeah cargo is just one of the many important features we're currently working on a lot of them like cargo and say deric ships will be easy to see While others like serialized variables aren't as visible but are just as critical to the game yeah no they're absolutely definitely as critical to the game because when you're attempting to build a game as large and complex as star syi it's essential to come up with a new way to streamline the data being transferred between the server and the clients and so here to explain exactly how serialized variables will improve our networking capabilities and of course most importantly your star CZ and experience let's hear from lead Network
- 00:13:06
programmer Clive Johnson my name is Clive Johnson I work for Foundry 42 UK where I'm the lead Network programmer at working on Star Citizen today we're going to talk a little bit about serialized variables so what are serialized variables well they're not really something that you can see in the game and ideally if everything's working the way it should then they're not something that you really ever need to think about but they are the answer to a question uh which I think is quite important and that's how do you network a game like Star Citizen one of the first times I asked myself that question was shortly after I joined the company and I think my first reaction was one of sheer Terror you know tears panic and once it
- 00:13:58
kind of calm down and the tears had stopped you do what any engineer is going to do when faced with a impossible problem you try and break it down into smaller impossible problems when trying to answer the question how we Network star seon one of the first things we've got to think about is exactly who's going to do the work who's going to network everything we have in the game now star citiz itself is made up of thousands of different elements and some of these are visible like planets and ships and players and coffee cups and others you don't see like missions or the logic assigning out landing pads each of these elements is really a different type of entity and each type might be used thousands of times throughout the game but all the types behave in specific ways or have certain uses and that has
- 00:14:47
to be implemented in the code and most of them need to work in both single player Squadron 42 a multiplayer the Star Citizen in other words most of them have to be networked so who's going to do the work well currently we've got about 60 Engineers C in different parts of the game but we have only six Network programmers half of these work in Austin on backend services and that includes you know our core online services such as matchmaking and friends and player authentication the other half is my team here in the UK and we focus mainly on the networking between the client and the server uh so it's kind of up to us to make sure that all the entity types are correctly networked and everything's functioning the way we'd like it to in
- 00:15:35
the multiplayer game but with 60 programmers or there abouts writing new code and making new entity types if we've only got three actually making it work in multiplayer my team needs to work about 20 times faster than anybody else you know we're good but we're not that good so clearly leaving all the network into the network programmers is not going to work so what we need to do is um have every engineer make sure that their own code Works in multiplayer well the problem with that is that Network programming is really very hard and it it can take years to learn all the different ins and outs so we need a way to simplify it so that you know non-sp Specialists can learn everything they need to do in just like a couple of hours what we need is an API which stands for an application programmer interface and that's really a cushion
- 00:16:24
between a programmer doing the work and the problem that they want to solve the API kind of simp simplifies things by allowing the programmer to say exactly what it is that they want to do but without saying how it should be done so you can kind of think of it like driving a car so obviously you've got your steering wheel and the pedals and you know other controls gear stick whatever that's not how the car drives they ad just the controls that tell the car what to do so under the hood the driver's commands are turned into you know different settings for like fuel air mixture or engine timing or hydraulic pressures for brakes and power steering and that's kind of the inter face part of an application programmer interface by building the right set of controls you can change how the API actually works without having to change the code so what about driver error cars equipped with assisted driving can take action
- 00:17:13
when a driver makes a mistake and possibly prevent a crash we want the same sort of thing from the API that we're going to develop when a a program is using it it actively prevents them from making mistakes that might cause us bugs or negatively impact performance but we can go a bit further though So currently the technology for driverless cars is being developed when that happens the skill needed to operate a driverless car drops to just saying where you want it to go and this is what we've tried to do with our Network API serialized variables are a really big part of that by giving our programmers a simpler model to work with they can quickly and safely Network the game elements that they're working on meanwhile those Network programmers um are freed up to try and ensure that that the API not only works quickly and
- 00:18:00
efficiently but also it deals with all the problems that you can get while networking anything so before we go any further we probably need to talk about another question and that's how do online multiplayer games actually work if you were to see the game as programmers often look at it you'd see that everything is essentially lots of tables of values every entity in the game has its own table and each value corresponds to a different property of The Entity because we need to know what each value is for we've got to give them all names so a table has two columns names on the left hand side and values on the right a row in a table is what we call a variable and that's mainly because its value can change over time the ship might have variables for shield strength and how much fuel it's got left
- 00:18:48
um players can have variables to say whether they're running or walking and most but not all of these variables uh will have an entity called a position and that's going to tell us exactly where they are in the the games universe and even though we kind of need three values for coordinates in 3D space we tend to think of position as a single variable because one part changes the other parts tend to change so when an entity moves it does so because the position variable has been changed that that variable is not really just keeping track of where the entity is it's actually saying where the entity is programmers can write code that that looks at the values in a in a table that belongs to anty and we can use those values to calculate some changes to other variables and some of those variables might be in the same table or some might be in other tables belonging to different entities so as the game
- 00:19:37
progresses these variables are modified according to you know the actions of players and Ai and these changes update the the graphics that you see on screen and they can trigger particle effects and sound effects to make this work in multiplayer we've got to take one machine the server and have that make the changes to the tables and then the server then needs to copy the modified tables to all the the machines all the clients and it does this by sending messages over the network a bit like a group text message and if everything works correctly the clients and the server all have the same data in the tables and everyone's in sync now entities in our game can have dozens or even hundreds of these variables or properties and most of them need to be kept in sync over the network there are a few ways we could do this
- 00:20:25
and probably the most straightforward way is every now and then just to send the state of all the tables and that works really well for very small numbers of entities but as the number of entities increases then the bandwidth that you're using to do that increases and if we're not careful that can cause us other problems we might notice that most entities in the game don't tend to do much until someone does something to them so what we can try is not sending uh the table for an entity unless it has changed but now the game code's got got to keep track of which entities have changed and which haven't and that can be tricky to get right it's a manual process that the gameplay programs have to do getting it wrong means that in certain situations the tables for particular entities will no longer be in sync we call that a desync
- 00:21:13
and the effects of that can range from like minor bugs that are just little annoyances to completely break in the game and the only way to find these bugs is suit lots and lots of timec consuming play testing perhaps worse we haven't really solved the band problem either by adding more players that means that more entities will be being interacted with and having things done to them so more tables are going to be getting updated and more messages need to be sent out over the network and the bandwidth jumps up once again we still need to reduce this so we might notice that when an en's table is modified not all the values in it are changed so instead of sending the whole table we could try just sending a few of them at a time so we can split the table into sections and then we're saving bandwidth by only sending in the section if one or more of the variables in it have changed
- 00:22:01
if we put variables that are likely to change together in the same section then we can see save even more but now the game code's got to keep track of not just modifications to entities but modifications to individual sections and that's even harder to get right we also got to write some extra code to say which variables need to be put into which messages and since different types of entities have different sets of variables uh they also need different sections so this extra work as to be duplicated for every different type of entity so the thing that really kills this plan for Star Citizen is entity components a component is really it's just a piece of code and some variables that Implement a very specific piece of functionality so entities get built by plugging different components together and by choosing different components
- 00:22:49
that you want to plug together that gives us different types of entities if you need an entity that can move around and collide with other things then you have to give it a physics components your entity needs Shields give it a shield component the number of different entity types we can build this way grows exponentially with the number of different components that we have but what also grows exponentially is um the amount of networking work we've got to do to cover all these different entity types so clearly this isn't really going to work for us our networking API needs to be smarter what we wanted were controls uh that were as simple as those for a driverless car and what we had felt like it was is as complicated as pilo in a space shutle so that's when we came up with um serialized variables so with these gameplay programmers just need to write their code the way they normally
- 00:23:36
would and they're adding variables to their components uh as they need them and the only extra thing that they need to do is Mark the variables that they want networked uh in a special way and that just shows that these ones are ones that need to be serialized serialization is a process of packing up the data in a form that's more efficient and better suits being sent over the network or serialized to a file this makes life so much easier for our programmers you can see how the code on the left can be simplified and reduced to what's on the right it's really just like writing normal code and calling out which of the variables we want serialized the program only needs to write the additional lines that you can see highlighted in purple on the right and add them to their struct or class definition and that tells the serialized variable system which members of the structure to watch and update previously we would have needed specific functions um in each
- 00:24:25
class one for net serialized for networking full serial eyes for the save game and if we wanted to talk to the persistent database we would have needed an extra function something like persistent serial eyes in these functions the game programmers would have had to manually look at the variables they wanted to serialize and write them out into the serialization stream so there's lots of scope there for extra work and possible errors if they forget to add a variable but now when a programmer writes a new class they can just mark up which of the variables they want to be serialized and everything else is handled automatically and efficiently behind the scenes and that all goes through one Unified system that we can profile and optimize as opposed to having to worry about optimizing literally thousands of different functions once the variables have been marked there's there's no need to group things into sections anymore um there's no extra code to write the API detects uh when something has modified
- 00:25:13
the value of a variable and it lets the net code know so that I can deal with it new API even writes uh the code to handle the serialization for them and this kind of level of automation uh not only saves us time but it it eliminates human error mean we have a lot fewer bugs uh and we can just get on more quickly and more efficiently so because the net code's now being told about changes to individual variables we're on the networking side of a much clearer view of what what's actually happening in the game so you can kind of think of it like switching to a 4K TV when all you've ever seen before is like grainy black and white and we we're kind of using this extra information at the moment so that we only send exactly what has changed and that means that our bandwidth perir update message the size of our update messages is now probably
- 00:26:02
about as optimized as it's possible to get we're also using this information so that we can profile what's being sent by um by the game code what when it's marking variables dirty so we can see if anyone's hitting anything particularly quickly and maybe there's a bug in the game code and he's looking at really the only kind of over improvements that we're we're going to get from now on by optimizing like streams of network messages cutting out who's sending messages at all and how often messages are being sent we can handle all that on the network side on the net code side so it's kind of like I was saying before where we've got this interface of the API that separates game code from what we need to do and we can make our changes without affecting that while we were working on this new technology we noticed that one of the The Entity types started sending about 80% L data and at
- 00:26:53
first we just didn't believe that we were certain that the numbers have got to be wrong or that are bugs throwing away most of the data it wasn't until you know we went back and we double checked everything that really we started to realize that this saving is actually real and that it's due to the new code that's probably not going to be typical but it still kind of shows that the difference this kind of approach can make that's not entirely where the story ends though because one of the other cool things about serialized variables is that they don't just work for multiplayer and networking instead of sending the different tables and values and variables between just server and clients we can also store them in a database or save them to a file and that means that for no extra effort at all the gameplay programmers can use the same serialized variables for
- 00:27:41
persistence uh recording what's the state of entities are is in our persistent universe and we can even use them for save games in Squadron 42 personally I think probably the best thing about serialized variables is that they're one of the the cornerstones that we're using to build this this big seamless persistent Universe achieving that is going to require spreading the load over multiple servers because it's seamless we're going to have to have these servers communicate with each other and that's going to mean that there there could be a lot of servers aware of any particular entity so let's say for example an AI pirate now we don't want all the servers trying to tell the pirate what he should be doing because first that would be just a complete waste of computing power and the second reason is that the might not agree on what the AI should do next so
- 00:28:30
we need one server that's in charge of the AI pirate and only that server can send updates for that AI pirate entity and the other servers just listen to it so the trick is going to be how we decide which server gets the final say and we're going to do that with something that we're calling tokens a token can only be held by one computer at a time when a computer's finished with a token it just passes it on to the next one that wants it so by linking serialized variables tokens together will be able to transfer Authority from one server to another as quickly as flicking a switch what that means for our AI pirate is that control over its AI mind can pass seamlessly from one server to another and since different servers at least initially will control different regions of space this
- 00:29:18
combination of tokens and serialized variables will allow our a pirate and everything else to move freely through this seamless persistent universe that's been simulated by lots of servers all working together so hopefully you'll agree that serialized variables are not only a key part of the current technology but they're they're a building block for future ones and that's really not bad for something that you're never going to see but that's often the reality of game development and what you see in games really just the tip of an iceberg that's being boyed up by a mass of systems and Technologies all working together you know out of sight and fingers crossed lost out of mind so as you can see the serialized variable Tech is an important feature for several reasons it not only improves the games networking but also simplifies
- 00:30:06
the coding for our programmers so there'll be fewer bugs going forward and the same data can be serialized over the network to the persistent database or save the state of the game meaning we have one unified way to communicate or save game State um throughout everything which is very important for a big huge Universe like we're building absolutely anyway that's it for today's program but before we go uh we wanted to remind all backers to keep your account safe by enabling twostep authentication you can do that by visiting your account page then clicking on the security tab under settings yeah it's probably a good idea to do that and thanks to all our subscribers your continued support makes ATV bug smashes and all our programs possible and don't forget to tune in tomorrow for another one of our subscriber supported shows Happy Hour Friday this week Ben Lesnik will be
- 00:30:54
playing win Commander free And discussing the history behind the game and its development and man Chris's case that's a long time ago yeah 24 years ago we were developing it um so uh anyway time flies uh finally I'd like to thank all our backers uh your support and enthusiasm for the game has made all this possible we couldn't do it without you so until next week we'll see you around the ver thank you for watching so if you want to
- 00:31:52
keep up with the latest and greatest and staff citizen of Squadron 42's development please follow us on our social media channels see you soon
Transcript from YouTube’s automatic captions — punctuation and Star Citizen jargon are approximate. The video itself is hosted by CIG on the official channel.

