<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>React | Taylor Gratzer</title><link>https://tgratzer.com/tags/react/</link><atom:link href="https://tgratzer.com/tags/react/index.xml" rel="self" type="application/rss+xml"/><description>React</description><generator>Source Themes Academic (https://sourcethemes.com/academic/)</generator><language>en-us</language><lastBuildDate>Sun, 27 Sep 2020 00:00:00 +0000</lastBuildDate><image><url>https://tgratzer.com/images/icon_hu0b7a4cb9992c9ac0e91bd28ffd38dd00_9727_512x512_fill_lanczos_center_2.png</url><title>React</title><link>https://tgratzer.com/tags/react/</link></image><item><title>A Monster's Expedition Map</title><link>https://tgratzer.com/project/monsters-expedition-map/</link><pubDate>Sun, 27 Sep 2020 00:00:00 +0000</pubDate><guid>https://tgratzer.com/project/monsters-expedition-map/</guid><description>&lt;h2 id="overview">Overview&lt;/h2>
&lt;p>&lt;em>&lt;a href="https://store.steampowered.com/app/1052990/A_Monsters_Expedition/">A Monster's Expedition&lt;/a>&lt;/em> is a clever and adorable puzzle game where you push logs around to travel to different islands. The world map has a lot of &amp;lsquo;exhibits&amp;rsquo; to find, as well some very difficulty &amp;lsquo;snowmen&amp;rsquo;.&lt;/p>
&lt;p>After beating the game (and finding only one snowman) I wanted to see how far along I was. Maybe the game is just under-appreciated, but nobody had a full map of the game that was both complete and pleasant to look at, and there was absolutely no way to know where you'd actually been.&lt;/p>
&lt;p>I created &lt;a href="https://monsterexpedition.tgratzer.com/">the site&lt;/a> partially to create a &lt;a href="https://steamcommunity.com/sharedfiles/filedetails/?id=2240268284">Steam guide&lt;/a> and partially just to look inside of my save file. Hopefully the community finds it useful.&lt;/p>
&lt;h2 id="datamining">Data-Mining&lt;/h2>
&lt;p>&lt;img src="achievement.png" alt="Data Miner achievement">&lt;/p>
&lt;p>The game jokingly calls you a data miner if you found every exhibit&amp;hellip; Maybe this is what sparked the idea to actually do it.&lt;/p>
&lt;p>&lt;img src="datamining.png" alt="Datamined Exhibits">&lt;/p>
&lt;p>I used a neat tool called the &lt;a href="https://github.com/DerPopo/UABE">Unity Assets Bundle Extractor&lt;/a> to read the exhibit keys (&lt;code>LM_Cereal&lt;/code>), and applied a fair amount of post-processing with Python to correlate to where the game-objects pop up in the world (&lt;code>x: 193, z: 31&lt;/code>).&lt;/p>
&lt;p>Determining how the save file recorded your progress required perusing the decompiled C# code with &lt;a href="https://www.jetbrains.com/decompiler/">dotPeek&lt;/a>.&lt;/p>
&lt;h2 id="mapping">Mapping&lt;/h2>
&lt;p>The map uses &lt;a href="https://react-leaflet.js.org/en/">React Leaflet&lt;/a> with a custom projection to match up in-game coordinates to the map itself. The markers and other objects of interest are stored as data accessible at build time through GraphQL, which allows me the opportunity to eventually generate a dedicated page per island. Wouldn't that be a kickass walkthrough?&lt;/p></description></item><item><title>Minecraft Commands Cheat Sheet</title><link>https://tgratzer.com/project/minecraft-commands-cheat-sheet/</link><pubDate>Sun, 02 Aug 2020 00:00:00 +0000</pubDate><guid>https://tgratzer.com/project/minecraft-commands-cheat-sheet/</guid><description>&lt;h2 id="overview">Overview&lt;/h2>
&lt;p>If you've ever messed around with Minecraft command blocks, you know Minecraft commands are powerful but obtuse. This site shows how the commands are written, with a quick reference format for browsing. You also get examples and deeper syntax explanations for each command available in the original Java Edition, and the Bedrock/Education Editions.&lt;/p>
&lt;p>My first real foray into building a full-blown site with React, this page uses &lt;a href="https://www.gatsbyjs.org/">Gatsby&lt;/a> to create a pre-rendered (SSR) progressive web app (PWA), with &lt;a href="https://en.wikipedia.org/wiki/Syntax_diagram">railroad diagrams&lt;/a> of the commands syntax.&lt;/p>
&lt;h2 id="learning-experiences">Learning experiences&lt;/h2>
&lt;p>&lt;img src="lighthouse.png" alt="Lighthouse score">&lt;/p>
&lt;p>Gatsby is a pleasure to work with. The way you can load and query data sources into a pre-rendered application, along with the ecosystem of plugins available means you can spin up a mean application really quickly.&lt;/p>
&lt;p>Also, by just keeping an eye out for accessibility, a very high Lighthouse score was well within reach.&lt;/p>
&lt;p>Performance is great, since the page (before interactions) is already rendered, and I made sure the single font used was requested early in the network sequence. The tree shaking Gatsby performs wasn't 100% what Chrome thinks is possible, but a few kilobytes of waste are acceptable for such an app that uses a solid caching strategy.&lt;/p>
&lt;p>As the page has few inputs, accessibility came down to ensuring the headers were structured correctly, contrast ratios met WCAG standards, and the inputs I did have provided adequate context.&lt;/p></description></item></channel></rss>