ra’s avatarra’s Twitter Archive—№ 26,572

                  1. i think i am on to a permanent solution to state serialization in @arcadiaunity. fingers crossed.
                1. …in reply to @ra
                  the challenge is: unity uses a custom serialization mechanism to move data between its C++ core and C# land
              1. …in reply to @ra
                the mechanism is a pile of hardcoded logic in C++. it can serialize a fixed set of types and arrays of those types. its a closed system.
            1. …in reply to @ra
              it uses reflection to extract values from fields and set them as needed. long story short: hostile to clojure data structures.
          1. …in reply to @ra
            to serialize a new type, you have to represent it as a type unity can serialize. so, most of clojure data becomes edn, easy enough.
        1. …in reply to @ra
          but: how do you include a reference to a unity object in your persistent data? unity needs to see the object in a field to serialize it!
      1. …in reply to @ra
        and objects don’t have stable ids. how do you make this work at runtime? in export? between scenes? w/procedural generated objects? assets?
    1. …in reply to @ra
      i have theories and they involve Some Shenanigans but hopefully nothing too crazy
  1. …in reply to @ra
    anyway stay tuned for more Minutia of Parasitic Functional Video Game Framework Development right here on twitter dot com