<?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 Thomas Palef on Medium]]></title>
        <description><![CDATA[Stories by Thomas Palef on Medium]]></description>
        <link>https://medium.com/@thomaspalef?source=rss-aca9edabf461------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*J4XKb0CKx0lieggO9MtCAQ.png</url>
            <title>Stories by Thomas Palef on Medium</title>
            <link>https://medium.com/@thomaspalef?source=rss-aca9edabf461------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 22 Nov 2026 10:08:21 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@thomaspalef/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[Game Design Analysis of Flappy Bird and Swing Copters]]></title>
            <link>https://medium.com/@thomaspalef/game-design-analysis-of-flappy-bird-and-swing-copters-5c6df9fc10f0?source=rss-aca9edabf461------2</link>
            <guid isPermaLink="false">https://medium.com/p/5c6df9fc10f0</guid>
            <category><![CDATA[game-development]]></category>
            <category><![CDATA[game-design]]></category>
            <dc:creator><![CDATA[Thomas Palef]]></dc:creator>
            <pubDate>Tue, 08 Feb 2022 18:12:26 GMT</pubDate>
            <atom:updated>2022-02-08T18:12:26.999Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*i0Xt8cdWiFy73HveSoyF7A.png" /></figure><p>Dong Nguyen, the creator of the well-known Flappy Bird, made a game called Swing Copters. At first sight, Flappy Bird and Swing Copters are looking really similar: same aesthetics, same controls, and same game mechanics. But let’s look deeper and analyze both of these games.</p><h3>Instructions</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/0*E_ReLiV59pwtmpMt.png" /></figure><p>The first thing you see in Flappy Bird are the game’s instructions. It’s a simple image that says “tap” and shows a bird jumping. With just this image we basically understand everything about the game, and as soon as we tap the screen we actually see the bird jumping. It’s plain and simple.</p><p>Swing Copters also has the same type of instructions, the only difference is that its meaning is far from obvious. Does taping make you fly? Does it let you change direction? How? And when you do tap the screen, nothing happens since you have to wait for the character take off. That’s confusing.</p><h3>Training</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/0*HXjMZAlSpsZ2IUhy.png" /></figure><p>In Flappy bird, when you start playing you have about 3 seconds of flight without any obstacle. That’s the perfect time to test the controls to see how high you jump and how fast you fall. This way, when the first pipe finally appears, you know how to avoid it.</p><p>In Swing Copters you have less than a second before colliding with the first obstacle. There’s no time to learn anything about the controls, and that’s especially annoying since the instructions weren’t clear in the first place. So you’ll have to die a lot before getting used to the controls.</p><h3>Consistency</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/0*jjldMx1UY3T5Y6XK.png" /></figure><p>The jump in Flappy Bird is consistent: you jump with the same force and fall at the same speed every time. This makes it possible to easily predict where you’ll end up after taping the screen. So when you die, you know what went wrong and play just one more time to avoid doing the same mistake.</p><p>In Swing Copters, things are more complex. Once the copter starts moving in one direction it gains momentum, and it becomes harder to regain control of its flight path. This makes it really difficult to predict when you should tap to avoid all the obstacles. So you die a lot without really knowing what went wrong.</p><h3>Difficulty</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/0*SC0-UltrC_bwwW0r.png" /></figure><p>Flappy Bird is a difficult game, but the controls are so simple that with some effort you can master them. The longer you play, the stronger you get, and that’s what makes this game addicting. Most people can get past 5 or 10 points with just a few minutes of play.</p><p>You can also get better at Swing Copters by playing. But because of everything we mentioned in this article, it’s just hard to get started. Most people cannot get 3 points. That’s not really encouraging to keep playing.</p><h3>Conclusion</h3><p>Both of these games are hard, but one is fun to play while the other is frustrating.</p><p><strong>To learn more about game development, make sure to follow me on Twitter: </strong><a href="https://twitter.com/thomaspalef"><strong>@thomaspalef</strong></a><strong>.</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5c6df9fc10f0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How To Create and Promote Your Own Games]]></title>
            <link>https://medium.com/@thomaspalef/how-to-create-and-promote-your-own-games-ff54fdf61ce3?source=rss-aca9edabf461------2</link>
            <guid isPermaLink="false">https://medium.com/p/ff54fdf61ce3</guid>
            <category><![CDATA[game-design]]></category>
            <category><![CDATA[game-development]]></category>
            <dc:creator><![CDATA[Thomas Palef]]></dc:creator>
            <pubDate>Mon, 07 Feb 2022 20:03:29 GMT</pubDate>
            <atom:updated>2022-02-07T20:03:29.286Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BcTwv-b_5Jdu3JUahDN7vQ.png" /></figure><p>My goal in this article is to provide you with concise information that will help you make and promote your own games. This should be useful whether you are just curious about making games, or you’ve already made a few. Here are the 3 main topics we will cover:</p><ol><li>Tips to get started making games</li><li>Learn how to make great games</li><li>Discover ways to promote your games</li></ol><h3><strong>Tips to Get Started</strong></h3><p><strong>Choose The Right Framework</strong></p><p>There are now thousands of game frameworks available out there, so which framework should you choose? The answer really depends, but here is some advice to help you filter down the frameworks into just a handful of them:</p><ul><li>You should aim for a framework that is actively maintained with a strong community. This way you can be sure that it will keep getting better, and that you can easily get help when stuck.</li><li>Look for cross platform frameworks. Making games that work on both mobile and desktop is a must nowadays.</li><li>Know your needs. Want to make 2D or 3D graphics? Do the games have to be playable in a browser? Looking to code in a specific languages? And so on.</li></ul><p>For your information, here are some of the most popular frameworks right now: Unity, Unreal, Godot, Phaser, Love2D, Pico-8.</p><p><strong>Start Really Small</strong></p><p>It’s easy to fall into the trap of wanting to make a really complex game: “Let’s make a Zelda­like with quests, dungeons, puzzles, and bosses!” But most of the time these projects are put on shelves because they are too difficult to make. I know because I’ve made this mistake.</p><p>Instead, start making a really simple mini games like Pong, Breakout or Space Invaders. It will still be challenging to do, but this time you should be able to finish it. And finishing a game is the rewarding part. It’s only when you become comfortable making these types of projects that you can start more ambitious ones.</p><p><strong>Find an Idea</strong></p><p>Finding an idea is difficult. There are so many possibilities and so many choices to make that it’s hard to pick a specific idea. Because of this, a lot of people keep changing their minds over and over again, and then end up with nothing.</p><p>One powerful tool to avoid this trap is to use constraints. With constraints you are artificially getting rid of a lot of ideas, and having less options means that it’s easier to pick one. So instead of focusing on your idea, try to pick constraints that you find interesting. Example: make a 2D platformer, in less than a week, by using only 3 different colors for the sprites.</p><p>And if you really don’t have any idea of what you could make, simply look at the games you like and try to do something similar. I’m not advising you to copy them exactly, but just starting with one game in mind can help you get started.</p><p><strong>Keep Iterating</strong></p><p>When making a game you have to think about a lot of things: ideas, gameplay, art, level design, performance, etc. So how can you get everything right? The answer is simple: divide your project into really small parts. For example if you plan to make a platformer, you should do something like this:</p><ul><li>v0.1: just the player (a black square) moving in a super simple level (just a line)</li><li>v0.2: add some enemies (red squares standing still) to make the player die</li><li>v0.3: tweak the jump physics and start building a level</li></ul><p>As you can see each iteration is small and focused on just one or two things. At each version you can actually test the game, see what’s wrong, and fix it. And after 10, 20, or 50 iterations, you’ll end up with something you like.</p><p>And lastly, the best tip to get started is to… actually make games! :­)</p><h3><strong>How to Make Great Games</strong></h3><p><strong>Graphics and Sounds</strong></p><p>Graphics and sounds are really important, but you don’t need to be a designer or a musician to make good games. For graphics go to the o​pengameart.org website where they have tons of sprites available for free. For sounds you should use b​fxr.net which lets you create nice sound effects just by pressing some buttons.</p><p>The most important thing for the graphics is that they should be consistent. Use the same style and color palette across all your sprites so that everything looks cohesive.</p><p>For sound effects, too many of them can be really annoying and too few will make the game boring. So try to find a good balance.</p><p><strong>Game Design</strong></p><p>Game design doesn’t really mean anything specific, yet it’s super important to get it right. Here are some questions you should ask yourself while working on a project:</p><ul><li>Is it easy to understand? Players should be able to pick up the game for the first time, and start playing it without needing a manual or a friend to guide them.</li><li>Is it interesting? The game has to be enjoyable with surprises and rewards along the way.</li><li>Is the difficulty curve well thought­out? It should be very easy at first, and then slowly become more and more challenging.</li></ul><p>Game design is not an exact science so there are no precise rules to follow. However, just getting these 3 points right can make a huge difference.</p><p><strong>Juiciness</strong></p><p>One common problem with amateur games is that they often “feel wrong”, and because of this they are not fun to play. It turns out that there is an easy fix to this problem: “juicify the game”. Let me explain.</p><p>The basic idea is to add animations, transitions, and delays to the game. These are just aesthetic changes that will make everything feel more responsive and less boring. This is a vast subject that I cannot cover here, but if you’re interested you should definitely watch this 1​5 minutes Youtube video​that shows how juiciness works.</p><p><strong>User Testing</strong></p><p>The best technique to make a great game is to see other people play it, because you will most definitely discover that your project has flaws. Here are some examples:</p><ul><li>If people struggle to find a way to start the game, don’t say “but it’s obvious, it’s right there!” Instead, make it even more obvious.</li><li>If they keep dying on the first level, it’s not because they are unskilled, but because you are now super strong at your own game. So just edit the level to make it easier.</li><li>If they keep pressing the wrong keys, maybe you should rethink the controls.</li></ul><p>Doing this was eye­opening for me. If you really listen to people’s feedback this simple technique will greatly improve the quality of your games.</p><h3><strong>How to Promote Your Game</strong></h3><p><strong>The Problem</strong></p><p>Once a game is finished, you release it to the world and expect other people to play it. But it’s not as easy as it sounds.</p><p>When someone wants to buy a game he can chose between the many thousands that already exist, plus the hundreds that were released in the last few days. So how could he pick yours?</p><p>You need to do twothings: create a really great game and make people aware that the game exists.</p><p><strong>Really Great Game</strong></p><p>We already covered some techniques to make a great game, but I want to clarify something.</p><p>It’s not just about making a great game, it’s about convincing people that your game is great. And that’s not the same thing! Make sure to have a website where you explain what your game is about, what makes it different, include images and videos, display player reviews, and so on.</p><p>You should try make it an almost no­brainer: “wow, that looks awesome, I have to play it!”</p><p><strong>Make People Aware</strong></p><p>Here’s the perfect system to make people aware of what you are working on:</p><ul><li>Have a website or blog where you write valuable content: gifs of your game, tutorials, etc.</li><li>Have a way to stay in touch with your readers: email, Twitter, Facebook, etc.</li><li>And drive traffic to your website</li></ul><p>This way you will be able to easily send your content to your regular readers, who will then share it with their own network, which will in turn increase your readership count. Then, when you have thousands of people following you, launching games is going to be much easier.</p><p>Let’s focus on the point that is probably the most difficult: getting traffic.</p><p><strong>Get Traffic</strong></p><p>Unfortunately, there is no magic method to drive visitors to your website. You first have to find where the people who might be interested in your project are hanging out, and then reach them. Note that you will probably be looking for different kinds of people if you’re making the next Farmville or working on an FPS.</p><p>The best places to look are forums, social networks, and meetups. That’s where people gather to discuss some common interests. So get there and share information about your game without being too spammy. And if your game pitch interests people, you will start to attract people on your website.</p><p>Getting traffic is a slow process that requires a lot of work. It’s something that is often overlooked by developers, but if you want your game to actually be played by people, you’ll have to do it as soon as possible.</p><h3><strong>Conclusion</strong></h3><p>Making games may be hard, but it’s also an amazing process to go through. So if this is something you’d like to do, my advice is to go for it!</p><p>Here are some additional resources to help you get started.</p><ul><li>Looking for inspiration? Check out <a href="https://www.lessmilk.com/">my free games</a>.​</li><li>Not sure where to start? Learn how to build a full featured game from scratch with my book <a href="https://thomaspalef.gumroad.com/l/make-2d-games">Make 2D Games</a>.​</li></ul><p><strong>To learn more about game development, make sure to follow me on Twitter: </strong><a href="https://twitter.com/thomaspalef"><strong>@thomaspalef</strong></a><strong>.</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ff54fdf61ce3" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Game Design Evolution of Pixel War]]></title>
            <link>https://medium.com/@thomaspalef/pixel-war-game-design-evolution-427469c268fe?source=rss-aca9edabf461------2</link>
            <guid isPermaLink="false">https://medium.com/p/427469c268fe</guid>
            <category><![CDATA[game-design]]></category>
            <category><![CDATA[game-development]]></category>
            <dc:creator><![CDATA[Thomas Palef]]></dc:creator>
            <pubDate>Sun, 06 Feb 2022 18:20:35 GMT</pubDate>
            <atom:updated>2022-02-06T21:08:57.173Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/890/1*CHngl6a9W-vJy0uDFkbyEQ.png" /></figure><p>The second game of my “one game per week” challenge on <a href="https://www.lessmilk.com/">lessmilk.com</a> was a space shooter called Pixel War. When I released it I thought it was a decent game and I was proud of it. But later I made Pixel War 2, and Pixel War 1 seems really basic in comparison.</p><p>Between the two versions, my game design skills have improved by making more than 10 new games. This short post will discuss the main changes I made in the new Pixel War, and why I made them. This should be useful to anyone interested in making games.</p><p>Note: before reading this article you should play the two games: <a href="https://www.lessmilk.com/pixel-war-1/">Pixel War 1</a>, and <a href="https://www.lessmilk.com/pixel-war-2/">Pixel War 2</a>.</p><h3>Input controls</h3><p>In Pixel War 1, a lot of people told me that it made no sense to keep pressing on the up arrow key to fire, since the player wants to fire all the time. And that was a good point.</p><p>To fix that in the new game I added a penalty for firing: the ship moves slower. This change has some interesting benefits:</p><ul><li>Pressing the up arrow key doesn’t feel weird now, since you should not be constantly pressing it</li><li>When firing, you can be more precise to hit or dodge an enemy</li><li>It adds some strategy to the game: do you want to move fast to take a bonus, or do you want to shoot at enemies?</li></ul><p>Code-wise it was a really small change, but I think it really improved the game.</p><h3>Better weapons</h3><p>In the first game there was some power-ups to increase the strength of your weapons. That was nice, but there were a few issues with them that I tried to fix:</p><ul><li>There where only 3 weapons -&gt; now there are 6</li><li>The weapons were very similar -&gt; now each weapon is unique</li><li>Once you got to the 3rd weapon there was nothing left to do -&gt; now the weapons are temporary and random</li></ul><p>With more time I would have added even more power-ups, because they really add fun to the game.</p><h3>Music and sounds</h3><p>Pixel War 1 had a few basic sounds effects that I made with Bfxr and no background music. Not great.</p><p>For Pixel War 2, I asked the talented <a href="https://twitter.com/ben_burnes">Ben Burnes</a> for help. He ended up making an awesome retro music (with Gladius vibes) and polished sound effects. This gives the game a whole new dimension.</p><h3>Special effects</h3><p>The first Pixel War felt a bit static, there wasn’t a lot going on. So I tried to make the new game more responsive by adding new animations and effects:</p><ul><li>When the player fires, there is a small recoil to the ship</li><li>When the player takes a bonus, the ship increase it’s size for a short amount of time</li><li>When the player is hit, the screen flashes</li><li>When an enemy is hit, it is pushed backward</li><li>When the player or an enemy dies, there is a short death animation</li><li>During the whole game I added a moving starfield to give an impression of speed</li></ul><p>All these small things make the game feel a lot more interesting.</p><h3>Conclusion</h3><p>It was really fun to try to identify and fix all the issues with Pixel War 1. I think that I managed to improve my original game, but Pixel War 2 is far from perfect. Maybe one day I’ll make Pixel War 3?</p><p><strong>To learn more about game development, make sure to follow me on Twitter: </strong><a href="https://twitter.com/thomaspalef"><strong>@thomaspalef</strong></a><strong>.</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=427469c268fe" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Make Flappy Bird in JavaScript with Phaser]]></title>
            <link>https://medium.com/@thomaspalef/how-to-make-flappy-bird-in-javascript-with-phaser-857fc3ae443c?source=rss-aca9edabf461------2</link>
            <guid isPermaLink="false">https://medium.com/p/857fc3ae443c</guid>
            <category><![CDATA[game-development]]></category>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[Thomas Palef]]></dc:creator>
            <pubDate>Sat, 05 Feb 2022 13:09:22 GMT</pubDate>
            <atom:updated>2022-03-08T22:26:19.493Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/822/1*oJJ8LWgWdBWfLq3rchqhvQ.png" /></figure><p><strong>Important note: this tutorial uses Phaser v2, to learn about Phaser v3 check this tutorial on my own website </strong><a href="https://www.lessmilk.com/phaser-game-tutorial/"><strong>lessmilk.com/phaser-game-tutorial/</strong></a></p><p>Flappy Bird is a nice little game with easy to understand mechanics, and I thought it would be a perfect fit for a short tutorial. We are going to make a simplified version of Flappy Bird in only 65 lines of JavaScript with the Phaser framework version 2.4.</p><p>Phaser is a free, open source, and awesome framework to make games playable in any web browser.</p><h3>Set Up</h3><p>To start this tutorial you should download this <a href="https://www.lessmilk.com/_stuff/empty.zip">empty template</a> that I made. In it you will find:</p><ul><li>phaser.min.js, the Phaser framework v2.4.3.</li><li>index.html, where the game will be displayed.</li><li>main.js, a file where we will write all our code.</li><li>assets/, a directory with 2 images and one sound effect.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/399/0*OXo8bRjS2vFI5qtq.png" /></figure><h3>Empty Project</h3><p>The first thing we are going to do is to build an empty project.</p><p>Open the index.html file and add this code.</p><pre>&lt;!DOCTYPE html&gt;  <br>&lt;html&gt;<br>    &lt;head&gt;  <br>        &lt;meta charset=&quot;utf-8&quot; /&gt;<br>        &lt;title&gt; Flappy Bird Clone &lt;/title&gt;<br>        &lt;script type=&quot;text/javascript&quot; src=&quot;phaser.min.js&quot;&gt;&lt;/script&gt;<br>        &lt;script type=&quot;text/javascript&quot; src=&quot;main.js&quot;&gt;&lt;/script&gt;<br>    &lt;/head&gt;</pre><pre>    &lt;body&gt;</pre><pre>    &lt;/body&gt;  <br>&lt;/html&gt;</pre><p>This simply load our two JavaScript files.</p><p>In the main.js file we add this to create an empty Phaser game.</p><pre>// Create our &#39;main&#39; state that will contain the game<br>var mainState = {<br>    preload: function() { <br>        // This function will be executed at the beginning     <br>        // That&#39;s where we load the images and sounds <br>    },</pre><pre>    create: function() { <br>        // This function is called after the preload function     <br>        // Here we set up the game, display sprites, etc.  <br>    },</pre><pre>    update: function() {<br>        // This function is called 60 times per second    <br>        // It contains the game&#39;s logic   <br>    },<br>};</pre><pre>// Initialize Phaser, and create a 400px by 490px game<br>var game = new Phaser.Game(400, 490);</pre><pre>// Add the &#39;mainState&#39; and call it &#39;main&#39;<br>game.state.add(&#39;main&#39;, mainState); </pre><pre>// Start the state to actually start the game<br>game.state.start(&#39;main&#39;);</pre><p>All we have to do to make a game with Phaser is to fill the preload(), create() and update() functions.</p><h3>The Bird</h3><p>Let’s first focus on adding a bird to the game that will jump when we press the spacebar key.</p><p>The code below is quite simple and well commented, so you should be able to understand it. For better readability I removed the Phaser initialization and states management code that you can see above.</p><p>First we update the preload(), create() and update() functions.</p><pre>preload: function() { <br>    // Load the bird sprite<br>    game.load.image(&#39;bird&#39;, &#39;assets/bird.png&#39;); <br>},</pre><pre>create: function() { <br>    // Change the background color of the game to blue<br>    game.stage.backgroundColor = &#39;#71c5cf&#39;;</pre><pre>    // Set the physics system<br>    game.physics.startSystem(Phaser.Physics.ARCADE);</pre><pre>    // Display the bird at the position x=100 and y=245<br>    this.bird = game.add.sprite(100, 245, &#39;bird&#39;);</pre><pre>    // Add physics to the bird<br>    // Needed for: movements, gravity, collisions, etc.<br>    game.physics.arcade.enable(this.bird);</pre><pre>    // Add gravity to the bird to make it fall<br>    this.bird.body.gravity.y = 1000;  </pre><pre>    // Call the &#39;jump&#39; function when the spacekey is hit<br>    var spaceKey = game.input.keyboard.addKey(Phaser.Keyboard.SPACEBAR);<br>    spaceKey.onDown.add(this.jump, this);     <br>},</pre><pre>update: function() {<br>    // If the bird is out of the screen (too high or too low)<br>    // Call the &#39;restartGame&#39; function<br>    if (this.bird.y &lt; 0 || this.bird.y &gt; 490) {<br>        this.restartGame();<br>    }<br>},</pre><p>And just below this code we add these two new functions.</p><pre>// Make the bird jump <br>jump: function() {<br>    // Add a vertical velocity to the bird<br>    this.bird.body.velocity.y = -350;<br>},</pre><pre>// Restart the game<br>restartGame: function() {<br>    // Start the &#39;main&#39; state, which restarts the game<br>    game.state.start(&#39;main&#39;);<br>},</pre><h3>Testing</h3><p>Running a Phaser game directly in a browser doesn’t work, that’s because JavaScript is not allowed to load files from your local file system. To solve that we will have to use a webserver to play and test our game.</p><p>There are multiple ways to set up a local web server. Here’s my favourite technique using the Terminal:</p><ul><li>Navigate to the project’s directory cd first-game/.</li><li>Type python -m http.server 8888 (or python -m SimpleHTTPServer 8888 if you are using Python 2).</li><li>And then open the url http://localhost:8888 in your browser.</li></ul><p>Once done, you should see this on your screen.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/397/0*p-Zyl103mSgsMJgG.gif" /></figure><h3>The Pipes</h3><p>A Flappy Bird game without obstacles (the green pipes) is not really interesting, so let’s change that.</p><p>First, we load the pipe sprite in the preload() function.</p><pre>game.load.image(&#39;pipe&#39;, &#39;assets/pipe.png&#39;);</pre><p>Since we are going to handle a lot of pipes in the game, it’s easier to use a Phaser feature called “group”. The group will simply contain all of our pipes. To create the group we add this in the create() function.</p><pre>// Create an empty group<br>this.pipes = game.add.group();</pre><p>Now we need a new function to add a pipe in the game. We can do that with a new function.</p><pre>addOnePipe: function(x, y) {<br>    // Create a pipe at the position x and y<br>    var pipe = game.add.sprite(x, y, &#39;pipe&#39;);</pre><pre>    // Add the pipe to our previously created group<br>    this.pipes.add(pipe);</pre><pre>    // Enable physics on the pipe <br>    game.physics.arcade.enable(pipe);</pre><pre>    // Add velocity to the pipe to make it move left<br>    pipe.body.velocity.x = -200; </pre><pre>    // Automatically kill the pipe when it&#39;s no longer visible <br>    pipe.checkWorldBounds = true;<br>    pipe.outOfBoundsKill = true;<br>},</pre><p>The previous function creates one pipe, but we need to display 6 pipes in a row with a hole somewhere in the middle. So let’s create a new function that does just that.</p><pre>addRowOfPipes: function() {<br>    // Randomly pick a number between 1 and 5<br>    // This will be the hole position<br>    var hole = Math.floor(Math.random() * 5) + 1;</pre><pre>    // Add the 6 pipes <br>    // With one big hole at position &#39;hole&#39; and &#39;hole + 1&#39;<br>    for (var i = 0; i &lt; 8; i++) {<br>        if (i != hole &amp;&amp; i != hole + 1) {<br>            this.addOnePipe(400, i * 60 + 10);<br>        }<br>    }<br>},</pre><p>Here’s an image to make things more clear, for when hole = 2.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/241/0*r0s9wP0bUcD4Vel8.png" /></figure><p>To actually add pipes in our game we need to call the addRowOfPipes() function every 1.5 seconds. We can do this by adding a timer in the create() function.</p><pre>this.timer = game.time.events.loop(1500, this.addRowOfPipes, this);</pre><p>Now you can save your file and test the code. This is slowly starting to look like a real game.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/397/0*sCXLdUZdR6msWcP0.gif" /></figure><h3>Scoring and Collisions</h3><p>The last thing we need to finish the game is adding a score and handling collisions. And this is quite easy to do.</p><p>We add this in the create() function to display the score in the top left.</p><pre>this.score = 0;<br>this.labelScore = game.add.text(20, 20, &quot;0&quot;, { font: &quot;30px Arial&quot;, fill: &quot;#ffffff&quot; });</pre><p>And we put this in the addRowOfPipes(), to increase the score by 1 each time new pipes are created.</p><pre>this.score += 1;<br>this.labelScore.text = this.score;</pre><p>Next, we add this line in the update() function to call restartGame() each time the bird collides with a pipe from the pipes group.</p><pre>game.physics.arcade.overlap(this.bird, this.pipes, this.restartGame, null, this);</pre><p>And we are done! Congratulations, you now have a Flappy Bird clone in HTML5.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/395/0*nVcBiBM1lpEKYsIu.gif" /></figure><h3>What’s Next?</h3><p>The game is working but it’s a little bit boring. Try to make it better by adding sounds and animations.</p><p><strong>To learn more about game development, make sure to follow me on Twitter: </strong><a href="https://twitter.com/thomaspalef"><strong>@thomaspalef</strong></a><strong>.</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=857fc3ae443c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Come Up With Ideas for Your Games]]></title>
            <link>https://medium.com/@thomaspalef/how-to-come-up-with-ideas-for-your-games-4ea7de801480?source=rss-aca9edabf461------2</link>
            <guid isPermaLink="false">https://medium.com/p/4ea7de801480</guid>
            <category><![CDATA[game-design]]></category>
            <category><![CDATA[game-development]]></category>
            <dc:creator><![CDATA[Thomas Palef]]></dc:creator>
            <pubDate>Fri, 04 Feb 2022 18:54:23 GMT</pubDate>
            <atom:updated>2022-02-04T18:54:23.601Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/610/1*EptczM_B7_JJcp2K_gJ90A.png" /></figure><p>When I was doing my “one game per week” challenge on <a href="https://www.lessmilk.com/">lessmilk.com</a>, the most common question in my inbox was “how do you come up with new interesting ideas every week?” In this article I’ll try to answer that.</p><h3>Use Constraints</h3><p>When you know you want to build something, the next step is to decide what to actually build. However, there are so many possibilities and so many choices to make that it’s hard to pick a specific idea. Because of this, a lot of people keep changing their minds over and over again and then end up with nothing.</p><p>One powerful tool to avoid this trap is to use constraints. With constraints you are artificially getting rid of a lot of ideas, and having less options means that it’s easier to pick one. So instead of focusing on your idea, try to pick constraints that you find interesting.</p><p>Here are the constraints that I used to make most of my games:</p><ul><li>Each game must be made in less than 7 days.</li><li>Each game is using retro graphics that I’ll design myself.</li><li>Each game will follow a theme that I’ll define in advance.</li></ul><p>People might think that having these constraints make my work harder, but it’s actually the opposite.</p><h3>Start Right Away</h3><p>At this point you should have a vague idea of what you want to do, but nothing concrete. So maybe you should start brainstorming to discover the perfect idea? Well, there’s one problem: you probably won’t find the prefect idea out of nowhere.</p><p>Instead of brainstorming, start building your bare idea right away. Do something really simple or get inspired by something similar. Anyhow, since you don’t know exactly what you are building it will probably end up being bad. And that’s okay, you’ll worry about making it interesting later.</p><p>For my platformer game I quickly started coding the most basic elements of the game:</p><ul><li>Loading and displaying a map on the screen.</li><li>Having a character moving in the map.</li><li>Be able to die and finish a level.</li></ul><p>There was no original ideas involved here. The game was pretty bad but I had something to toy with.</p><h3>Keep Iterating</h3><p>Now that you have your bare prototype finished it’s time to make it better. This might be the hardest and longest part in the creation process, but it’s also the most interesting.</p><p>Here’s how it works: have a small idea, build it, test it, improve it, and start again. Some ideas are going to turn out bad, some will need a lot of tweaking, and other will be great. Just keep iterating with new ideas until you have something you like.</p><p>I’ll try to show you this process with one idea that I had for my platformer game:</p><ul><li>Adding coins in the games sounded interesting, so I coded some coins.</li><li>It looked nice, but felt wrong because the coins where actually useless.</li><li>To fix that, I changed the rules of the game: to finish a level you need to collect all the coins.</li><li>It was a lot better, but now I had to rebuild some of the levels to take this change into account.</li></ul><p>Just a small idea like “adding coins” ended up changing my whole game.</p><h3>Conclusion</h3><p>Summary: use constraints, start right away, and keep iterating.</p><p>With this system finding ideas is actually not that hard. It will still require work and imagination, but in the end you should get ideas, and more importantly, have something that you like.</p><p><strong>To learn more about game development, make sure to follow me on Twitter: </strong><a href="https://twitter.com/thomaspalef"><strong>@thomaspalef</strong></a><strong>.</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4ea7de801480" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Use Better Inputs in Your Games]]></title>
            <link>https://medium.com/@thomaspalef/use-better-inputs-in-your-games-5a46a91edaed?source=rss-aca9edabf461------2</link>
            <guid isPermaLink="false">https://medium.com/p/5a46a91edaed</guid>
            <category><![CDATA[game-development]]></category>
            <category><![CDATA[game-design]]></category>
            <dc:creator><![CDATA[Thomas Palef]]></dc:creator>
            <pubDate>Thu, 03 Feb 2022 18:05:57 GMT</pubDate>
            <atom:updated>2022-02-05T15:16:21.183Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Cy3Gg7RTWIWR9xqrZNHesQ.png" /></figure><p>I often play web games in my free time and I noticed something that a lot of games get wrong: the inputs. The way players interact with a game is so important that getting this part wrong might make your game unplayable.</p><p>I listed below 3 simple tips that will help make the interactions between the player and the game a lot smoother. However, keep in mind that there are probably some exceptions to what I say below.</p><h3>Instructions</h3><p>The most basic issue when playing a game is not knowing what to do. When that’s the case players usually start pressing random keys on their keyboards until something happens. If they are lucky it might work, otherwise they will just leave the game.</p><p>That’s why it should always be clearly written which keys the user should use:</p><ul><li>On the title screen, how to start the game?</li><li>Then, how to actually play?</li><li>And finally, how to restart the game?</li></ul><p>When you are building your own game the controls are obvious to you. But they are a complete mystery to the people who will try your game for the first time later on. So make sure to add instructions to help your players.</p><h3>Consistency</h3><p>Sometimes I stumble across games who seem to hate me. Let me describe you how they usually work:</p><ul><li>To start the game I have to press the “enter” key.</li><li>Then I need to use the arrow keys to move.</li><li>And when I die I have to click with my mouse on the restart button.</li></ul><p>Do you see the problem? What’s the point of making my hands move all over the place and forcing me to learn new inputs at each step of the game? In this example everything could have been done with just the arrow keys:</p><ul><li>Press the up arrow key to start the game.</li><li>Use the arrow keys to move.</li><li>Press the up arrow key to restart the game.</li></ul><p>That’s a lot easier to understand, to do, and to remember. So try to use the same keys thorough the whole game for a better experience.</p><h3>Wasd</h3><p>Lastly, a lot of games rely only on the wasd keys to move around. That’s great, except for all the people who don’t use qwerty keyboards. I, for example, use an azerty keyboard (as everyone in France) and all wasd games are unplayable for me. There are hundreds of millions of other people not using qwerty keyboards, don’t forget them.</p><p>There are lots of ways to solve this issue, like letting people set their own game controls. But you can also do something a lot simpler: just add support for the arrow keys. This way people can either use wasd keys or the arrow keys.</p><h3>Summary</h3><ul><li>Add instructions on which keys to use.</li><li>Be consistent with the inputs.</li><li>If you use wasd, also use the arrow keys.</li></ul><p>All these rules are really simple to implement and they will make your games better.</p><p><strong>To learn more about game development, make sure to follow me on Twitter: </strong><a href="https://twitter.com/thomaspalef"><strong>@thomaspalef</strong></a><strong>.</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5a46a91edaed" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Tips to Make Pixel Art for Your Games]]></title>
            <link>https://medium.com/@thomaspalef/tips-to-make-pixel-art-for-your-games-7b770ffcfde3?source=rss-aca9edabf461------2</link>
            <guid isPermaLink="false">https://medium.com/p/7b770ffcfde3</guid>
            <category><![CDATA[game-design]]></category>
            <category><![CDATA[pixel-art]]></category>
            <category><![CDATA[game-development]]></category>
            <dc:creator><![CDATA[Thomas Palef]]></dc:creator>
            <pubDate>Wed, 02 Feb 2022 18:08:31 GMT</pubDate>
            <atom:updated>2022-03-08T22:26:32.215Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/700/1*1sDareMdBC19EtUW7ozmaQ.jpeg" /></figure><p><strong>Important note: I wrote a new and improved version of this article on my own website </strong><a href="https://www.lessmilk.com/pixel-art-tips/"><strong>lessmilk.com/pixel-art-tips/</strong></a></p><p>When creating your own video games, the art is extremely important. And you have only three choices for the design:</p><ul><li>Hire an artist. This is the best option but it will most likely cost money, and indie game developers don’t have a budget.</li><li>Find free art. There are lots of free assets online, but you won’t find exactly what you want so you’ll have to compromise.</li><li>Do the design yourself. Sounds great, but what if you are not good at this? That’s what this tutorial is about.</li></ul><h3>Use Few Colors</h3><p>Colors are hard. When using hexadecimal colors for your game (something like #8E44AD), there are over 16 millions colors to choose from. How do you decide which ones to pick? And if you get just one wrong, everything will look off.</p><p>A simple trick is to use as few colors as possible. For example here’s a <a href="https://www.lessmilk.com/pixel-war-2/">space shooter game</a> I made a few years ago.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/448/0*gKz8m_EtHu0M7Qpm.png" /></figure><p>Here ther are only two colors: white for the sprites, and dark blue for the background. By having a limited number of colors, you can’t go too wrong.</p><h3>Use Basic Shapes</h3><p>Let’s say you want to build a 2D platformer like Super Mario Bros. You’ll need at least 4 sprites for your game: player, enemy, coin, and wall. Each of these elements can be really complex to make: outline, colors, animations, etc.</p><p>But what if you only used basic geonmetric shapes for everything? For example here’s <a href="https://www.lessmilk.com/dark-blue/">a 2D platformer</a> I made.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wr7C35yhbTUVf-SiuG5-ug.png" /></figure><p>Here each sprite is just a rectangle, and it took me less than 2 minutes to create them all.</p><h3>Try Low Resolution</h3><p>When basic shapes are not enough, then you can try pixel art. However doing pixel art is very similar to drawing, and for the majority of people it is tough to draw something that looks great.</p><p>One solution is to use a really low resolution for your sprites. The less pixels available, the less choices you have to make, and the simpler it is to draw. Here’s an example with <a href="https://www.lessmilk.com/the-three-hearts/">an adventure game</a> I made.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/0*IYNcMZTKR8MoI9m0.png" /></figure><p>It’s cute, yet all the sprites are just made of 25 pixles. Here’s a bigger view of the main character.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/194/0*MMaWeCRWOxx_R3qs.png" /></figure><p>Anyone can make a sprite like that.</p><h3>Keep Iterating</h3><p>If a low resolution sprite is not a good fit for your game style, then go for a higher resolution. Your first attempt will probably look bad, and that’s okay. Just keep working on it until it you are happy with it.</p><p>Here’s an example of me creating a little princess for <a href="https://www.lessmilk.com/princess-quest/">an arcade game</a> I made.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/840/0*jamjTIEL_iikedQu.png" /></figure><p>At the beginning it was pretty bad (left), but after a few more iterations the result is quite good (right).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/276/0*S505YP0FN0rNWR-t.png" /></figure><p>There’s no way I could have made this sprite on my first try.</p><h3>Conclusion</h3><p>Try to simplify your design to make your game look good (few colors, basic shapes, low resolutions). And then iterate until you have something you like. With these simple tips anyone can make a great looking game!</p><p><strong>To learn more about game development, make sure to follow me on Twitter: </strong><a href="https://twitter.com/thomaspalef"><strong>@thomaspalef</strong></a><strong>.</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7b770ffcfde3" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Make a Great 2D Platformer]]></title>
            <link>https://medium.com/@thomaspalef/how-to-make-a-great-2d-platformer-379ec6801334?source=rss-aca9edabf461------2</link>
            <guid isPermaLink="false">https://medium.com/p/379ec6801334</guid>
            <category><![CDATA[game-development]]></category>
            <category><![CDATA[game-design]]></category>
            <dc:creator><![CDATA[Thomas Palef]]></dc:creator>
            <pubDate>Tue, 01 Feb 2022 19:44:57 GMT</pubDate>
            <atom:updated>2022-02-01T19:44:57.079Z</atom:updated>
            <content:encoded><![CDATA[<p>Here’s a very basic 2D platformer that is quite boring. You collect the coins on the left and then you die on the red block. In this article we will see how to tweak this game, step by step, to make it better.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/621/0*pUNKfHJ7Iie-uReW.gif" /></figure><h3>Better Player</h3><p>First, let’s focus on the player. For now it’s just a static square, but we can make it better by adding some simple animations. For example: tilt the sprite when moving backward or forward, add an idle animation to look like the square is breathing, and add some dust when he falls on the ground.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/621/0*04wwSjUx25tN2oIX.gif" /></figure><p>The difference is quite subtle, but now the white square seems alive, which makes the game more interesting.</p><h3>Better Coins</h3><p>The yellow coins instantly disappear when they are taken, and this is dull. Let’s change that with a smooth animation where the coins will scale down and move upward very quickly before completely disappearing.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/621/0*TvlcpP4tFvIMFn7r.gif" /></figure><p>As you can see above, it is now much more satisfying to take the coins.</p><h3>Better Death</h3><p>When the player dies by touching the red square, he simply reappears at the top of the screen. That doesn’t really look like “dying” to me. Instead, when the player dies, two things should happen: the player explode with some particle effects, and the screen starts to shake.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/621/0*AsLc0LQAmYGth5vU.gif" /></figure><p>This new death version has more impact, and that makes the game a lot more dynamic and punchy.</p><h3>Conclusion</h3><p>The first version of the game was boring, but the last example above is a lot more interesting. Yet both are actually the same game, except for a few effects that don’t change the gameplay at all. The next step is to create some interesting levels, and this would become a real game.</p><p><strong>To learn more about game development, make sure to follow me on Twitter: </strong><a href="https://twitter.com/thomaspalef"><strong>@thomaspalef</strong></a><strong>.</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=379ec6801334" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Make a Run Cycle in Pixel Art]]></title>
            <link>https://medium.com/@thomaspalef/how-to-make-a-run-cycle-in-pixel-art-e72fb9c0b812?source=rss-aca9edabf461------2</link>
            <guid isPermaLink="false">https://medium.com/p/e72fb9c0b812</guid>
            <category><![CDATA[game-development]]></category>
            <category><![CDATA[pixel-art]]></category>
            <dc:creator><![CDATA[Thomas Palef]]></dc:creator>
            <pubDate>Sun, 30 Jan 2022 16:48:57 GMT</pubDate>
            <atom:updated>2022-01-30T17:19:09.753Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/896/1*8TWm5U0KkuMdhb8ijUaOeQ.gif" /></figure><p>Have you noticed a lot of people copy the 8-bit Mega Man run cycle? That’s because it’s good. You should too for practice!</p><p><em>This tutorial was originally written by </em><a href="https://web.archive.org/web/20200517230121/http://unseven.tumblr.com/"><em>unseven</em></a><em>. The author gave me permission to post it here since it’s no longer available online.</em></p><p>It’s just 4 frames long and still one of the best examples to begin with. Why? Because it relies solely on good key frames, which means you can clearly see all ‘ends’ in the animation loop. Look at those legs and arms, all twisting the torso, stretching out the body!</p><p>In this tutorial we will see how to create this run cycle step by step.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/128/0*gck2ZWAdz0tBdZtQ.gif" /></figure><p>Key frames, that’s where you should start your animation. No matter how long is gonna be your animation, it has to strike one or several good poses. So let’s start with legs, because that’s not only the hardest part of the animation, but one of the things that most influences the rest of the body (tip: the most important part is actually the spine, but we’ll get to that later).</p><p>I’ll cut the theory and go straight for it: think diagonals.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/542/0*bn7kDm8lwsHbkj8o.png" /></figure><p>I like it when it feels very ‘speedy’, hence the exaggeration. A fully-stretched leg, pushing the body forward, while the other is on its maximum knee bent, that’s where one’s body makes all the effort to run. The rest just follow through.</p><p>This is 1 end from our animation. What’s the exact opposite of stretching our legs to moving forward? The other end: steppping. Whereas our previous frame is all personality, this one is quite the timid one. Both knees bent, a bit lower and ‘squarier’.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/256/0*QSGd2pikY0dg0iiA.gif" /></figure><p>Oh, by the way, you’ll have to do the same thing for each leg, but it doesn’t have to be now, specially if you’re gonna add more frames to it later. Anyway, here goes:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/542/0*9K9NKI5N_XcSdyDt.png" /></figure><p>Are you going to add more frames? Good! Let’s add 1 more to each one we already have, so 4 x 2 = 8 frames. That’s an excellent number.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/256/0*6pCg94VMUdin_45a.gif" /></figure><p>Notice that after stretching the leg to its maximum, it goes up a bit, and the knee start to bend, while the other foot prepares for stepping onto the ground.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/256/0*HYT_701CKpfNOGRS.gif" /></figure><p>Both legs start going different directions: stepping foot goes behind, lifting foot, forward.</p><p>Do the same to the other 2 frames, and we get this result:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/256/0*u0FsPlcQWMI9TAlV.gif" /></figure><p>Nice! Let’s add the rest of the body now (remember to keep it a little bent too, since we project our body forward while running):</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/256/0*khXrVQb9zlJTkejg.gif" /></figure><p>Not nice. Let’s start adding some movement, let the whole body talk! The first thing here is to lower the body when each foot steps. The knee bends most by the weight of the falling body from the initial push, getting ready for another one. Got it? Since we have 8 frames, I like to lower 4 of them, having 2 highs, 2 lows, 2 highs, 2 lows. And it’s only a 1 or 2 pixels difference:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/256/0*-IdvfFJQMggmdTxt.gif" /></figure><p>That’s a bit better. Now we’ll add some follow through and overlapping, because not everything happens at the same time. That means keeping the chest (and belly in some cases) intact — because the spine is the most important thing — and moving up and down all the other things a bit like it’s following the chest (shoulders, arms, hands, head, carry-ons etc.) I start with the head, and start small, because the head is what viewers first identify in an animation, and they tend to follow it as a reference, so they don’t get lost. The head is their main show, so don’t go too nuts on it:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/256/0*wckAat-kcsJ2zvmc.gif" /></figure><p>Doing the same with arms and shoulders. Notice that his right arm is not going after the chest but the shoulder. So it’s actually a chain reaction: chest &gt; shoulder &gt; arm. If I had a bigger example (let’s say, a giant enemy), it could be even longer and slower: chest &gt; shoulder &gt; arm &gt; forearm &gt; hand + weapon. Also, since the arm carrying the sword is a bit heavier, it moves more (2 pixels here). Oh, and I’ve already added some basic movement on that yellow fur based on the shoulders:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/256/0*rmhe3hWSir2gxq4r.gif" /></figure><p>OK, remember we also use our arms to run, right? So we can use extra energy and keep balanced while doing it. Let’s get those arms moving back and forth, and since one of them is carrying a sword, this one should move less because it’s heavier, and the other much more to compensate:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/256/0*bBEIkPkeIdKV6h8-.gif" /></figure><p>When the left leg goes forward, the right arm goes forward and vice versa, so we keep balance.</p><p>Lastly, since we also twist our body while doing this right-left exchanges, I usually do an illusion by just also moving shoulders back and forth a bit (the movement extends to arms, too). Bigger sprites might need redrawn chests, but shoulders help a lot on that anyway:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/256/0*Mj1pU-htucMYovWi.gif" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/128/0*5WL6IF3BW64z1Wn1.gif" /></figure><p>And that’s it! You can keep tweaking here and there, like I did with the fur, sword angle and subpixel animation.</p><h3>Some Tips</h3><ul><li>Save all animations files on this tutorial and watch them in slow motion, frame by frame, so you can see what happens between them.</li><li>This could apply for walk cycles. With a little less exaggeration and more frames, you could do it easily. And don’t bend the spine too much.</li><li>Don’t follow this tutorial every time you want to make a run cycle. Start doing what’s best for your process or your character. Don’t use as many frames as I do. Use less. Use more. Start in another frame. Start with spine. Go nuts.</li></ul><p>Good luck!</p><p><strong>To learn more about game development, make sure to follow me on Twitter: </strong><a href="https://twitter.com/thomaspalef"><strong>@thomaspalef</strong></a><strong>.</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e72fb9c0b812" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>