{"author_link":"\/users\/gulyasarni66","author_name":"Gulyasarni66","author_uid":"gulyasarni66","comments":[],"epoch":1555190304,"event":"LD44","format":"md","ldjam_node_id":141666,"likes":12,"metadata":{"p_key":"127870","p_author":"Gulyasarni66","p_authorkey":"1000776","p_urlkey":"344000","p_title":"Engine Development - Day 11","p_cat":"LDJam ","p_event":"LD44","p_time":"1555190304","p_likes":"12","p_comments":"0","p_status":"WAYBACK","us_key":"1000776","us_name":"Gulyasarni66","us_username":"gulyasarni66","event_start":"1556236800","event_key":"75","event_name":"LD 44"},"node":{"_collation":{"body_sanitizer":"TextUtils::SanitizeHTML via existing importer","event":"LD44","removed_author":false},"_superparent":139254,"_trust":3,"author":776,"body":"Hello! After a day of hard work, scene saving\/loading is finally working! Well, sort of.\n\nFirst, I had to decide how to serialize all the data contained in a scene. As it turns out, this is a difficult task as I don't always know what I'm serializing. The user can make custom components that have all sorts of data that isn't known by the engine. So, I have to find all that at runtime.\n\nI've heard about reflection in the past, but I've never really used it. Well, until now anyway. It's a really cool concept that lets you tamper with the program's internal structure at runtime. I used it to find all relevant fields\/properties of objects and put them in a large, human readable file.\n\nI used a recursive function to find all relevant objects, and then simple string manipulation to compose the scene file.\n\nI can't really show you a gif or video of saving and loading scenes, but here's a picture of a part of a scene file.\n\n![day11-scenesaving.png](\/\/\/raw\/803\/z\/2016d.png)\n\nThat's it for today. Tomorrow I'll polish some aspects of scene saving\/loading and implement some missing features. After I'm happy with it, I can move on to creating a level editor! Cheers!","comments":1,"comments-timestamp":"2019-04-13T23:27:14Z","created":"2019-04-13T21:03:09Z","files":[],"files-timestamp":0,"id":141666,"love":12,"love-timestamp":"2019-04-17T22:06:07Z","meta":[],"modified":"2019-04-17T22:06:07Z","name":"Engine Development - Day 11","node-timestamp":"2019-04-13T21:21:50Z","parent":140544,"parents":[1,5,9,139254,140544],"path":"\/events\/ludum-dare\/44\/$140544\/engine-development-day-11","published":"2019-04-13T21:18:24Z","scope":"public","slug":"engine-development-day-11","subsubtype":"","subtype":"","type":"post","version":421751},"node_metadata":{"n_key":"141666","n_urlkey":"344000","n_parent":"140544","n_path":"\/events\/ludum-dare\/44\/$140544\/engine-development-day-11","n_slug":"engine-development-day-11","n_type":"post","n_subtype":"","n_subsubtype":"","n_author":"776","n_created":"1555189389","n_modified":"1555538767","n_version":"421751","n_status":"WAYBACK"},"source_url":"https:\/\/ldjam.com\/events\/ludum-dare\/44\/$140544\/engine-development-day-11","text":"Hello! After a day of hard work, scene saving\/loading is finally working! Well, sort of.\n\nFirst, I had to decide how to serialize all the data contained in a scene. As it turns out, this is a difficult task as I don't always know what I'm serializing. The user can make custom components that have all sorts of data that isn't known by the engine. So, I have to find all that at runtime.\n\nI've heard about reflection in the past, but I've never really used it. Well, until now anyway. It's a really cool concept that lets you tamper with the program's internal structure at runtime. I used it to find all relevant fields\/properties of objects and put them in a large, human readable file.\n\nI used a recursive function to find all relevant objects, and then simple string manipulation to compose the scene file.\n\nI can't really show you a gif or video of saving and loading scenes, but here's a picture of a part of a scene file.\n\n![day11-scenesaving.png](\/\/\/raw\/803\/z\/2016d.png)\n\nThat's it for today. Tomorrow I'll polish some aspects of scene saving\/loading and implement some missing features. After I'm happy with it, I can move on to creating a level editor! Cheers!","title":"Engine Development - Day 11","wayback_source":[]}