{"id":406,"date":"2017-07-27T23:45:39","date_gmt":"2017-07-28T06:45:39","guid":{"rendered":"http:\/\/lucasmagder.com\/blog\/?page_id=406"},"modified":"2017-10-30T08:49:35","modified_gmt":"2017-10-30T15:49:35","slug":"frosting","status":"publish","type":"page","link":"http:\/\/lucasmagder.com\/blog\/projects\/frosting\/","title":{"rendered":"Frosting"},"content":{"rendered":"<p><div class=\"add_posts\"><div class=\"add_posts_content\" style=\"clear:both;\"><h2 class=\"title\" style=\"clear: none;\"><a href=\"http:\/\/lucasmagder.com\/blog\/2017\/07\/trust-people-when-they-say-write-games-not-engines\/\">Trust people when they say \"write games not engines\"<\/a><\/h2><div class=\"post-content\" style=\"clear:both\";><p>...unless you really like writing engines, which I do.<\/p>\n<p>I never got around to posting about this project since I was kind of waiting for it to be something cooler, but a couple of years in of working on it once in a while the amount of work left kind of hit me. In the depths of my broken animation blending code I was like \"wait, what am I even doing here? this is not even close to being a dungeon crawler\" So behold: \"Frosting\", another one thrown on the pile of unfinished engines!<\/p>\n<p>The genesis of this project started back before I had spent time with Unreal and had only really worked on the NV-in-house engine and Cryptic's engine. The NV engine or \"NVDemo\" as we called it had pretty advanced rendering features since our projects were maybe 85% rendering\/shader code, 10% menus, 10% demo\/attract mode logic, but it didn't have much in the way of anything else and it was geared towards small scenes, so no real streaming, networking, game logic, etc.<\/p>\n<p>I happened to come across an article about the high-level design of the Unreal 1 networking architecture (since eaten by the internet) and thought \"wow this is a whole other can of worms than what I've worked on so far!\" also I found this article on draw call management&nbsp;<a href=\"http:\/\/realtimecollisiondetection.net\/blog\/?p=86\" target=\"_blank\" rel=\"noopener\">Order your graphics draw calls around!<\/a>&nbsp;Doing it exactly like this doesn't make much sense in the era of Vulkan and friends, but at the time it seemed fancy. Plus, I didn't like this thing, or that thing with our system at work and wanted to try my crack at a clean slate.<\/p>\n<p>My goal was to build a realtime hack-and-slash rougelike, but mostly I just got a bunch of test levels and crates you can knock over \ud83d\ude42 Since I knew the least about the non-graphics stuff I started with that which is why the rendering is so basic, no shadows, directional light etc. Otherwise I might accidentally make a rendering engine again and end up with no gameplay. I didn't really get that far but it had some neat features:<\/p>\n<ul>\n<li>Serialization and replication\/diffing of C++ objects without running a custom preprocessor, mostly as a challenge after using NVDemo and UE<\/li>\n<li>Command buffer-ish rendering architecture&nbsp;<\/li>\n<li>Fancy GUI editor \"Cobbler\" (everything is dessert themed for some reason I can't remember) with full undo\/redo using said serialization system<\/li>\n<li>Reliable unicast\/multicast RPC method calls, and reliable\/unreliable property replication<\/li>\n<li>Network games that work both with a headless dedicated server, and player server<\/li>\n<li>Bullet for physics, which also replicate (mostly because it's not NVIDIA PhysX...learning stuff!)<\/li>\n<li>Play-in-editor mode. the editor is a server you can connect to. When not PIE you're a spectator, watch designers place things! (ok this feature basically came for free)<\/li>\n<li>Streaming and hot reloading&nbsp;<em>everything&nbsp;<\/em>textures, models, animations, prefab definitions, fonts, shaders<\/li>\n<li>Generic sockets, skeletons. Parent components to sockets on skeletal meshes, physics bodies. Attach random stuff together!<\/li>\n<\/ul>\n<div class=\"aligncenter\" style=\"margin: auto; width: 550px; height: 150px;\">\n<div id=\"attachment_355\" style=\"width: 160px\" class=\"wp-caption alignleft hack-thumbnail\"><a href=\"http:\/\/lucasmagder.com\/blog\/wp-content\/uploads\/2017\/07\/EditorShot1.png\"><img aria-describedby=\"caption-attachment-355\" class=\"size-thumbnail wp-image-355\" src=\"http:\/\/lucasmagder.com\/blog\/wp-content\/uploads\/2017\/07\/EditorShot1-150x80.png\" alt=\"\" width=\"150\" height=\"80\"><\/a><\/p>\n<p id=\"caption-attachment-355\" class=\"wp-caption-text\">Editing while spectating as through a game client<\/p>\n<\/div>\n<div id=\"attachment_356\" style=\"width: 160px\" class=\"wp-caption alignleft hack-thumbnail\"><a href=\"http:\/\/lucasmagder.com\/blog\/wp-content\/uploads\/2017\/07\/EditorShot2.png\"><img aria-describedby=\"caption-attachment-356\" class=\"size-thumbnail wp-image-356\" src=\"http:\/\/lucasmagder.com\/blog\/wp-content\/uploads\/2017\/07\/EditorShot2-150x110.png\" alt=\"\" width=\"150\" height=\"80\"><\/a><\/p>\n<p id=\"caption-attachment-356\" class=\"wp-caption-text\">Playing in editor and selecting the player actor<\/p>\n<\/div>\n<div id=\"attachment_358\" style=\"width: 160px\" class=\"wp-caption alignleft hack-thumbnail\"><a href=\"http:\/\/lucasmagder.com\/blog\/wp-content\/uploads\/2017\/07\/Recipe.png\"><img aria-describedby=\"caption-attachment-358\" class=\"size-thumbnail wp-image-358\" src=\"http:\/\/lucasmagder.com\/blog\/wp-content\/uploads\/2017\/07\/Recipe-150x81.png\" alt=\"\" width=\"150\" height=\"80\"><\/a><\/p>\n<p id=\"caption-attachment-358\" class=\"wp-caption-text\">Browsing for a prefab to attach to a spawner object in the level<\/p>\n<\/div>\n<\/div>\n<p>&nbsp;<\/p>\n<p>But who knows? Maybe one day it might get a real lighting system and a D3D11 -&gt; Vulkan port.<\/p>\n<\/div><hr style=\"margin:10px 0\"><\/div><\/div><div style=\"clear: both;\"><\/div><\/p>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":2,"featured_media":0,"parent":22,"menu_order":-1,"comment_status":"closed","ping_status":"closed","template":"","meta":{"ngg_post_thumbnail":0},"_links":{"self":[{"href":"http:\/\/lucasmagder.com\/blog\/wp-json\/wp\/v2\/pages\/406"}],"collection":[{"href":"http:\/\/lucasmagder.com\/blog\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"http:\/\/lucasmagder.com\/blog\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"http:\/\/lucasmagder.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/lucasmagder.com\/blog\/wp-json\/wp\/v2\/comments?post=406"}],"version-history":[{"count":3,"href":"http:\/\/lucasmagder.com\/blog\/wp-json\/wp\/v2\/pages\/406\/revisions"}],"predecessor-version":[{"id":409,"href":"http:\/\/lucasmagder.com\/blog\/wp-json\/wp\/v2\/pages\/406\/revisions\/409"}],"up":[{"embeddable":true,"href":"http:\/\/lucasmagder.com\/blog\/wp-json\/wp\/v2\/pages\/22"}],"wp:attachment":[{"href":"http:\/\/lucasmagder.com\/blog\/wp-json\/wp\/v2\/media?parent=406"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}