{"id":352,"date":"2017-07-27T23:44:22","date_gmt":"2017-07-28T06:44:22","guid":{"rendered":"http:\/\/lucasmagder.com\/blog\/?p=352"},"modified":"2017-10-30T08:50:08","modified_gmt":"2017-10-30T15:50:08","slug":"trust-people-when-they-say-write-games-not-engines","status":"publish","type":"post","link":"http:\/\/lucasmagder.com\/blog\/2017\/07\/trust-people-when-they-say-write-games-not-engines\/","title":{"rendered":"Trust people when they say &#8220;write games not engines&#8221;"},"content":{"rendered":"<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<p><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\" loading=\"lazy\" class=\"size-thumbnail wp-image-355\" src=\"http:\/\/lucasmagder.com\/blog\/wp-content\/uploads\/2017\/07\/EditorShot1-150x80.png\" alt=\"\" width=\"150\" height=\"80\" srcset=\"http:\/\/lucasmagder.com\/blog\/wp-content\/uploads\/2017\/07\/EditorShot1-150x80.png 150w, http:\/\/lucasmagder.com\/blog\/wp-content\/uploads\/2017\/07\/EditorShot1-300x161.png 300w, http:\/\/lucasmagder.com\/blog\/wp-content\/uploads\/2017\/07\/EditorShot1-768x411.png 768w, http:\/\/lucasmagder.com\/blog\/wp-content\/uploads\/2017\/07\/EditorShot1-1024x548.png 1024w, http:\/\/lucasmagder.com\/blog\/wp-content\/uploads\/2017\/07\/EditorShot1.png 1912w\" sizes=\"(max-width: 150px) 100vw, 150px\" \/><\/a><p id=\"caption-attachment-355\" class=\"wp-caption-text\">Editing while spectating as through a game client<\/p><\/div><\/p>\n<p><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\" loading=\"lazy\" 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 id=\"caption-attachment-356\" class=\"wp-caption-text\">Playing in editor and selecting the player actor<\/p><\/div><\/p>\n<p><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\" loading=\"lazy\" class=\"size-thumbnail wp-image-358\" src=\"http:\/\/lucasmagder.com\/blog\/wp-content\/uploads\/2017\/07\/Recipe-150x81.png\" alt=\"\" width=\"150\" height=\"80\" srcset=\"http:\/\/lucasmagder.com\/blog\/wp-content\/uploads\/2017\/07\/Recipe-150x81.png 150w, http:\/\/lucasmagder.com\/blog\/wp-content\/uploads\/2017\/07\/Recipe-300x162.png 300w, http:\/\/lucasmagder.com\/blog\/wp-content\/uploads\/2017\/07\/Recipe-768x416.png 768w, http:\/\/lucasmagder.com\/blog\/wp-content\/uploads\/2017\/07\/Recipe-1024x554.png 1024w, http:\/\/lucasmagder.com\/blog\/wp-content\/uploads\/2017\/07\/Recipe.png 1916w\" sizes=\"(max-width: 150px) 100vw, 150px\" \/><\/a><p id=\"caption-attachment-358\" class=\"wp-caption-text\">Browsing for a prefab to attach to a spawner object in the level<\/p><\/div><\/p>\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","protected":false},"excerpt":{"rendered":"<p>...unless you really like writing engines, which I do. 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 [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"ngg_post_thumbnail":0},"categories":[19],"tags":[20],"_links":{"self":[{"href":"http:\/\/lucasmagder.com\/blog\/wp-json\/wp\/v2\/posts\/352"}],"collection":[{"href":"http:\/\/lucasmagder.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/lucasmagder.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"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=352"}],"version-history":[{"count":44,"href":"http:\/\/lucasmagder.com\/blog\/wp-json\/wp\/v2\/posts\/352\/revisions"}],"predecessor-version":[{"id":411,"href":"http:\/\/lucasmagder.com\/blog\/wp-json\/wp\/v2\/posts\/352\/revisions\/411"}],"wp:attachment":[{"href":"http:\/\/lucasmagder.com\/blog\/wp-json\/wp\/v2\/media?parent=352"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/lucasmagder.com\/blog\/wp-json\/wp\/v2\/categories?post=352"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/lucasmagder.com\/blog\/wp-json\/wp\/v2\/tags?post=352"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}