The test yesterday went well. We got the whole office (mostly) to work from home without significant issue. As a result, Klei Staff that can work from home have been asked to do so until further notice. This means that we will have to cancel the Rhymes with Play stream until we are all back in the office. This shouldn't affect anything else at least in the short term, but if things change I will update you all here. Original Post: Hey everybody, This Tuesday March 10th, 2020 the entire staff at Klei will be working remotely for 1 day in an effort to prepare the studio to work remotely for a little while if the need arises. Klei is already set up pretty well to allow for working remotely, however we are going to have a one day "dry run" with the whole studio so that we can identify and avoid any issues or downtime that may arise should choose to implement a work from home policy due to COVID-19 outbreak concerns. Unfortunately this does mean that we will be canceling the “Rhymes with Play” Art stream this coming Tuesday, however unless the situation changes we expect everything at the studio to be back to normal Wednesday and we’ll continue our regular stream schedule Thursday March 12th. If the situation changes at all, we'll let you know. Thanks for your understanding.
Search the Community
Showing results for tags 'serialize'.
Found 1 result
I've been looking into saving game state to file system. Specifically, serialize all the lua tables relevant to the game state into json. This will pose two obvious challenges: a) some game objects may be recursive; b) functions cannot be sensibly serialized in general. There are quite a few libraries and methods to go about this . And the game already uses a few methods (namely `./scripts/json.lua` and `./scripts/inspect.lua`). The idea is that we can iterate over the common game tables such as `TheWorld`, `ThePlayer`, `TheNet` etc. recursively, and convert each key-value pair into string, indenting appropriately. This is already implemented in `debugtoosl.lua:dumptable()` as well as `table.inspect()` both of which can serialize/convert a `lua_object` into `String`, which can then be printed or saved into a file. The issue is, when I tried `table.inspect(ThePlayer)`, or `table.inspect(ThePlayer.components)` or even `table.inspect(ThePlayer.components.Builder)`, the game simply ate all my 8G of RAM and got killed by the OS. I wonder if it would be possible to write to a file incrementally instead of creating the whole representation in RAM, holding the string in RAM then writing it to a file. Using common tools to inspect (deeply nested) `json` data, it would make it easier for Modders to learn about how this game works in general and would prove to be a very good mental model and guideline for reading and modding the game source code. In the end, I'm looking to get something like this (after loading the `json` into some `json` inspector; heck even Chrome can inspect `json` files with tree-like inspection support): _G ├── TheNet ├── ThePlayer │ └── Components │ └── Builder └── TheWorld └── SeasonManager p.s. This would also make tools like DSTed  very powerful, enabling users to traverse game state that was stored during game play.  http://lua-users.org/wiki/TableSerialization