<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: gippleup</title>
    <description>The latest articles on DEV Community by gippleup (@gippleup).</description>
    <link>https://dev.to/gippleup</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F363160%2F55e8a58e-130d-4182-b8fc-919cecc2b2df.png</url>
      <title>DEV Community: gippleup</title>
      <link>https://dev.to/gippleup</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/gippleup"/>
    <language>en</language>
    <item>
      <title>Building Casual Multiplayer Game with React Native</title>
      <dc:creator>gippleup</dc:creator>
      <pubDate>Wed, 04 Nov 2020 11:42:13 +0000</pubDate>
      <link>https://dev.to/gippleup/building-casual-multiplayer-game-with-react-native-1dlf</link>
      <guid>https://dev.to/gippleup/building-casual-multiplayer-game-with-react-native-1dlf</guid>
      <description>&lt;p&gt;Have you thought about how much react native can handle? I did. &lt;/p&gt;

&lt;p&gt;After writing first small web project with react and having known that there is something called &lt;strong&gt;React Native&lt;/strong&gt;, I've wondered if I can build a game with it.&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;Isn't it too slow for a game?&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;I thought it would be too slow to build a game because javascript is an interpreted language.&lt;/p&gt;

&lt;p&gt;So, I limited my expectation to performance and decided to build a simple casual game.&lt;/p&gt;

&lt;p&gt;It will be fine, I thought so. It's a good thing that I decided so because I don't have a high level of expertise on optimization.&lt;/p&gt;

&lt;p&gt;React Native got really slow when I tested a particle effect which is made up of custom animation engine and 20 naive View components. So I gave up on any visual effects and focused on game itself.&lt;/p&gt;

&lt;p&gt;Yes, React Native would disappoint you if you're planning to build an app that has lots of visual effects. But, if you stick to simple interactions, it will be fine.&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;Excuse me, what game?&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/ky0-IJDBIrM"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;It's a casual puzzle game which supports multi play.&lt;/p&gt;

&lt;p&gt;Rule is very simple. Sort all color blocks in time, without leftover.&lt;/p&gt;

&lt;h1&gt;
  
  
  How did you develop?
&lt;/h1&gt;

&lt;p&gt;I used typescript for client and server. If I haven't used it, it would have been quite difficult to track all the variables and parameters.&lt;/p&gt;

&lt;p&gt;Development Cycle can be abbreviated to:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt; &lt;span class="nx"&gt;Configure&lt;/span&gt; &lt;span class="nx"&gt;dev&lt;/span&gt; &lt;span class="nx"&gt;routes&lt;/span&gt; &lt;span class="nx"&gt;and&lt;/span&gt; &lt;span class="nx"&gt;production&lt;/span&gt; &lt;span class="nx"&gt;routes&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;
&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt; &lt;span class="nx"&gt;Make&lt;/span&gt; &lt;span class="nx"&gt;components&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;hooks&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;and&lt;/span&gt; &lt;span class="nx"&gt;utils&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;
&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt; &lt;span class="nx"&gt;Test&lt;/span&gt; &lt;span class="nx"&gt;each&lt;/span&gt; &lt;span class="nx"&gt;modules&lt;/span&gt; &lt;span class="nx"&gt;on&lt;/span&gt; &lt;span class="nx"&gt;dev&lt;/span&gt; &lt;span class="nx"&gt;routes&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;
&lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt; &lt;span class="nx"&gt;Build&lt;/span&gt; &lt;span class="nx"&gt;screens&lt;/span&gt; &lt;span class="kd"&gt;with&lt;/span&gt; &lt;span class="nx"&gt;components&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;
&lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt; &lt;span class="nx"&gt;Test&lt;/span&gt; &lt;span class="nx"&gt;screens&lt;/span&gt; &lt;span class="nx"&gt;on&lt;/span&gt; &lt;span class="nx"&gt;release&lt;/span&gt; &lt;span class="nx"&gt;build&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;
&lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt; &lt;span class="nx"&gt;Go&lt;/span&gt; &lt;span class="nx"&gt;to&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;There are more than hundred modules(including all the utils, screens, components, and hooks) but the core modules were a few:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Block&lt;/strong&gt; react component for rendering blocks.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;em&gt;NativeRefBox&lt;/em&gt;&lt;/strong&gt; react component for handling animation.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;NativeRefBlockBoard&lt;/strong&gt; react component for a board.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;useMultiGameSocket&lt;/strong&gt; hook for handling socket communication.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;generateMap&lt;/strong&gt; function for generating a map.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Other components are somewhat self-explanatory, so I want to explain about &lt;strong&gt;NativeRefBox&lt;/strong&gt; because it's very ambiguous with its name and I belive it is the key component of this project.&lt;/p&gt;

&lt;h1&gt;
  
  
  NativeRefBox? What is it?
&lt;/h1&gt;

&lt;p&gt;I built it in need of higher performance when animating blocks. Initially, I used Animated api but it seemed very slow and lagging. (To look back, it could have been different if I used InteractionManager properly)&lt;/p&gt;

&lt;p&gt;It was so slow that I thought about giving up the project because the other only alternative that I knew was re-rendering components multiple times, which is surely slower than Animated api.&lt;/p&gt;

&lt;p&gt;Then I found there is a method called &lt;strong&gt;setNativeProps&lt;/strong&gt; on most of React Native components. It was possible to directly manipulate a rendered component with the method.&lt;/p&gt;

&lt;h1&gt;
  
  
  Hmm, is it okay to use that method?
&lt;/h1&gt;

&lt;p&gt;To confess, it's a bit off the track of React recommended way because React prefers prop-based manipulation, not ref-based.&lt;/p&gt;

&lt;p&gt;However, I needed it and I tried to build my own component which utilizes setNativeProps.&lt;/p&gt;

&lt;p&gt;Result? setNativeProps method was faster than Animated. Maybe it's because &lt;a href="https://github.com/facebook/react-native/tree/master/Libraries/Animated"&gt;Animated&lt;/a&gt; api supports much rich functionality.&lt;/p&gt;

&lt;p&gt;Do you wonder how it looks like if you use NativeRefBox for animation?&lt;/p&gt;

&lt;p&gt;Here it is.&lt;/p&gt;

&lt;h5&gt;
  
  
  &lt;strong&gt;Scale up animation using Animated&lt;/strong&gt;
&lt;/h5&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;popAnim&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;React&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;useRef&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;Animted&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;Value&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nx"&gt;Animated&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;Value&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;current&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;scale&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;popAnim&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;interpolate&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;inputRange&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
  &lt;span class="na"&gt;outputRange&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;popup&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;callback&lt;/span&gt;&lt;span class="p"&gt;?:&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;any&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;Animated&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;timing&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;popAnim&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;toValue&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;easings&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;Easing&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;elastic&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;7&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
    &lt;span class="na"&gt;duration&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1000&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;useNativeDriver&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="p"&gt;}).&lt;/span&gt;&lt;span class="nx"&gt;start&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;callback&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nx"&gt;React&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;useEffect&lt;/span&gt;&lt;span class="p"&gt;(()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;popup&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="p"&gt;})&lt;/span&gt;

&lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
  &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;Animated&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;View&lt;/span&gt; &lt;span class="nx"&gt;style&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{{&lt;/span&gt;&lt;span class="na"&gt;transform&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[{&lt;/span&gt;&lt;span class="na"&gt;scale&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="nx"&gt;scaleAnim&lt;/span&gt;&lt;span class="p"&gt;}]}}&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;Target&lt;/span&gt;&lt;span class="o"&gt;/&amp;gt;&lt;/span&gt;
  &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/Animated.View&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h5&gt;
  
  
  &lt;strong&gt;Scale up animation using NativeRefBox&lt;/strong&gt;
&lt;/h5&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;boxRef&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;React&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;useRef&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;NativeRefBox&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="nx"&gt;React&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;useEffect&lt;/span&gt;&lt;span class="p"&gt;(()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;boxRef&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;animate&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
    &lt;span class="na"&gt;style&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="na"&gt;scaleX&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;scaleY&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="na"&gt;duration&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1000&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;easing&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;easeOutElastic&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="p"&gt;}).&lt;/span&gt;&lt;span class="nx"&gt;start&lt;/span&gt;&lt;span class="p"&gt;(()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Animation Finished&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;});&lt;/span&gt;
&lt;span class="p"&gt;},&lt;/span&gt; &lt;span class="p"&gt;[])&lt;/span&gt;

&lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
  &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;NativeRefBox&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;Target&lt;/span&gt;&lt;span class="o"&gt;/&amp;gt;&lt;/span&gt;
  &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/NativeRefBox&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  Interesting...? But...
&lt;/h1&gt;

&lt;p&gt;You may think "hmm, I think Animated api is more easy to read and maintain"&lt;/p&gt;

&lt;p&gt;Well, &lt;strong&gt;I didn't say it's convenient, lol&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;When there is no complicated animation, I used setNativeProps but whenever it gets complicated I used Animated api, except for animations used in game scene.&lt;/p&gt;

&lt;p&gt;What I want to suggest is that &lt;strong&gt;You can use setNativeProps for simple animation because it can improve performance&lt;/strong&gt;. However, you may need to build a nice component or utility for that because you will get perplexed when facing complex animation if you don't...&lt;/p&gt;

&lt;p&gt;If you're interested in building your own animating module with setNativeProps, I hope you check about &lt;a href="https://reactnative.dev/docs/interactionmanager"&gt;InteractionManager&lt;/a&gt; at first because it will save your app from being laggy. (I regret that I didn't care about that...)&lt;/p&gt;

&lt;p&gt;You can see the code for NativeRefBox &lt;a href="https://gist.github.com/gippleup/904635c3f80de3a7191b23649ff159e7"&gt;here&lt;/a&gt;. (If you need easing functions, &lt;a href="https://gist.github.com/gippleup/fe499aabc42d205f129959cf3a42c8ce"&gt;here&lt;/a&gt;)&lt;/p&gt;

&lt;h1&gt;
  
  
  Can I see the git?
&lt;/h1&gt;

&lt;p&gt;Yes, sir, no. You can't. I want to keep it a secret.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--BUx6gfi7--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/cffugpdki7xmy99w5j5t.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--BUx6gfi7--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/cffugpdki7xmy99w5j5t.gif" alt="Laughing Spongebob"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I can show you the directory structure.&lt;/p&gt;

&lt;h5&gt;
  
  
  &lt;a href="https://gist.github.com/gippleup/a3dddd3de46b09ad5004ab7c86e1560f"&gt;Client&lt;/a&gt; Directory Tree (depth==1)
&lt;/h5&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;src&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;
&lt;span class="err"&gt;├──&lt;/span&gt; &lt;span class="nx"&gt;Language&lt;/span&gt;
&lt;span class="err"&gt;├──&lt;/span&gt; &lt;span class="nx"&gt;algo&lt;/span&gt;
&lt;span class="err"&gt;├──&lt;/span&gt; &lt;span class="nx"&gt;api&lt;/span&gt;
&lt;span class="err"&gt;├──&lt;/span&gt; &lt;span class="nx"&gt;assets&lt;/span&gt;
&lt;span class="err"&gt;├──&lt;/span&gt; &lt;span class="nx"&gt;components&lt;/span&gt;
&lt;span class="err"&gt;├──&lt;/span&gt; &lt;span class="nx"&gt;hooks&lt;/span&gt;
&lt;span class="err"&gt;├──&lt;/span&gt; &lt;span class="nx"&gt;redux&lt;/span&gt;
&lt;span class="err"&gt;├──&lt;/span&gt; &lt;span class="nx"&gt;router&lt;/span&gt;
&lt;span class="err"&gt;├──&lt;/span&gt; &lt;span class="nx"&gt;screens&lt;/span&gt;
&lt;span class="err"&gt;└──&lt;/span&gt; &lt;span class="nx"&gt;types&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h5&gt;
  
  
  &lt;a href="https://gist.github.com/gippleup/8e6b4574c96466896aace4c27e447460"&gt;Server&lt;/a&gt; Directory Tree (depth==1)
&lt;/h5&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;src&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;
&lt;span class="err"&gt;├──&lt;/span&gt; &lt;span class="nx"&gt;algo&lt;/span&gt;
&lt;span class="err"&gt;├──&lt;/span&gt; &lt;span class="nx"&gt;asset&lt;/span&gt;
&lt;span class="err"&gt;├──&lt;/span&gt; &lt;span class="nx"&gt;controller&lt;/span&gt;
&lt;span class="err"&gt;├──&lt;/span&gt; &lt;span class="nx"&gt;entity&lt;/span&gt;
&lt;span class="err"&gt;├──&lt;/span&gt; &lt;span class="nx"&gt;migration&lt;/span&gt;
&lt;span class="err"&gt;├──&lt;/span&gt; &lt;span class="nx"&gt;route&lt;/span&gt;
&lt;span class="err"&gt;├──&lt;/span&gt; &lt;span class="nx"&gt;utils&lt;/span&gt;
&lt;span class="err"&gt;└──&lt;/span&gt; &lt;span class="nx"&gt;websocket&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  If you go back to the start, What would you fix?
&lt;/h1&gt;

&lt;p&gt;Maybe... I would dedicate to build a fabulous portfolio website.&lt;/p&gt;

&lt;p&gt;Except that, I would study InteractionManager at first because I believe this api can help improving performance on interaction. After then, I would build NativeRefBox which have better readability and performance. And then, I would design more delicate models for socket communication.&lt;/p&gt;

&lt;h1&gt;
  
  
  Link?
&lt;/h1&gt;

&lt;p&gt;&lt;a href="https://play.google.com/store/apps/details?id=com.sortio"&gt;Playstore Link&lt;/a&gt; for the app&lt;/p&gt;

&lt;p&gt;...Appstore Link?&lt;/p&gt;

&lt;p&gt;Unfortunately, I don't have a macbook.&lt;/p&gt;

&lt;h1&gt;
  
  
  Is that all?
&lt;/h1&gt;

&lt;p&gt;There are more things that I want to talk about but I want to keep it simple for now because.&lt;/p&gt;

&lt;p&gt;Though it's a bit unsastisfactory to wrap up the project for now, it was quite fun to build various utils, hooks, and components for both client and server. ...for about a month and two weeks, maybe?&lt;/p&gt;

&lt;p&gt;I want to finish this shabby article with saying, "If you're interested in building a game with react native, don't... no, is it a very simple game? Hmm... okay, but if it's the other case..."&lt;/p&gt;

&lt;p&gt;~ Fin ~&lt;/p&gt;

</description>
      <category>reactnative</category>
      <category>react</category>
      <category>javascript</category>
      <category>gamedev</category>
    </item>
  </channel>
</rss>
