{"id":179,"date":"2019-06-01T22:42:42","date_gmt":"2019-06-01T22:42:42","guid":{"rendered":"http:\/\/jwonsever.com\/wp\/?p=179"},"modified":"2019-06-01T22:42:43","modified_gmt":"2019-06-01T22:42:43","slug":"mycraft","status":"publish","type":"post","link":"https:\/\/jwonsever.com\/wp\/?p=179","title":{"rendered":"MyCraft"},"content":{"rendered":"<p><span style=\"font-weight: 400;\">This is a retroactive post about a project I did almost 7 years ago, in 2012. I\u2019ve called it \u201cMyCraft\u201d, basically it was a homework \/ final project for the Computer Graphics class at Berkeley. \u00a0If I remember correctly, I spent a couple hours here and there improving it the winter after, but most of the work was done for the class.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">The goal was to get as close as we could to recreating the popular computer game <\/span><a href=\"https:\/\/www.minecraft.net\/en-us\/\"><span style=\"font-weight: 400;\">Minecraft<\/span><\/a><span style=\"font-weight: 400;\">. \u00a0<\/span><a href=\"https:\/\/web.archive.org\/web\/20120114114334\/http:\/\/www.minecraft.net\/\"><span style=\"font-weight: 400;\">Their website at the time<\/span><\/a><span style=\"font-weight: 400;\"> shows how far that game has come. \u00a0\u00a0This was my first and only class on computer graphics, so we had roughly 3 months of computer graphics experience and very little knowledge of the libraries. \u00a0On top of that, we built some things ourselves for the class that we really should not have handled ourselves. We did well in the class, but at the time it felt like we didn\u2019t make it anywhere close to our goal. \u00a0Even for a microscopic world, 100 by 100 by 20 blocks, the amount of objects to keep track of and manage proved to be a difficult performance problem when trying to render at speeds of at least 20-30 FPS. We did a ton to make it better &#8211; see the <\/span><a href=\"https:\/\/github.com\/Jwonsever\/Mycraft\/blob\/master\/README.md\"><span style=\"font-weight: 400;\">Readme<\/span><\/a><span style=\"font-weight: 400;\"> &#8211; and were able to run it at about 25 FPS on my gaming laptop at the time.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">It was a completely dead project. \u00a0It has been lying around on my Github account for years, untouched. \u00a0Of course, the executable didn\u2019t work anymore. The Readme was basically just information for the instructor, it didn\u2019t have any instructions on how to build it. \u00a0Luckily it\u2019s C, so basically just keep running <\/span><span style=\"font-weight: 400;\">make<\/span><span style=\"font-weight: 400;\"> until you manage to find all the dependencies you need. \u00a0It took like 30 minutes to sort out through what the correct dependencies were and where to find them, remarkably easier than I was expecting.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">And after getting it built, bam!<\/span><\/p>\n<p><a href=\"http:\/\/jwonsever.com\/wp\/wp-content\/uploads\/2019\/06\/Screenshot-from-2019-06-01-15-23-06.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-180 size-full\" src=\"http:\/\/jwonsever.com\/wp\/wp-content\/uploads\/2019\/06\/Screenshot-from-2019-06-01-15-23-06.png\" alt=\"\" width=\"571\" height=\"570\" srcset=\"https:\/\/jwonsever.com\/wp\/wp-content\/uploads\/2019\/06\/Screenshot-from-2019-06-01-15-23-06.png 571w, https:\/\/jwonsever.com\/wp\/wp-content\/uploads\/2019\/06\/Screenshot-from-2019-06-01-15-23-06-150x150.png 150w, https:\/\/jwonsever.com\/wp\/wp-content\/uploads\/2019\/06\/Screenshot-from-2019-06-01-15-23-06-300x300.png 300w\" sizes=\"auto, (max-width: 571px) 100vw, 571px\" \/><\/a><\/p>\n<p><span style=\"font-weight: 400;\">I was stoked. \u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400;\">The interface is pretty conventional, WASD for movement, mouse for camera, space to jump. \u00a0Click to place a block, right click to remove a block. You can zoom in \/ out with a mouse wheel or two finger scroll. \u00a0\u00a0The world gets generated with grass, dirt, trees, ores, in the ground and a layer of non-destroyable blocks on the bottom. \u00a0It\u2019s a little buggy with block placing and camera movement, but it\u2019s absolutely good enough to play with for a couple minutes.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Now that computers hardware has gotten a little more powerful it feels like we did a lot better than we had thought. \u00a0Its running ok on my cheap Asus laptop, which I was not expecting when I dug this project up. The feature set feels quite a bit richer diving back into a MyCraft world, not remembering everything we built at the time. \u00a0It\u2019s not often something you impress yourself with some relatively unimportant you built long ago, I thought it would be nice to share and show it off.<\/span><\/p>\n<p><a href=\"https:\/\/github.com\/Jwonsever\/Mycraft\"><span style=\"font-weight: 400;\">The full source code is available here.<\/span><\/a><span style=\"font-weight: 400;\"> \u00a0Check it out!<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>This is a retroactive post about a project I did almost 7 years ago, in 2012. I\u2019ve called it \u201cMyCraft\u201d, basically it was a homework \/ final project for the Computer Graphics class at Berkeley. \u00a0If I remember correctly, I spent a couple hours here and there improving it the winter after, but most of<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-179","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/jwonsever.com\/wp\/index.php?rest_route=\/wp\/v2\/posts\/179","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jwonsever.com\/wp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jwonsever.com\/wp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jwonsever.com\/wp\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/jwonsever.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=179"}],"version-history":[{"count":2,"href":"https:\/\/jwonsever.com\/wp\/index.php?rest_route=\/wp\/v2\/posts\/179\/revisions"}],"predecessor-version":[{"id":182,"href":"https:\/\/jwonsever.com\/wp\/index.php?rest_route=\/wp\/v2\/posts\/179\/revisions\/182"}],"wp:attachment":[{"href":"https:\/\/jwonsever.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=179"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jwonsever.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=179"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jwonsever.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=179"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}