{"id":4593,"date":"2017-01-15T23:53:23","date_gmt":"2017-01-15T23:53:23","guid":{"rendered":"http:\/\/phoenixgamedevelopment.com\/blog\/?p=4593"},"modified":"2017-01-16T00:19:20","modified_gmt":"2017-01-16T00:19:20","slug":"p0-p-172-part-87-server-serialisation","status":"publish","type":"post","link":"https:\/\/phoenixgamedevelopment.com\/blog\/p0-p-172-part-87-server-serialisation\/","title":{"rendered":"P0-P-172: Part 87: Server Serialisation"},"content":{"rendered":"<p>The next goal is to move the scene and game assets from the client to the server. I want to be able to store all game objects in the database, and then load them to and from the client as needed.<\/p>\n<p>To accomplish this, I intend to use Voxel Busters &#8220;Runtime Serialisation&#8221; asset, available from the asset store <a href=\"https:\/\/www.assetstore.unity3d.com\/en\/#!\/content\/36879\">HERE<\/a>. There is a free version <a href=\"https:\/\/www.assetstore.unity3d.com\/en\/#!\/content\/45137\">HERE<\/a>.<\/p>\n<p>This resource allows the serialisation of an entire scene, I can basically convert gameobjects into a string and send it to the database for storage. I can then restore the gameobject, including any scripts, textures, etc, completely from the database string.<\/p>\n<p>I was able to integrate the resource \u00a0quite easily. The only problem is that serialising a complex object produces a very long string, and serialising an entire scene of objects produces even longer strings. I am having issues dealing with this amount of data being sent from the unity game server to my c# server, which administers the database.<\/p>\n<p>I can increase the buffer size of the send\/receive buffers, but this is not an ideal solution.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The next goal is to move the scene and game assets from the client to the server. I want to be able to store all game objects in the database, and then load them to and from the client as needed. To accomplish this, I intend to use Voxel Busters &#8220;Runtime Serialisation&#8221; asset, available from [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,17,10,11],"tags":[],"class_list":["post-4593","post","type-post","status-publish","format-standard","hentry","category-astral-realms","category-p-0","category-software-and-games","category-spiritus-astrum","has-post-title","has-post-date","has-post-category","has-post-tag","has-post-comment","has-post-author",""],"aioseo_notices":[],"builder_content":"","_links":{"self":[{"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/posts\/4593"}],"collection":[{"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/comments?post=4593"}],"version-history":[{"count":4,"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/posts\/4593\/revisions"}],"predecessor-version":[{"id":4604,"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/posts\/4593\/revisions\/4604"}],"wp:attachment":[{"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/media?parent=4593"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/categories?post=4593"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/tags?post=4593"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}