<?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: Fernando Garcia</title>
    <description>The latest articles on DEV Community by Fernando Garcia (@fergarram).</description>
    <link>https://dev.to/fergarram</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%2F151600%2F45797b50-3d16-4732-9258-e7397103b711.JPG</url>
      <title>DEV Community: Fernando Garcia</title>
      <link>https://dev.to/fergarram</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/fergarram"/>
    <language>en</language>
    <item>
      <title>How often do you get asked to build map-based web apps?</title>
      <dc:creator>Fernando Garcia</dc:creator>
      <pubDate>Tue, 23 Jan 2024 01:33:45 +0000</pubDate>
      <link>https://dev.to/fergarram/how-often-do-you-get-asked-to-build-map-based-web-apps-5g9k</link>
      <guid>https://dev.to/fergarram/how-often-do-you-get-asked-to-build-map-based-web-apps-5g9k</guid>
      <description>&lt;p&gt;By map-based I mean having to display routes, pins, data clouds, etc. For example: food delivery apps, real estate apps, etc.&lt;/p&gt;

&lt;p&gt;I'm doing some research for geobase.app so I appreciate your feedback!&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>freelance</category>
      <category>discuss</category>
    </item>
    <item>
      <title>Why do I procrastinate my personal site more than any other side project?</title>
      <dc:creator>Fernando Garcia</dc:creator>
      <pubDate>Sat, 20 Nov 2021 19:51:15 +0000</pubDate>
      <link>https://dev.to/fergarram/why-do-i-procrastinate-my-personal-site-more-than-any-other-side-project-4ki</link>
      <guid>https://dev.to/fergarram/why-do-i-procrastinate-my-personal-site-more-than-any-other-side-project-4ki</guid>
      <description>&lt;p&gt;Does this happen to you too? I've redesign my site like 3 times without publishing and now I'm almost done coding it (90%) I just need to write my projects' descriptions. But it has been months since I started! This doesn't happen with other side projects I've worked on, well not as much.&lt;/p&gt;

</description>
      <category>discuss</category>
      <category>webdev</category>
      <category>sideprojects</category>
      <category>portfolio</category>
    </item>
    <item>
      <title>Have you tried learning WebGL/OpenGL technologies? How did it go?</title>
      <dc:creator>Fernando Garcia</dc:creator>
      <pubDate>Sat, 23 May 2020 06:02:36 +0000</pubDate>
      <link>https://dev.to/fergarram/have-you-tried-learning-webgl-opengl-technologies-how-did-it-go-1570</link>
      <guid>https://dev.to/fergarram/have-you-tried-learning-webgl-opengl-technologies-how-did-it-go-1570</guid>
      <description>&lt;p&gt;Hey everyone, so I've been recently learning and using WebGL and avoiding using libraries for my little game side projects.&lt;/p&gt;

&lt;p&gt;I had always found learning OpenGL (few years ago and using C/C++) really hard and it was until now that I am beginning to see progress using JavaScript (A language that I am way more familiar with).&lt;/p&gt;

&lt;p&gt;I'm wondering about your personal experience when trying to tackle this type of technology (low-level graphics libraries).&lt;/p&gt;

</description>
      <category>webgl</category>
      <category>opengl</category>
      <category>webdev</category>
      <category>discuss</category>
    </item>
    <item>
      <title>Creating a game for feature phones using JavaScript</title>
      <dc:creator>Fernando Garcia</dc:creator>
      <pubDate>Sat, 25 Apr 2020 14:04:22 +0000</pubDate>
      <link>https://dev.to/fergarram/creating-a-game-for-feature-phones-using-javascript-3bnn</link>
      <guid>https://dev.to/fergarram/creating-a-game-for-feature-phones-using-javascript-3bnn</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;This is one of those projects which you start after a burst of excitement but end up leaving unfinished to the uncomfortable point where it isn’t good enough to publish but it is good enough to talk about it.&lt;/p&gt;

&lt;p&gt;So, in this series, I will share with you how I retake this project and convert it into an MVP!&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;You can find the code at my &lt;a href="https://github.com/Fergarram/amateur-archaeology" rel="noopener noreferrer"&gt;Github&lt;/a&gt; repo and play the game at &lt;a href="https://fernando.works/amateur-archaeology" rel="noopener noreferrer"&gt;fernando.works/amateur-archaeology&lt;/a&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  About this project
&lt;/h2&gt;

&lt;p&gt;I bought a banana phone after watching &lt;a href="https://www.youtube.com/watch?v=OA_g2bQgOXY" rel="noopener noreferrer"&gt;this video&lt;/a&gt;. The fact that I could create apps for a feature phone using web technologies blew my mind — I remember being a kid and creating toy feature phones using small and thin wood rectangles that (for some strange reason) were laying around in my house. I would make different designs using tape, rubber bands, nails, and color markers.&lt;/p&gt;

&lt;p&gt;Anyways, I bought the thing and went on to enable development mode and got a Hello World app running.&lt;/p&gt;

&lt;p&gt;A few months past by and suddenly decided I wanted to do something with it. I thought of remaking &lt;a href="https://fergarram.itch.io/amateur-archaeology-iii" rel="noopener noreferrer"&gt;a game I made&lt;/a&gt; for a game jam some years ago using Game Maker.  This was a perfect idea, the game was simple enough so I started on working on it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Defining the MVP
&lt;/h2&gt;

&lt;p&gt;As a starting point, the game should have the same functionalities as the original game with some variations and additions:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Infinite digging (done before this devlog started)&lt;/li&gt;
&lt;li&gt;Intro screen&lt;/li&gt;
&lt;li&gt;Dialogs (UI)&lt;/li&gt;
&lt;li&gt;Treasures - with different rewards&lt;/li&gt;
&lt;li&gt;Time, score, and game states (intro, level start, game over)&lt;/li&gt;
&lt;li&gt;Level Transition Effect (new)&lt;/li&gt;
&lt;li&gt;Foes - Fire and Scorpions&lt;/li&gt;
&lt;li&gt;Randomized hue (didn't implement)&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Game Rules
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;The objective is to reach the score goal before time runs out.&lt;/li&gt;
&lt;li&gt;If you pass the score goal you get extra time for the next level.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Day 1
&lt;/h2&gt;

&lt;p&gt;I’ll start by taking the intro image from the original game and adapting it to the resolution of the Banana Phone (240 x 320px). I use &lt;a href="https://www.aseprite.org/" rel="noopener noreferrer"&gt;Aseprite&lt;/a&gt; for manipulating pixels and &lt;a href="https://www.sketch.com/" rel="noopener noreferrer"&gt;Sketch&lt;/a&gt; for… level design? I like to use Sketch for moving the assets around and prototyping ideas.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Frisd06x3qwcokzaxo6wf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Frisd06x3qwcokzaxo6wf.png" alt="Screenshot of Aseprite"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After, cleaning some pixels with Aseprite I copied the assets to Sketch and placed them where I wanted them:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fihx07npor3qbqam57fjn.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fihx07npor3qbqam57fjn.png" alt="Screenshot of Sketch"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I exported the assets for the game, put them in place, added some logic and animation for the instructions and title and this is how it turned out:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fq092jy8f2bz63qfyriu5.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fq092jy8f2bz63qfyriu5.gif" alt="Animation for game intro"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After testing it on the real phone, I went on to design the score and time UI. This led me to realize that using 1x pixels and 2x pixels at the same time sucks, so I spent some more time playing with the title image and re-drew it:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fyeomzz5cyl5kovx69zmh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fyeomzz5cyl5kovx69zmh.png" alt="Screenshot of new intro"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now we are talking! And this is the mockup that I came with for the game’s user interface:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fqxo52c6kkg4of7hf9w8n.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fqxo52c6kkg4of7hf9w8n.png" alt="Screenshot of UI"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Since Aseprite has some algorithm that neatly scales the font in a pixel-art way, I need to export the number renders to make a number font. I decided to skip letters since there is not going to be dynamic text content.&lt;/p&gt;

&lt;p&gt;But, before I continue with that, I need to eat! BRB&lt;/p&gt;

&lt;p&gt;[ About 5 hours later ]&lt;/p&gt;

&lt;p&gt;Coming back, I thought of what was the most practical and performant way of displaying this custom font. After testing different ideas, the best solution turned out to be to create a font (tff file) using &lt;a href="https://icomoon.io/app" rel="noopener noreferrer"&gt;IcoMoon&lt;/a&gt; and manually tracing the pixels in sketch:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F71aksyfx4ipp1mbh6xtb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F71aksyfx4ipp1mbh6xtb.png" alt="Screenshot of IcoMoon app"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After some hours of testing, manually tracing pixels to SVGs, tweaking CSS and what not. I concluded that the best way of implementing the user interface for the game (in terms of pixel sharpness and performance) was using HTML and CSS. &lt;/p&gt;

&lt;p&gt;This was the end result:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fpl12stv06psvjqskluay.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fpl12stv06psvjqskluay.jpg" alt="Photo of real phone and computer showing implemented mockup"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It looks sharp, it is more performant since I didn’t put more logic into the animation frame event.&lt;/p&gt;

&lt;h2&gt;
  
  
  Day 2
&lt;/h2&gt;

&lt;p&gt;I separated the UI code to a separate module and started implemented the dialog box. I also created two states for the game: before the game starts, and when the game has started.&lt;/p&gt;

&lt;p&gt;This is it for this two days! Here is the end result:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/dAvG7oMlzXJdSsBU9M/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/dAvG7oMlzXJdSsBU9M/giphy.gif" alt="Video of new intro"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Day 3
&lt;/h2&gt;

&lt;p&gt;I started by working on the treasure generation. I decided to code the distribution logic based on the &lt;a href="https://en.wikipedia.org/wiki/Pareto_principle" rel="noopener noreferrer"&gt;Pareto Principle&lt;/a&gt;. There are 5 possible treasures and one heart which gives you time. I decided to ignore the heart for now.&lt;/p&gt;

&lt;p&gt;I wrote a function that randomizes a horizontal lane of dirt which gets called every time the player moves one grid block down. There is a 5% chance for a dirt block to be a treasure and then we roll the dice again and get a treasure based on the distribution I talked about.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;I have decided that I will not publish code in this devlog to keep it slim, but you can take a look at it in the  &lt;a href="https://github.com/Fergarram/amateur-archaeology" rel="noopener noreferrer"&gt;repo&lt;/a&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;After playing some minutes with the probabilities, the game looks like this:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/JR7k3C1wVKbVlHdLzb/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/JR7k3C1wVKbVlHdLzb/giphy.gif" alt="Video of player digging"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I also added some logic that puts “diggable” dirt around a treasure when “air” flows in. (You can see what I mean in the gif below)&lt;/p&gt;

&lt;p&gt;After testing this on the simulator, I went on to test this on the device to see if there were any performance issues. I didn’t find any so I moved on to work on treasure gravity.&lt;/p&gt;

&lt;p&gt;This was a little harder to grasp but after about 2 hours I came up with a solution that didn’t cause any performance issues.&lt;/p&gt;

&lt;p&gt;Fun fact: Today I went to a conference and was coding this during the break and, yes, during a conference too (sorry).&lt;/p&gt;

&lt;p&gt;Here is how the “physics“ look!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/Z8kU4tk4r9jKOVEPTI/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/Z8kU4tk4r9jKOVEPTI/giphy.gif" alt="Video of treasures falling"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now, I need to work on the “collisions” with the player.&lt;/p&gt;

&lt;p&gt;Another speaker went up and that meant another commit was getting ready. I implemented the “collision” detection (just matching the grid positions with the player). I tested it for a while, found some issues, and headed home after the conference was over.&lt;/p&gt;

&lt;p&gt;I arrived home, fixed those issues, and added the sound for when the player takes treasure.&lt;/p&gt;

&lt;p&gt;I had dinner, took a break, and continued after some time. I implemented the score and time system and made the user interface reactive to it.&lt;/p&gt;

&lt;p&gt;This is how it looks now!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/cJNWN3JdL8LQmiK1S2/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/cJNWN3JdL8LQmiK1S2/giphy.gif" alt="Video of gameplay"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The next thing to work on is the next level transition and the game over screen.&lt;/p&gt;

&lt;h2&gt;
  
  
  Day 4
&lt;/h2&gt;

&lt;p&gt;Ok, so I need to start with the level transition before I jump into the enemies. Here is the to-do list:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Game state logic — restart the camera, player, score, time, ui, and grid.&lt;/li&gt;
&lt;li&gt;Transition&lt;/li&gt;
&lt;li&gt;Add a sound for when a transition enters.&lt;/li&gt;
&lt;li&gt;Calculate new goals and time.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;While developing this game state reset, I realized that if this was a bigger game I would be in deep trouble if I continued doing this the way I am currently doing. It would quickly become spaghetti code.&lt;/p&gt;

&lt;p&gt;I implemented the game state reset and a Super Mario World style transition. This is how it looks.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/XHAuzs6t48gIWOKlCI/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/XHAuzs6t48gIWOKlCI/giphy.gif" alt="Video of level transition"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As you can see I also updated the image of the controls and the dialog border.&lt;/p&gt;

&lt;p&gt;I also worked on the new goal and new time calculations. These are going to be placeholders since the final value will be decided after I add enemies.&lt;/p&gt;

&lt;p&gt;I jumped on Aseprite again and improved the dialog background. I also added a level title to let the player know what level he is currently at.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fq4xi2cu8u6n54lx0ht3e.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fq4xi2cu8u6n54lx0ht3e.png" alt="Screenshot of better UI"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Day 5 - Short
&lt;/h2&gt;

&lt;p&gt;I started off by implementing the new mocks. I also made it possible to quit the game showing a question dialog.&lt;/p&gt;

&lt;p&gt;I want to make it more performant since I am seeing a lot of lag, so I decided that  I’m going to port this to WebGL.&lt;/p&gt;

&lt;p&gt;I spent the rest of the day trying to use a WebGL &lt;em&gt;light&lt;/em&gt; library but I ended up wasting my time trying to fix code that wasn’t mine. So, after a few hours and without any results I decided I was going to use WebGL myself without any libraries and called it a day.&lt;/p&gt;

&lt;h2&gt;
  
  
  Day 6
&lt;/h2&gt;

&lt;p&gt;Since today is a holiday in Mexico I don’t have to work today. I’ll be dedicating some more love to this project. &lt;/p&gt;

&lt;p&gt;So, after carefully following a tutorial about &lt;a href="https://webglfundamentals.org/webgl/lessons/webgl-2d-drawimage.html" rel="noopener noreferrer"&gt;how to implement DrawImage&lt;/a&gt;, I managed to port most of it! I made some adjustments. I added support for the opacity/alpha channel and also created a &lt;code&gt;drawRect&lt;/code&gt; method, and also refactored the transition code.&lt;/p&gt;

&lt;p&gt;After a whole day of work, I managed to port everything that I needed. And now I can use the shader to change the hue as in the original game! (Although I won't)&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;I made heavy use of &lt;a href="https://webglfundamentals.org/" rel="noopener noreferrer"&gt;WebGL Fundamentals&lt;/a&gt;, so if your trying to learn WebGL, I would definitively suggest you start there. &lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;So, it feels slightly smoother now. But, I noticed something else, playing sounds slows down the game. So, I’ll figure out how to improve that on another day. I’ll try to use &lt;a href="https://github.com/goldfire/howler.js#documentation" rel="noopener noreferrer"&gt;Howler.js&lt;/a&gt; since it has a sprite functionality which may be good here. &lt;/p&gt;

&lt;h2&gt;
  
  
  Day 7 (noon)
&lt;/h2&gt;

&lt;p&gt;I spent my evening using the howler.js library and it solved my problem, now I can play sounds and have no lag! &lt;/p&gt;

&lt;h2&gt;
  
  
  Day 8 (noon)
&lt;/h2&gt;

&lt;p&gt;I tried to use the sprite functionality but it turned out to worsen performance. My guess is that batching requires more processing power vs just storing and accessing a bunch of KBs into the memory. &lt;/p&gt;

&lt;p&gt;I also tried using the OGG format for sounds but it wasn’t being reproduced correctly, it was as if it was breaking at times.&lt;/p&gt;

&lt;h2&gt;
  
  
  Day 9 (morning)
&lt;/h2&gt;

&lt;p&gt;After doing my daily exercise routine (I don’t commute anymore due to COVID-9), I decided to use my spare time to work on implementing the game over screen. Here is how it looks:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/YPQStZaTfRAzqoLjQw/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/YPQStZaTfRAzqoLjQw/giphy.gif" alt="Video of game over transition"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Day 10
&lt;/h2&gt;

&lt;p&gt;The first thing I did today was adding foes to the grid generation algorithm. I added some debug overlays to know which blocks would contain a foe by drawing a red dot on the “bad dirt” block.&lt;/p&gt;

&lt;p&gt;Next, I refactored the treasure instance manager to be a general instance manager. I added the scorpion as if it was another treasure, except, of course, it doesn’t do anything when it touches the player.&lt;/p&gt;

&lt;p&gt;I fixed some bugs and went on to refactor the &lt;code&gt;drawImage&lt;/code&gt; method from my canvas helper class so that I could flip an image vertically or horizontally. This, by the way, wasn’t previously possible without the WebGL context. So now that I have this code I’m thinking if I should remove the other flipped sprites for the player or if I should keep them. In any case, I’d like to make it consistent across the code.&lt;/p&gt;

&lt;h2&gt;
  
  
  Day 11 (noon)
&lt;/h2&gt;

&lt;p&gt;I updated the code to make the scorpions actually freeze the player for 1 second:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/mCOxtp7Snp33eVj2eo/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/mCOxtp7Snp33eVj2eo/giphy.gif" alt="Video of scorpions in game"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Day 12
&lt;/h2&gt;

&lt;p&gt;I started working on the fire code to make it move horizontally and bounce off of walls. My first approach was doing something like a “raycast” where I would know what position would the fire be able to move to. But I struggled with that approach. I did a rubber ducky session with a friend and decided to do a similar approach as what I did with gravity — I made the fire move block-by-block and it worked! Way simpler to read too. Here is how it currently looks like:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/kCF8wBoszZ7MgmgaLQ/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/kCF8wBoszZ7MgmgaLQ/giphy.gif" alt="Video of fire in game"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I alose made the fire be able to burn treasures and scorpions.&lt;/p&gt;

&lt;p&gt;This is it! I’m basically finished with the MVP! I’m thinking about adding something like hue change per 5 levels and making it progressively harder as levels go up. But, to be honest, I just wanted to finish the MVP. I'm not too invested in this project.&lt;/p&gt;

&lt;h2&gt;
  
  
  Remaining Bugs
&lt;/h2&gt;

&lt;p&gt;I showed this game to a friend of mine who’s a QA engineer. He found about 5 bugs that I need to fix. Since this game is not such an exciting project to me, I am deciding to leave a small backlog so that /someday, someone/ comes and fixes these. I did fix the critical ones though.&lt;/p&gt;

&lt;h2&gt;
  
  
  Github
&lt;/h2&gt;

&lt;p&gt;Now that the MVP is finished, I need to update the README and polish a few things. One of those things is making it a single NPM package. Currently, I have two: one for the simulator and another one for the runner. So I’ll make it just one thing.&lt;/p&gt;

&lt;p&gt;What I want to do is watch the app-core source so that when there is a change I can re-bundle and thus refresh the browser.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;app-core &amp;gt; bundle &amp;gt; simulator includes bundle
                  &amp;gt; runner includes bundle
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Something like that. So, what I am thinking is of an approach where you don’t need to have access to the &lt;a href="https://github.com/Fergarram/banana-app" rel="noopener noreferrer"&gt;svelte app&lt;/a&gt; from the simulator, but rather just to the compiled simulator which you can inject the script into. &lt;/p&gt;

&lt;p&gt;[Few hours later]&lt;/p&gt;

&lt;p&gt;I used  webpack to bundle everything together.&lt;/p&gt;

&lt;p&gt;This approach worked pretty well, now the folder structure is way more readable and easier to use.&lt;/p&gt;

&lt;h2&gt;
  
  
  Publishing on Marketplace
&lt;/h2&gt;

&lt;p&gt;So, the process to publish an app to the KaiStore is quite easy, all you have to do is register on the publisher and developer portals on kaiostech.com.&lt;/p&gt;

&lt;p&gt;For now, it seems like using ads is obligatory, so I had to download a JavaScript file that I included on my index.html file so that I could call a function that is added to the window.&lt;/p&gt;

&lt;p&gt;I decided to show ads after the game over screen, right after the user decides to try again or close the game. He always gets the ad, though.&lt;/p&gt;

&lt;p&gt;[a few recent updates]&lt;/p&gt;

&lt;p&gt;I had a small email conversation with the engineers from the KaiStore and after a few days of their testing, my app is now published in the KaiStore!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fepmvzt8s2x5pz1fegjso.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fepmvzt8s2x5pz1fegjso.jpg" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I had to rename the game to "Treasure Hunter" since "Amateur Archaeology" is too big!&lt;/p&gt;

&lt;p&gt;Hey! Thanks for taking the time to read this devlog. If you'd like to see more of my work or projects be sure to follow me on the following social media or check my website at &lt;a href="//fernando.works"&gt;fernando.works&lt;/a&gt;:&lt;/p&gt;

&lt;p&gt;Youtube: &lt;a href="https://www.youtube.com/channel/UCPBwZWChghNODkWGWDga-tw" rel="noopener noreferrer"&gt;Fernando Garcia&lt;/a&gt;&lt;br&gt;
Twitter: &lt;a href="https://twitter.com/_fergarram_" rel="noopener noreferrer"&gt;@_fergarram_&lt;/a&gt;&lt;br&gt;
LinkedIn: &lt;a href="https://www.linkedin.com/in/fergarram/" rel="noopener noreferrer"&gt;@fergarram&lt;/a&gt;&lt;br&gt;
Facebook: &lt;a href="https://www.facebook.com/fergarram" rel="noopener noreferrer"&gt;@fergarram&lt;/a&gt;&lt;br&gt;
Instagram: &lt;a href="https://www.instagram.com/fergarram/" rel="noopener noreferrer"&gt;@fergarram&lt;/a&gt;&lt;br&gt;
Reddit: &lt;a href="https://www.reddit.com/user/fergarram" rel="noopener noreferrer"&gt;@fergarram&lt;/a&gt;&lt;br&gt;
Twitch: &lt;a href="https://www.twitch.tv/fergarram" rel="noopener noreferrer"&gt;@fergarram&lt;/a&gt;&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>kaios</category>
      <category>sideprojects</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Are you currently working on multiple projects at a time?</title>
      <dc:creator>Fernando Garcia</dc:creator>
      <pubDate>Thu, 05 Mar 2020 21:36:49 +0000</pubDate>
      <link>https://dev.to/fergarram/are-you-currently-working-on-multiple-projects-at-a-time-2c80</link>
      <guid>https://dev.to/fergarram/are-you-currently-working-on-multiple-projects-at-a-time-2c80</guid>
      <description>&lt;p&gt;Whether you are a 9to5er or a full-time freelancer, you probably have a few projects going on at the same time.&lt;/p&gt;

&lt;p&gt;I'm currently a full-time frontend developer with a business on the side, while also creating small side-projects on weekends.&lt;/p&gt;

&lt;p&gt;Curious to know how it is going for you :)&lt;/p&gt;

</description>
      <category>discuss</category>
      <category>sideprojects</category>
      <category>productivity</category>
    </item>
    <item>
      <title>Do you know what a productivity system is? 🤔</title>
      <dc:creator>Fernando Garcia</dc:creator>
      <pubDate>Sun, 26 Jan 2020 21:16:22 +0000</pubDate>
      <link>https://dev.to/fergarram/do-you-know-what-a-productivity-system-is-48ce</link>
      <guid>https://dev.to/fergarram/do-you-know-what-a-productivity-system-is-48ce</guid>
      <description>&lt;p&gt;Hello everybody! I have seen this term quite a few times now and not long ago I realized that this is exactly what I had been doing for the past few years — organizing my time and efforts on a habitual basis in such a way that I know what to do today in order to reach my goals.&lt;/p&gt;

&lt;p&gt;I am curious to know what you think about this term and how does it sound to you :D&lt;/p&gt;

</description>
      <category>discuss</category>
      <category>productivity</category>
    </item>
    <item>
      <title>Any Front End here that has bought a KaiOS device?</title>
      <dc:creator>Fernando Garcia</dc:creator>
      <pubDate>Fri, 27 Dec 2019 17:52:02 +0000</pubDate>
      <link>https://dev.to/fergarram/any-front-end-here-that-has-bought-a-kaios-device-9oa</link>
      <guid>https://dev.to/fergarram/any-front-end-here-that-has-bought-a-kaios-device-9oa</guid>
      <description>&lt;p&gt;I bought the yellow banana phone to do little experiments with it. Curious to know if anybody else has played with it 😁&lt;/p&gt;

</description>
      <category>kaios</category>
      <category>webdev</category>
      <category>sideprojects</category>
      <category>discuss</category>
    </item>
    <item>
      <title>What do you wish to use your free time for?</title>
      <dc:creator>Fernando Garcia</dc:creator>
      <pubDate>Wed, 18 Dec 2019 06:50:23 +0000</pubDate>
      <link>https://dev.to/fergarram/what-do-you-wish-to-use-your-free-time-for-59ik</link>
      <guid>https://dev.to/fergarram/what-do-you-wish-to-use-your-free-time-for-59ik</guid>
      <description></description>
      <category>discuss</category>
    </item>
    <item>
      <title>How does procrastination look to you?</title>
      <dc:creator>Fernando Garcia</dc:creator>
      <pubDate>Fri, 22 Nov 2019 20:32:27 +0000</pubDate>
      <link>https://dev.to/fergarram/how-does-procrastination-look-to-you-4f4o</link>
      <guid>https://dev.to/fergarram/how-does-procrastination-look-to-you-4f4o</guid>
      <description>&lt;p&gt;What you want to do at home vs. What you end up doing&lt;/p&gt;

</description>
      <category>discuss</category>
      <category>productivity</category>
      <category>career</category>
      <category>webdev</category>
    </item>
    <item>
      <title>What are the main struggles of working as a freelancer while having a 9to5 job?</title>
      <dc:creator>Fernando Garcia</dc:creator>
      <pubDate>Mon, 18 Nov 2019 22:22:55 +0000</pubDate>
      <link>https://dev.to/fergarram/what-are-the-main-struggles-of-working-as-a-freelancer-while-having-a-9to5-job-5g7a</link>
      <guid>https://dev.to/fergarram/what-are-the-main-struggles-of-working-as-a-freelancer-while-having-a-9to5-job-5g7a</guid>
      <description>&lt;p&gt;Hey all, I am curious to know what problems you have encountered with this and whether you've found a solution or not.&lt;/p&gt;

</description>
      <category>discuss</category>
      <category>webdev</category>
      <category>productivity</category>
      <category>career</category>
    </item>
  </channel>
</rss>
