<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Diazgiordano on Medium]]></title>
        <description><![CDATA[Stories by Diazgiordano on Medium]]></description>
        <link>https://medium.com/@diazgiordano?source=rss-5d59a5184275------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*Bo-aZtwNHuLSzw-9</url>
            <title>Stories by Diazgiordano on Medium</title>
            <link>https://medium.com/@diazgiordano?source=rss-5d59a5184275------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 02 Dec 2026 01:19:41 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@diazgiordano/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[One step beyond the Fear]]></title>
            <link>https://diazgiordano.medium.com/one-step-beyond-the-fear-2a15e55c0885?source=rss-5d59a5184275------2</link>
            <guid isPermaLink="false">https://medium.com/p/2a15e55c0885</guid>
            <category><![CDATA[realizations]]></category>
            <category><![CDATA[personal-growth]]></category>
            <category><![CDATA[self-esteem]]></category>
            <dc:creator><![CDATA[Diazgiordano]]></dc:creator>
            <pubDate>Sat, 22 May 2021 05:08:54 GMT</pubDate>
            <atom:updated>2021-05-22T05:08:54.352Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rvKvQ8s5ffTzL7uV5j8d3g.jpeg" /></figure><p>Today is one year since I decided to change my job, my profession … my life. Like many, the pandemic made my plans change dramatically and I had to make decisions that today I firmly affirm have marked a before and after in my life.</p><p>Let me tell you about the situation I was in and why I speak the way I do. When they declared a total quarantine in my country, I had given up my stable job in a large company for another job proposal that was much more economically profitable but high-risk, in a small company, that decision was the beginning of a change that I never could. foresee.</p><p>When this “two-week” quarantine began I had signed my resignation but had not signed with the new company. After the first month of quarantine, I received a call from this company that they could not hire me since they would declare themselves indefinitely unemployed. And now what do I do?.<br>How do I look for work in quarantine? My career was mandatory in person, I only counted on my savings to support myself while my family lived far away without being able to mobilize, and living in a recently moved room had everything against it.</p><p>I admit that I fell into a strong depression from which I still have not fully recovered, my world fell apart, which with great effort I was building in a matter of days like a fragile glass was broken.<br>But as they say, when you hit bottom the only thing left is to go up. I had two options:</p><ul><li>Find another job about my career (while I expose myself I am still in a world that I already know).</li><li>Or I take a risk and start something new (here think about what is eating your head for starting and you still do not do it).</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WDXbPYSuHk79Cp-wu81sEA.jpeg" /></figure><p>Difficult decision, right? Well, that is normal, the fear of the unknown is something that is engraved in our genes and makes us always resort to the safe, to the known to the stable.</p><p>But this time in my case, the fears were already out of context I was in the depths of depression so I decided to take a risk, total I could lose. So I took the step jump into the unknown in my case I decided to change careers. I studied something totally different from my career, but that I thought that in this new era that is just beginning, it would allow me not only to survive but to get where I could not before.<br>Since that decision, that I made a night where I did not sleep the eye all night, 12 months have passed, 1 whole year.<br>I wanted to quit a thousand times or more, I think, I was presented with multiple opportunities to continue working in my career, great offers from friends who cared for me, from people who reached out to me and for whom I am completely grateful.<br>But I was completely attached to the crazy idea of ​​finishing what I started, still seeing my savings disappear month by month, and being on the verge of losing everything.<br>Only a week ago I got a job, and although I have just started it feels very good, despair has turned into hope and although nothing is said I do not regret having fought fear for 1 year, now I have other fears but I know that facing them giving step beyond them something good will come out.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mIorh5Wp4fGgkC7W8CI0dQ.jpeg" /></figure><p>It is okay to feel afraid, there will always be something to fear but do not let it paralyze you, if you are afraid to ask for a push, do it even if fearful but do it, what is the worst that can happen? start again? Well, let’s start as many times as necessary to be where we want.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2a15e55c0885" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[First Game with Phaser 3 and Tiled]]></title>
            <link>https://diazgiordano.medium.com/first-game-with-phaser-3-and-tiled-f1556cea0b8d?source=rss-5d59a5184275------2</link>
            <guid isPermaLink="false">https://medium.com/p/f1556cea0b8d</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[node]]></category>
            <category><![CDATA[webpack]]></category>
            <category><![CDATA[phaser-3]]></category>
            <category><![CDATA[games]]></category>
            <dc:creator><![CDATA[Diazgiordano]]></dc:creator>
            <pubDate>Wed, 24 Mar 2021 19:26:15 GMT</pubDate>
            <atom:updated>2021-03-25T19:47:10.388Z</atom:updated>
            <content:encoded><![CDATA[<h4>A quick guide to setting the basic physics of a web game.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SVjaosYUg0JQfnO8x9sa-Q.jpeg" /><figcaption>Phaser 3 and Tiled maps</figcaption></figure><p>When we learn a programming language we almost always close our vision to what it can serve and we pigeonhole it into what we were taught, forgetting that the world of programming is a world of infinite possibilities.</p><p>This is the case with JavaScript that allows us to create greater games for the web and mobile. With this article, I intend to help you set the foundations so that you can start building your own games.</p><h4>Prerequisites</h4><ul><li>Node JS, you can download it from <a href="https://nodejs.org/es/download/">https://nodejs.org/es/download/</a></li><li>Tiled maps, you can download from <a href="https://www.mapeditor.org/">https://www.mapeditor.org/</a></li><li>The code editor, in this case, I’m using Visual Studio code, you can download it from <a href="https://code.visualstudio.com/download">https://code.visualstudio.com/download</a></li><li>Images for our map from <a href="https://kenney.nl/assets/platformer-art-winter">https://kenney.nl/assets/platformer-art-winter</a></li><li>Images for our character from <a href="https://www.gameartguppy.com/shop/penguin/">https://www.gameartguppy.com/shop/penguin/</a></li><li>The program for character’s movement, it’s called TexturePacker <a href="https://www.codeandweb.com/texturepacker">https://www.codeandweb.com/texturepacker</a></li></ul><h4>First step: Making all the Settings</h4><p>Open a new folder with your Code editor:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1013/1*DJzms9xhO6hHLvTQ03ojCg.png" /></figure><p>Open a new terminal and run the command</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/999/1*w8O7fdAN__JBW0a0U6pZNA.png" /></figure><p>That command will gonna create the file named packacge.json with that file We will be working on development, first of all, We will install Webpack to do that go to the documentation page for webpack <a href="https://webpack.js.org/guides/getting-started/">https://webpack.js.org/guides/getting-started/</a> and follow the steps to set it.</p><p>Create a new folder called “src” and one file “index.html” when you run the command from npm</p><p>“npm install webpack webpack-cli webpack-dev-server --save-dev”</p><p>your folder should look like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1012/1*14zQpsmvuYDCT4ULelYPrw.png" /></figure><p>Now We gonna add <strong>Phaser 3</strong> with npm, with the command:</p><p>npm install phaser</p><p>The next thing to do is create a file “index.js” inside of our folder <strong>SRC</strong> connected with our file “index.html”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kaGJT4ysTBpyTqA6FVs5gw.png" /></figure><p>Now create a new folder inside of <strong>SRC </strong>named “config” and inside of that folder create a file named “Config.js” with the next lines of code this is the basic config for phaser:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1020/1*N7uVmy0011m_8EKuE5dhbA.png" /></figure><p>Before continuing with phaser We have to set our webpack config and to do that We need some more dependencies to run the next commands:</p><p>npm install @babel/core @babel/preset-env --save-dev</p><p>npm install copy-webpack-plugin --save-dev</p><p>npm install clean-webpack-plugin html-webpack-plugin raw-loader --save-dev</p><p>npm install resolve-url-loader terser-webpack-plugin --save-dev</p><p>npm install babel-loader css-loader sass-loader styles-loader postcss-loader file-loader</p><p>After running these commands, in your file package.json create the next scripts and the file should look like this at the end:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/951/1*w_boQY84FWVkS7RAdnRtwQ.png" /></figure><p>Create some new files: “.babelrc”, “babel.config.js”, “webpack.config.js” with the next code:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/790/1*eZqNFVPbedMnjZFOKF3CZw.png" /><figcaption><strong>Babel first file</strong></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/696/1*ZlasFYPDdaFuyZ49HF2K5w.png" /><figcaption><strong>Babel Config file</strong></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/947/1*aFyvgA6b64jtjIJmcpC8eg.png" /><figcaption><strong>Webpack Config file 1</strong></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/879/1*skFKb53Sr4fD6Ue8zs054w.png" /><figcaption><strong>Webpack Config file 2</strong></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/890/1*brLBzR_pswYVf6ByQ4mJwg.png" /><figcaption><strong>Webpack Config file 3</strong></figcaption></figure><p>For all the code inside the “webpack.config.js” just copy, for now, this is not an article dedicated to webpack.</p><p>If you set everything well, you gonna have this when you run the command npm run start</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2fAH4C7BfdnFwtqx_pVIRQ.png" /><figcaption><strong>Browser view</strong></figcaption></figure><h4>Second Step: Creating Scenes and Adding Your Character</h4><p>For this step, you should have downloaded the images of the characters and maps pages from the links provided at the beginning.</p><p>PD: All images are free, for the penguin just add to the card and continue the instructions and choose only images you don’t need vectors this time.</p><p>These are all the images together</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*z1RUj_XVou0TixBYZZS_kQ.jpeg" /></figure><ul><li>Open the program TexturePacker that you downloaded before, and add new images</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*y_6aEbSbY3gM-nvEHmvReA.png" /></figure><ul><li>Add all the images for penguin, and choose framework “Phaser (JSONArray)”, and the folder where you are working, in this case, create a new folder inside of SRC called “<strong>assets</strong>”, finally click on “<strong>publish sprite sheet</strong>”</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*m4jLhuXK6uR1_21qbCqbxg.png" /></figure><p>Your project has to look like this right now:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4hnzjwuko0GfO1MWQH4mpg.png" /></figure><p>Now you have two png files and one JSON file for the penguin, this JSON file will be useful when you want to create animations.</p><ul><li>Create a new scene, go to SRC create a new folder named “scenes” and inside of this create a scene named “Game.js”</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BCepxO8wxWGiCSVn7xDb7Q.png" /><figcaption><strong>Game scene</strong></figcaption></figure><ul><li>Add the next code to the “index.js”</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/771/1*nukZ3g1wrN3X5sXvHbm4vw.png" /><figcaption><strong>Code in index.js</strong></figcaption></figure><ul><li>This is the result:</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fiNVMUiJeWvG7BHX211CTg.png" /><figcaption><strong>Browser Result</strong></figcaption></figure><p>Now open the Tiled maps program and click on the new map button and you can personalize the size for this example I choose 70px by 70px cause the images are of this size but you can edit as you want, these are my settings:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/749/1*MkqMrHoL6S5bIgEBDjbFhg.png" /><figcaption><strong>Tiled initial settings</strong></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Xx5ISv9JQk1---eXgo8Nvg.png" /><figcaption><strong>Tiled first screen</strong></figcaption></figure><ul><li>First, add a new tileset, clicking on the button on the right and choosing the image that you download for the map the IceWorld from here <a href="https://kenney.nl/assets/platformer-art-winter">https://kenney.nl/assets/platformer-art-winter</a>, them give it a name and press OK.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*m0VhdXbUnciq9PLLIk0NKA.png" /></figure><ul><li>Pick one of the images and put it on the grid, also change the name of the layer:</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*q06FVXt72_7eOY6gAx53VQ.png" /><figcaption><strong>Ground</strong></figcaption></figure><ul><li>Now go to “file” them to “export” choose the folder “your_project/src/assets”</li></ul><p>Ok, now We have all that we need.</p><p><strong>Third step: Connecting character and map with physics from MatterJS</strong></p><ul><li>First, we gonna add our map to the scene.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sAE-9gmnP1ZT2ECwJLjVBA.png" /><figcaption><strong>Adding a map to the scene</strong></figcaption></figure><ul><li>For now, we remove our code for the penguin and add new code to set the map, and also to see the improvement you can add some blocks to the top of the map to see it cause right now looks like it’s empty but it isn’t:</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/978/1*fzxy-bFHweSJiqsHlTlhyA.png" /><figcaption><strong>New code in Create function</strong></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*0yATUYO56SrRumAe0u4unw.png" /><figcaption><strong>Changes in tilemap</strong></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*r3lw9s5EcX5bW0-mysXJQA.png" /><figcaption><strong>Browser view</strong></figcaption></figure><ul><li>Now we will add the physics with Matter, to do that go to the folder config and open the file “Config.js” and change the default ‘arcade’ value for ‘matter’ as the image:</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/633/1*WML0OMNPbtAtkGcksPRviw.png" /><figcaption><strong>Change physics</strong></figcaption></figure><ul><li>Go to tiled and change the attributes of the layer, clicking the button below our layer:</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/368/1*kEDaOEYDyBD1UwFNNnHHig.png" /><figcaption><strong>Settings of the layer</strong></figcaption></figure><ul><li>Select all the picks inside:</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IcMgCWgUa4Cu9HKTptmTJw.png" /><figcaption><strong>Images picked</strong></figcaption></figure><ul><li>Add new property “collides” with the value of bool that means that will be a boolean. Make sure that the new property it’s checked.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VYDVWPHhsGQGkRmN_bbknw.png" /><figcaption><strong>Add new property</strong></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-AJpYNLSMFbGF08_XRe71Q.png" /><figcaption><strong>Make sure that it’s checked</strong></figcaption></figure><ul><li>Add the property of collides to our code through Matters, with this all our ground now are physicals bodies.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/541/1*AxvYVcZrlRuUF1pJHylNzw.png" /><figcaption><strong>Adding Matters to our code</strong></figcaption></figure><ul><li>Add the character again and create animations for idle and walk with a new function called createPenguinAnimations that get the frames from our file penguin.json in the assets folder:</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/654/1*slFXERYn5MJyQmmgh9B60Q.png" /><figcaption><strong>Add animations</strong></figcaption></figure><ul><li>Well done, it’s time to add the cursors with some methods from the phaser, adding init function to our scene, and passing the next code:</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/522/1*d_0EggITMPSUo-dxvB_XqA.png" /><figcaption><strong>Adding cursors</strong></figcaption></figure><ul><li>Add references to our character, with Phaser.Physics.Matter.Sprite :</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/691/1*r-seL2rL2nhDfY5kfpnfdQ.png" /></figure><ul><li>Now we have to create a function to move our character and that will be done with the update function which controls the movement in the X-axis, and to fix the rotation adds some <strong>setFixedRotation()</strong> to our penguin also to follow our character we gonna set code for the cameras with<strong> “this.cameras.main.starFollow(this.penguin, true)”</strong>:</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/704/1*QwvcNq3NKuNM87GHZUpt0w.png" /><figcaption><strong>Adding movement</strong></figcaption></figure><ul><li>And now just is left the code for jumping, well to do that we gonna add a variable to our constructor <strong>“this.isTouchingGround = false”</strong>, after that we gonna add the next code to our functionality:</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/476/1*MAx-lhWsJ290DiLavQN-mw.png" /><figcaption><strong>Add a new variable to the constructor</strong></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/731/1*YVAh4kyopXBPOIcr98I_tA.png" /><figcaption><strong>Add functionality for jump</strong></figcaption></figure><p>With this last part, our character can jump just one time so that is the rule for this example, and with this, we finish the settings.</p><h4>Conclusions:</h4><p>We make the basic configurations to work with Phaser 3, Tiled map, and Webpack and add some awesome functionality for our project, I really hope that this short article helps you with your projects. Also if you want more about this project you can search it on this youtube channel <strong>Ourcade</strong> (<a href="https://www.youtube.com/c/Ourcadehq/videos">https://www.youtube.com/c/Ourcadehq/videos</a>). I studied it from here and just add the webpack part.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f1556cea0b8d" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>