<?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 Craig Oda on Medium]]></title>
        <description><![CDATA[Stories by Craig Oda on Medium]]></description>
        <link>https://medium.com/@craigoda?source=rss-cc169c48d16a------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*GLMAR_9wuYPK25vRvkefQA.png</url>
            <title>Stories by Craig Oda on Medium</title>
            <link>https://medium.com/@craigoda?source=rss-cc169c48d16a------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 24 Nov 2026 13:58:42 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@craigoda/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[Fix Android Emulator Black Screen on Wayland Ubuntu]]></title>
            <link>https://craigoda.medium.com/fix-android-emulator-black-screen-on-wayland-ubuntu-778db86a834c?source=rss-cc169c48d16a------2</link>
            <guid isPermaLink="false">https://medium.com/p/778db86a834c</guid>
            <category><![CDATA[flutter]]></category>
            <category><![CDATA[ubuntu]]></category>
            <category><![CDATA[android]]></category>
            <category><![CDATA[linux]]></category>
            <dc:creator><![CDATA[Craig Oda]]></dc:creator>
            <pubDate>Sun, 14 Aug 2022 01:12:01 GMT</pubDate>
            <atom:updated>2022-08-14T01:12:01.880Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/568/1*YsGoprYio-i-VNFEWY7Iyg.png" /><figcaption>Android emulator problem on Wayland</figcaption></figure><p>I was having problems running an Android Virtual Device on Wayland on Ubuntu 22.04</p><p>The AVD worked on X11, but I wanted to use it on Wayland so that I could experiment with Flutter desktop on Linux Wayland. Using Wayland for both Android and Linux desktop is more convenient.</p><p>I was able to successfully launch an AVD under Wayland with the following command from the bash shell.</p><pre>emulator -avd Pixel_5_API_31 -gpu guest -no-snapshot -wipe-data</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/465/1*ecU-WMfAj2mKrryFbSNYAw.png" /><figcaption>Android emulator working on Wayland</figcaption></figure><p>People can see if their Linux desktop is running Wayland or X11 by checking the XDG_SESSION_TYPE environmental variable.</p><p>echo $XDG_SESSION_TYPE<br> wayland</p><p>I tested Flame and Flutter in the emulator.</p><pre>flutter run -d emulator-5554 — enable-software-rendering</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/431/1*3er0nI6m-cUtQ1qcuN2Hwg.gif" /><figcaption>Flutter and Flame working on Wayland in Android Emulator</figcaption></figure><p>Here’s some additional information on my AVD. I do not have Google Play services enabled in this AVD.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/519/1*wvj__8wPcXfqkldtXFjzvQ.png" /><figcaption>AVD with no Google Play services and Software GLES 2.0</figcaption></figure><p>I used an AVD without Google Play after I read online that there may be problems with software rendering when Google Play services are included in the AVD.</p><p>Flutter apps work reasonably well in the emulator with 360 video captured from the RICOH THETA X, but performance is better on a physical Pixel 2 phone.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/431/1*Y9244qlX8DYPIBCuTwOEEw.gif" /><figcaption>Android AVD on Ubuntu Wayland playing a 360 video with Flutter</figcaption></figure><h3>Summary</h3><p>The AVD on Wayland looks very usable for Flame game apps, which is how I’m using the AVD on my <a href="https://www.youtube.com/craigoda">YouTube channel</a>. For more complex graphics such as 360 video at 4K and 8K, it’s better to use a physical phone.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=778db86a834c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Box2D Physics for Flutter]]></title>
            <link>https://craigoda.medium.com/box2d-physics-for-flutter-51b12040155d?source=rss-cc169c48d16a------2</link>
            <guid isPermaLink="false">https://medium.com/p/51b12040155d</guid>
            <category><![CDATA[flame]]></category>
            <category><![CDATA[flutter]]></category>
            <category><![CDATA[game-development]]></category>
            <category><![CDATA[box2d]]></category>
            <dc:creator><![CDATA[Craig Oda]]></dc:creator>
            <pubDate>Sun, 03 Jul 2022 14:32:22 GMT</pubDate>
            <atom:updated>2022-07-03T14:32:22.497Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Qswae_alwuOfh5VbayXXLg.gif" /><figcaption>Flutter game with Box2D physics using Forge2D</figcaption></figure><p>Box2D is a famous physics engine for games. It is used in Crayon Physics Deluxe, Limbo, Rolando, Incredibots, Angry Birds, Tiny Wings, Shovel Knight, Transformice, Happy Wheels and many more games.</p><p>The three tutorials below in the free playlist <a href="https://youtube.com/playlist?list=PLxvyAnoL-vu5DEGmFt1CpL6zDXX5dmf5r">Forge2D — Flame 1.2</a> will walk you through using the Dart port of Box2D, called Forge2D,with your next Flutter game.</p><h3>01. Box2D Game Physics for Flutter</h3><ul><li>installing Flutter packages needed to use Box2D</li><li>start with a completely blank editor screen and build up from zero code</li><li>introduces primary concepts of body, world, fixture as well as parameters such as gravity, friction, restitution, and density</li></ul><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FEzyJd-DvW58%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DEzyJd-DvW58&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FEzyJd-DvW58%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/8408e9dffe28bc281e776f5415d74bc8/href">https://medium.com/media/8408e9dffe28bc281e776f5415d74bc8/href</a></iframe><h3>02. Flutter Sprites and Box2D Physics</h3><p>Explains how to attach sprites to the Box2D bodies using the flame_forge2d BodyComponent.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2Fs9KRmHze3ho%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3Ds9KRmHze3ho&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2Fs9KRmHze3ho%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/0c1a2474969209673793cacbd9bdc02f/href">https://medium.com/media/0c1a2474969209673793cacbd9bdc02f/href</a></iframe><h3>03. Flutter Box2D Towers with Flame</h3><p>Create and knock down small towers made from stacked barrels and crates.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FIibXv7V-i-k%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DIibXv7V-i-k&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FIibXv7V-i-k%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/3c6de477c3a11c2a4d8d96bcd53f8c00/href">https://medium.com/media/3c6de477c3a11c2a4d8d96bcd53f8c00/href</a></iframe><h3>Different Game Plots</h3><p>Code Baker One is building a plot based on dinosaurs using fan art from <a href="https://play.google.com/store/apps/details?id=com.super_toki.giraffe&amp;hl=en_US&amp;gl=US">Like a Dino!</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/662/1*s-9jydV9jL-VSycgtLl1HA.gif" /><figcaption>Dinosaur concept for Flutter game. Graphics are from “Like a Dino!” game by super_toki</figcaption></figure><p>The <a href="https://youtube.com/playlist?list=PLxvyAnoL-vu5DEGmFt1CpL6zDXX5dmf5r">free playlist</a> has the full code for the tutorial as well as a step-by-step walkthrough.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=51b12040155d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Flame Game Device Orientation and Resolution]]></title>
            <link>https://medium.com/codecakes/flame-game-device-orientation-and-resolution-2ada9daebef5?source=rss-cc169c48d16a------2</link>
            <guid isPermaLink="false">https://medium.com/p/2ada9daebef5</guid>
            <category><![CDATA[flutter]]></category>
            <category><![CDATA[flame]]></category>
            <category><![CDATA[game-development]]></category>
            <dc:creator><![CDATA[Craig Oda]]></dc:creator>
            <pubDate>Wed, 01 Jun 2022 05:52:53 GMT</pubDate>
            <atom:updated>2022-06-01T05:52:53.792Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UC7d0j7_0Rsu_srUMCtG4w.png" /><figcaption>incorrect resolution and orientation on Pixel 4a</figcaption></figure><p>Flutter works on desktop, web and mobile. It’s difficult to test the orientation and resolution on all device types. Fortunately, there are many pre-built solutions that will automatically configure your game for you.</p><p>Flame.device.setLandscape() will force the game to display in landscape mode.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lFdSGCbVmKPk69u8T17aAg.png" /></figure><p>This will put the device in landscape mode, but the resolution is wrong and there are mobile phone overlay icons on the screen for time, Wi-Fi, battery and other information.</p><p>To get rid of the default overlay, use Flame.device.fullScreen().</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-MXOqG9pQOH2MtFLbolfFQ.png" /></figure><p>Now, the game screen does not have the mobile phone icons, but the resolution is still wrong.</p><p>Prior to fixing the resolution problem, let’s take a look at the code for the orientation and full-screen methods. Above the Flutter runApp() method, run the Flame.device.* methods. Prior to setting the device settings, run WidgetsFlutterBinding.ensureInitialized().</p><pre>void main() {</pre><pre>print(&#39;setup game orientation&#39;);</pre><pre>WidgetsFlutterBinding.ensureInitialized();</pre><pre>Flame.device.fullScreen();</pre><pre>Flame.device.setLandscape();</pre><pre>print(&#39;1. load the GameWidget with runApp&#39;);</pre><pre>runApp(GameWidget(game: ChickenGame()));</pre><pre>}</pre><p>To set the proper game resolution, add this line to the game onLoad() method.</p><pre>camera.viewport = FixedResolutionViewport(Vector2(1280, mapHeight));</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JCXLdNLgJoVIEar7kN4i4Q.png" /></figure><p>You should now have the proper resolution on both mobile and desktop.</p><h3>Free Game Tutorial Series</h3><p>The Charlie Chicken tutorial series will be covered in this free playlist on YouTube.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2Fvideoseries%3Flist%3DPLxvyAnoL-vu4H9YM8on7AKNRMOsTOdIle&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fplaylist%3Flist%3DPLxvyAnoL-vu4H9YM8on7AKNRMOsTOdIle&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2Fk0EbDFZSqME%2Fhqdefault.jpg%3Fsqp%3D-oaymwEWCKgBEF5IWvKriqkDCQgBFQAAiEIYAQ%3D%3D%26rs%3DAOn4CLA2nWj4bDeixfvqHfb63015UFd64Q%26days_since_epoch%3D19144&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="853" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/9c18387f2c7e0209e7ef17382e805b57/href">https://medium.com/media/9c18387f2c7e0209e7ef17382e805b57/href</a></iframe><p>In addition to the viewport and resolution configuration, the series includes tutorials on:</p><ul><li>free game editor Tiled from mapeditor.org</li><li>free sprites and tile sheets from artist Frog Pixel on itch.io</li><li>virtual joystick controller from the Flame package with variable speed of Charlie</li><li>display of Tiled map files in Flame</li><li>world bounds detection</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2ada9daebef5" width="1" height="1" alt=""><hr><p><a href="https://medium.com/codecakes/flame-game-device-orientation-and-resolution-2ada9daebef5">Flame Game Device Orientation and Resolution</a> was originally published in <a href="https://medium.com/codecakes">CodeCakes</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Git commit, amend, push and — force-with-lease]]></title>
            <link>https://craigoda.medium.com/git-commit-amend-push-and-force-with-lease-b525937d5ded?source=rss-cc169c48d16a------2</link>
            <guid isPermaLink="false">https://medium.com/p/b525937d5ded</guid>
            <category><![CDATA[github]]></category>
            <category><![CDATA[git]]></category>
            <dc:creator><![CDATA[Craig Oda]]></dc:creator>
            <pubDate>Mon, 30 May 2022 14:26:00 GMT</pubDate>
            <atom:updated>2022-05-31T21:08:33.003Z</atom:updated>
            <content:encoded><![CDATA[<h3>Git commit, amend, push and — force-with-lease</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/428/1*vvqYlZb9DgUx-BIdKT7-BA.png" /></figure><p>There are two types of commits. The first type is the commit you make locally on your laptop with VS Code. The second type of commit is the one you push up to GitHub.</p><p>There are a plethora of variations for these two types of commits.</p><p>For example, in the case you’ve pushed the commit to GitHub, there is a big difference if there are multiple people working on the same branch or if you are the only person working on the branch.</p><p>Let’s say that there are three people working on the branch main. If you commit your code to main and then someone else uses your code, you should not amend your commit. The only way to ensure that no one else uses your code prior to making an amend to your commit is to not amend your public commit.</p><p>However, if you’re the only person working on your branch, then it is safe to amend your commit.</p><h3>commit — amend</h3><p>Prior to pushing a commit to GitHub, it’s straightforward to use git commit --amend to add additional code to a local commit.</p><p>With this technique, it’s easier to justify spending more time on a commit message and breaking the commit message up over multiple lines.</p><p>It’s possible that over the summer, we may even move to using a subset of <a href="https://www.conventionalcommits.org/en/v1.0.0/">Conventional Commits</a> in an attempt to standardize on commit messages.</p><p>Problems start occurring when the commit is already pushed to GitHub and I want to amend a commit that I already pushed up.</p><h3>push — force-with-lease</h3><p>One way to handle this is to use git push --force-with-lease to overwrite the last commit.</p><p>Additional information is available <a href="https://git-scm.com/docs/git-push#Documentation/git-push.txt---no-force-with-lease">here</a>.</p><h3>status, log</h3><p>There are several other simple commands to help with git commits. Using git status, you can see what files have been modified and not staged.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/877/1*1DFeaM2oqnQWhJBWDOZ4TQ.png" /></figure><p>git log will show a summary of recent commits.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/778/1*tGHKFmTkbw6ZhOCfcpfeVA.png" /></figure><p>After adding the file, git status will show the file as modified and in green.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/792/1*Py5PiVTeP2o5GZ-AJ_zuPA.png" /></figure><p>I’m still learning what to put into the commit messages. I may need to start using a CHANGELOG.md file. Using git commit with no -m, you can use an editor for the commit message.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/732/1*ji47CSrxPwndZSXsvtQEjA.png" /></figure><p>There is no formatting on the commit message on GitHub.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/535/1*PXcP1uZPG7hVommqjOxjsw.png" /></figure><p>Publish new branch on GitHub that only you work on. The name of the branch could include your name.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/823/1*2LvVanJFZUdbE-QGA_KFJA.png" /></figure><h3>Example commit</h3><pre>git commit -m &quot;added map from tiled&quot;<br>[6_tiled 4b02089] added map from tiled<br> 9 files changed, 115 insertions(+), 9 deletions(-)<br> create mode 100644 .metadata<br> create mode 100644 assets/images/world/Blue.png<br> create mode 100644 assets/images/world/Dust Particle.png<br> create mode 100644 assets/images/world/fruit/pineapple.png<br> create mode 100644 assets/images/world/terrain_16x16.png<br> create mode 100644 assets/tiles/level_1.tmx</pre><p>push to branch 6_tiled on GitHub</p><pre>git push -u origin 6_tiled<br>Enumerating objects: 24, done.<br>Counting objects: 100% (24/24), done.<br>Delta compression using up to 12 threads<br>Compressing objects: 100% (14/14), done.<br>Writing objects: 100% (17/17), 13.11 KiB | 4.37 MiB/s, done.<br>Total 17 (delta 4), reused 0 (delta 0), pack-reused 0<br>remote: Resolving deltas: 100% (4/4), completed with 4 local objects.<br>To github.com:codetricity/charlie_chicken.git<br>   87363c9..4b02089  6_tiled -&gt; 6_tiled<br>Branch &#39;6_tiled&#39; set up to track remote branch &#39;6_tiled&#39; from &#39;origin&#39;.</pre><h3>Example Branch and Pull Request</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/687/1*ctHKJXQ_ED0U_sVwfrsP2Q.png" /><figcaption>If you have access to the repo, branch it and then push up your completed changes to the branch</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Q9Hr-TDtSg-Cyvhs7tKlig.png" /><figcaption>First push up a separate branch to GitHub, then create a pull request</figcaption></figure><h3>using branches more effectively</h3><p>Although using push — force-with-leasewill work, it likely won’t work in the long-term if there are multiple people committing to the same branch. For example, everyone is committing to main.</p><p>From what I can tell, on a small code base, a human manager needs to assign an appropriate set of tasks to another team member and then the team member needs to create a branch that is later merged into the main branch.</p><p>Unfortunately, due to our limited experience managing human task assignment, we’ve often encountered merge conflicts. Sadly, people end up committing to the main branch frequently to avoid conflicts.</p><p>I know there’s a better way, but it will take more work.</p><h3>next steps</h3><p>I hope that better commit messages and organization will help us see what the other team members are doing. Ultimately, it may help with task assignment.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b525937d5ded" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Flutter Games with Flame Overlays]]></title>
            <link>https://medium.com/codecakes/flutter-games-with-flame-overlays-d0caae3a0f57?source=rss-cc169c48d16a------2</link>
            <guid isPermaLink="false">https://medium.com/p/d0caae3a0f57</guid>
            <category><![CDATA[flutter-game]]></category>
            <category><![CDATA[flame]]></category>
            <category><![CDATA[flutter]]></category>
            <dc:creator><![CDATA[Craig Oda]]></dc:creator>
            <pubDate>Mon, 16 May 2022 15:31:33 GMT</pubDate>
            <atom:updated>2022-05-16T15:31:33.085Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/664/1*jRpReiN8NpoVzNDs-CSuBg.png" /><figcaption>Flutter game with Flame framework using Flutter Text Widget Overlay</figcaption></figure><p>The beauty of using Flame to build Flutter games is in the ability to combine pixel-level freedom to build any movement you want with the wonderful Flutter widgets and development process.</p><p>In the example above, the GAME OVER and MAGIC text are standard Flutter Text widgets with the Flutter TextStyle syntax for color, size, and font family.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/446/1*QrhP5hHR7Pm77pZH_BbMfg.png" /><figcaption>Game Over text from a Flutter Text widget inside of VS Code</figcaption></figure><p>The gems are SpriteComponents from the Flame game framework.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/315/1*Kzjo5Z_rsLApdIpDx8caiA.png" /><figcaption>Graphics for Gems used in SpriteComponents</figcaption></figure><p>When the player Leena collides with a gem, the MAGIC score is increased.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/772/1*6n9XEfl4GF3zO9HCSceNgg.png" /><figcaption>Leena about to pick up a magic gem</figcaption></figure><p>In the onCollision method of the Gem SpriteComponent, the integer value for MAGIC moves from 0 to 1. This is handled by magicLevel += 1 inside of the Flame game. As we’re passing the entire game to the Flutter widget tree, the Flutter Text widget can access the variable with game.magicLevel.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/609/1*umti91CP8R6Y8cgLTJSueQ.png" /><figcaption>Flutter Text widget incremented after collision with gem</figcaption></figure><p>Let’s take a closer look at how the game object with the variables such as magicLevel is passed to the Flutter widget tree.</p><h3>Communication Between the Game and Flutter Widgets</h3><p>You can communicate between the Flutter widgets such as a button or a piece of text for a score and the game variables with many techniques. The easiest technique is to hold the state of a variable such as <em>score</em> or <em>timer</em> inside of the game and then pass the entire game state over to the Flutter widget tree.</p><p>For example, I collect magic points every time I get a gem. I want to display the magic level on my game screen.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/540/1*KnMZVBHPRB0faJ0qpTUubQ.png" /><figcaption>magicLevel is a Flutter Text widget</figcaption></figure><pre>class LeenaGame extends FlameGame {<br><br>  int magicLevel = 0;</pre><p>To get the instantiated object of LeenaGame() over to the Flutter widget, I’m using a the overlayBuilderMap property that is part of the Flame GameWidget class. This is the overlay syntax.</p><pre>void main() {<br>  runApp(<br>    MaterialApp(<br>      home: Scaffold(<br>        body: GameWidget(<br>          game: LeenaGame(),<br>          overlayBuilderMap: {<br>            &#39;DashboardOverlay&#39;: (BuildContext context, LeenaGame game) {<br>              return Dashboard(<br>                game: game,<br>              );<br>            }<br>          },<br>        ),<br>      ),<br>    ),<br>  );<br>}</pre><h3>overlayBuilderMap</h3><p>Normally, the Flame GameWidget is the main widget passed to Flutter runApp. The GameWidget from Flame also accepts a parameter, overlayBuilderMap. To the right of the colon, you specify a Dart map in the form key:value. The key is a human-readable key that makes it easy for the programmer to remember. In the example above, the key is DashboardOverlay. This is a name I made up for my dashboard. It is not a keyword in the Flame overlay system.</p><p>To the right of the key is the value, which is a function that runs when the GameWidget() runs. In the example above, the function returns the Flutter widget Dashboard that I created.</p><h3>Flutter Game Dashboard</h3><p>The Dashboard is a Flutter StatelessWidget. You can put any type of Flutter widget in this dashboard.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/771/1*u6gS_fTTUfEkHXsfn128cg.png" /><figcaption>Flutter widget dashboard in the Flame overlay system</figcaption></figure><h3>Notify Flutter Dashboard of Changes</h3><p>In my example, the dashboard is a StatelessWidget. It will not update unless you tell it to update. The Dashboard is updated when the game notifies the listener for the Flutter widgets. In the example below, the magic gem has a method from Flame called, onCollision. At the time of collision, the magicLevel is increased by 1. To change the new score on the Flutter Text widget, you notify the overlay of the change and then the Flutter widget rebuilds.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/667/1*Ib1U7zxgNZi4NPJd8ljanw.png" /><figcaption>notifyListeners() within the Gem class</figcaption></figure><h3>Additional Step-by-Step Tutorials</h3><p>These videos will give you a more detailed, step-by-step overview, of the Flutter overlay system for Flame games.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FufyKDrpcnt0%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DufyKDrpcnt0&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FufyKDrpcnt0%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/256999452bfbf88501bd4f82e0cddac5/href">https://medium.com/media/256999452bfbf88501bd4f82e0cddac5/href</a></iframe><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FJSYh_hUmssg%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DJSYh_hUmssg&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FJSYh_hUmssg%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/7d93b60394093af4f5b8048d6ff4d697/href">https://medium.com/media/7d93b60394093af4f5b8048d6ff4d697/href</a></iframe><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2F0EuEdJBZiZM%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D0EuEdJBZiZM&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2F0EuEdJBZiZM%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/3a7e6eeaf4bbe483e0cf2292c772999f/href">https://medium.com/media/3a7e6eeaf4bbe483e0cf2292c772999f/href</a></iframe><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FdtQy4bg-cxw%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DdtQy4bg-cxw&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FdtQy4bg-cxw%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/2f1d7c9f293d9ea50fa136a7ebf3cc21/href">https://medium.com/media/2f1d7c9f293d9ea50fa136a7ebf3cc21/href</a></iframe><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FGpwslDd5lyo%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DGpwslDd5lyo&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FGpwslDd5lyo%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/bed09593fb635d8566b82855bde62374/href">https://medium.com/media/bed09593fb635d8566b82855bde62374/href</a></iframe><h3>26 Video Flame Tutorial Series to Build Flutter Platformer Game</h3><p>A free 26 video tutorial series on using Flame 1.1.1 is available below. In addition to Flutter overlays on Flame games, the tutorial series covers animation, character velocity, and collision. The collision syntax was recently updated in Flame 1.1.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2Fvideoseries%3Flist%3DPLxvyAnoL-vu61SszbB5ecb0mV1ppwAIIL&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fplaylist%3Flist%3DPLxvyAnoL-vu61SszbB5ecb0mV1ppwAIIL&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="853" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/1325610b1a2bdc35f80d628e873ec6f7/href">https://medium.com/media/1325610b1a2bdc35f80d628e873ec6f7/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d0caae3a0f57" width="1" height="1" alt=""><hr><p><a href="https://medium.com/codecakes/flutter-games-with-flame-overlays-d0caae3a0f57">Flutter Games with Flame Overlays</a> was originally published in <a href="https://medium.com/codecakes">CodeCakes</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Beginner Guide to Free Tiled Map Editor]]></title>
            <link>https://medium.com/codecakes/beginner-guide-to-free-tiled-map-editor-38bacd7dcbae?source=rss-cc169c48d16a------2</link>
            <guid isPermaLink="false">https://medium.com/p/38bacd7dcbae</guid>
            <category><![CDATA[game-development]]></category>
            <category><![CDATA[tiled]]></category>
            <category><![CDATA[flutter]]></category>
            <dc:creator><![CDATA[Craig Oda]]></dc:creator>
            <pubDate>Mon, 25 Apr 2022 18:53:06 GMT</pubDate>
            <atom:updated>2022-04-25T18:53:06.465Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/811/0*yy9g3P6qU5i3TlRf.png" /></figure><p><a href="https://www.mapeditor.org/">Tiled </a>is a free map editor game developers use to produce scenes and levels in mobile app and web games. The basics are covered in the video below.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FTHGMLWywrRw%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DTHGMLWywrRw&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FTHGMLWywrRw%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/70bf362f24b5e547bf5b9d55b344182a/href">https://medium.com/media/70bf362f24b5e547bf5b9d55b344182a/href</a></iframe><p>Maps are created by importing tilesets. Each tile is then painted onto the map.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/583/1*zzVmYDv5Am-b1YyLw9-OSA.png" /></figure><p>The open source package<a href="https://github.com/flame-engine/flame/tree/main/packages/flame_tiled"> flame_tiled </a>then imports the tiles and data files into your Flame game.</p><pre>homeMap = await TiledComponent.load(&#39;map2.tmx&#39;, Vector2.all(32));<br>add(homeMap);</pre><p>In the example above, map2.tmx is the data file for the map that Tiled creates for Flame.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/578/1*YDfQbNqzyQSXmuLRSIPJfg.png" /><figcaption>Tiled stamp, edit, bucket fill tools</figcaption></figure><p>The primary tools to use in the Tiled map editor are:</p><ol><li>stamp</li><li>bucket fill</li><li>eraser</li></ol><p>In the example below, I am using the stamp tool to place a full map into my game.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/805/1*n42P9V3IPW6yerFGRmivpQ.png" /><figcaption>Tiled stamp tool to paste an entire map into the game scene</figcaption></figure><p>The raw material to create the maps are organized in tilesets. In the example below, I’ve called my tileset <em>background</em>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/225/1*rDLlPWRmaXpJZswDjWxpqg.png" /></figure><p>Normally, you do not have to edit the data file by hand. It is created for you automatically by the wonderful Tiled editor. The map file can be edited and parsed by hand, but it is easier to use the Tiled tool for map creation and flame_tiled for map import.</p><pre>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;</pre><pre>&lt;map version=&quot;1.8&quot; tiledversion=&quot;1.8.4&quot; orientation=&quot;orthogonal&quot; renderorder=&quot;right-down&quot; width=&quot;100&quot; height=&quot;20&quot; tilewidth=&quot;32&quot; tileheight=&quot;32&quot; infinite=&quot;0&quot; nextlayerid=&quot;4&quot; nextobjectid=&quot;12&quot;&gt;</pre><pre>&lt;tileset firstgid=&quot;1&quot; name=&quot;background&quot; tilewidth=&quot;32&quot; tileheight=&quot;32&quot; tilecount=&quot;713&quot; columns=&quot;31&quot;&gt;</pre><pre>&lt;image source=&quot;../images/background.png&quot; width=&quot;1000&quot; height=&quot;750&quot;/&gt;</pre><pre>&lt;/tileset&gt;</pre><pre>&lt;tileset firstgid=&quot;714&quot; name=&quot;ground_tiles&quot; tilewidth=&quot;32&quot; tileheight=&quot;32&quot; tilecount=&quot;18&quot; columns=&quot;0&quot;&gt;</pre><pre>&lt;grid orientation=&quot;orthogonal&quot; width=&quot;1&quot; height=&quot;1&quot;/&gt;</pre><pre>&lt;tile id=&quot;0&quot;&gt;</pre><pre>&lt;image width=&quot;32&quot; height=&quot;32&quot; source=&quot;../images/ground_tiles/1.png&quot;/&gt;</pre><pre>&lt;/tile&gt;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/558/1*gGn7xloRKVPIX9BEadQ6vQ.gif" /><figcaption>flame_tiled with with map import</figcaption></figure><p>There are two types of map layers that the tutorial series focuses on:</p><ol><li>tiles</li><li>objects</li></ol><p>Tiles do not have collision and are for visual cues in game play.</p><p>Objects can have collision and are used for the ground platform in the tutorial.</p><p>The full series of Flutter mobile app platform game development with Flutter is available in the playlist below.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2Fvideoseries%3Flist%3DPLxvyAnoL-vu61SszbB5ecb0mV1ppwAIIL&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fplaylist%3Flist%3DPLxvyAnoL-vu61SszbB5ecb0mV1ppwAIIL&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="853" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/1325610b1a2bdc35f80d628e873ec6f7/href">https://medium.com/media/1325610b1a2bdc35f80d628e873ec6f7/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=38bacd7dcbae" width="1" height="1" alt=""><hr><p><a href="https://medium.com/codecakes/beginner-guide-to-free-tiled-map-editor-38bacd7dcbae">Beginner Guide to Free Tiled Map Editor</a> was originally published in <a href="https://medium.com/codecakes">CodeCakes</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Velocity and Gravity in Flutter Games with Flame]]></title>
            <link>https://medium.com/codecakes/velocity-and-gravity-in-flutter-games-with-flame-4df1651c05b4?source=rss-cc169c48d16a------2</link>
            <guid isPermaLink="false">https://medium.com/p/4df1651c05b4</guid>
            <category><![CDATA[mobile-game-development]]></category>
            <category><![CDATA[flutter]]></category>
            <dc:creator><![CDATA[Craig Oda]]></dc:creator>
            <pubDate>Sun, 24 Apr 2022 15:34:25 GMT</pubDate>
            <atom:updated>2022-04-24T15:35:34.350Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/558/1*7a_wFZcKByFCkpJ3wnry6w.gif" /><figcaption>Flutter games with Flame 1.1.1</figcaption></figure><p><a href="https://youtube.com/playlist?list=PLxvyAnoL-vu61SszbB5ecb0mV1ppwAIIL">Leena is a new Flame beginner developer series</a> that uses velocity, gravity, and friction to simulate the motions of a girl skateboarder.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FhwQpBuZoV9s%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DhwQpBuZoV9s&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FhwQpBuZoV9s%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/5f628c5feb02fb85417ae508ac7e5dde/href">https://medium.com/media/5f628c5feb02fb85417ae508ac7e5dde/href</a></iframe><p>leena.position += velocity * dt;</p><p>The position of the sprite character Leena is a vector with force in the X and Y space. The game is limited to 2D movements. Velocity is also a vector. The dt is the time difference between frames. In Flame, the difference is usually 1/60th of a second as the engine normally runs at 60fps.</p><p>velocity.y += gravity;</p><p>Gravity is a double, or floating point, number. The left-top of the game screen is 0, 0.</p><p>Adding a value to the Y axis makes the character move down.</p><p>Gravity is applied to velocity 60 times per second inside of a loop system built into Flame. The primary loop is called, update.</p><p>To simplify motion, focus on the Y axis first. In the code snippet, the size[1] is the height of the mobile app screen. As long as the player is above the bottom of the screen, the position is changed by velocity * time.</p><pre>@override<br>  void update(double dt) {<br>    super.update(dt);<br><br>    if (leena.y &lt; size[1] - leena.height) {<br>      velocity.y += gravity;<br>      leena.position.y += velocity.y * dt;<br>    }<br>  }</pre><p>I have a hundred free videos on learning basic programming by having fun building mobile app games with Flame.</p><p><a href="https://www.youtube.com/craigoda">Craig Oda</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4df1651c05b4" width="1" height="1" alt=""><hr><p><a href="https://medium.com/codecakes/velocity-and-gravity-in-flutter-games-with-flame-4df1651c05b4">Velocity and Gravity in Flutter Games with Flame</a> was originally published in <a href="https://medium.com/codecakes">CodeCakes</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Flutter Game Lessons in 2022]]></title>
            <link>https://medium.com/codecakes/flutter-game-lessons-in-2022-7f3dd8f5d03?source=rss-cc169c48d16a------2</link>
            <guid isPermaLink="false">https://medium.com/p/7f3dd8f5d03</guid>
            <category><![CDATA[mobile-app-development]]></category>
            <category><![CDATA[game-development]]></category>
            <category><![CDATA[flame]]></category>
            <category><![CDATA[flutter]]></category>
            <dc:creator><![CDATA[Craig Oda]]></dc:creator>
            <pubDate>Tue, 15 Mar 2022 15:28:30 GMT</pubDate>
            <atom:updated>2022-03-15T15:28:30.880Z</atom:updated>
            <content:encoded><![CDATA[<p>Flame 1.0 enabled easy game development on Flutter. The community is booming. I’ve produced 49 <a href="https://youtube.com/playlist?list=PLxvyAnoL-vu6WtCSTlNXaJLx0Pgscq4-D">tutorial videos in 2022 on Flame 1.0</a> to help the growing community. Flame is a minimalistic game engine with a lot of power and flexibility.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/864/1*294QV4EYUGmLx5ocVnL3Jg.png" /></figure><p>A story of Keiko and Ken in old Japan unfolds in 11 videos.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FlrWOviJrWUs%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DlrWOviJrWUs&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FlrWOviJrWUs%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/9d8c11c74d915220362abcb704c12365/href">https://medium.com/media/9d8c11c74d915220362abcb704c12365/href</a></iframe><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2Fgwgu4CsB7Mg%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3Dgwgu4CsB7Mg&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2Fgwgu4CsB7Mg%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/29e6922ab6f2e5b670d96a479bc7da95/href">https://medium.com/media/29e6922ab6f2e5b670d96a479bc7da95/href</a></iframe><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FhQy5zJ4n-pQ%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DhQy5zJ4n-pQ&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FhQy5zJ4n-pQ%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/6a0d27ad754acb5b0d2e59f5466a9fe0/href">https://medium.com/media/6a0d27ad754acb5b0d2e59f5466a9fe0/href</a></iframe><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FZWlqEwGc8U8%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DZWlqEwGc8U8&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FZWlqEwGc8U8%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/2d2581bf1c5042a7a9a60de09462d5ab/href">https://medium.com/media/2d2581bf1c5042a7a9a60de09462d5ab/href</a></iframe><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2F6zug1v58tGE%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D6zug1v58tGE&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2F6zug1v58tGE%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/a4d2636ad35be1cc9f997151489d0930/href">https://medium.com/media/a4d2636ad35be1cc9f997151489d0930/href</a></iframe><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FkIIwnL9n0Qg%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DkIIwnL9n0Qg&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FkIIwnL9n0Qg%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/dc4ab92b322e9e892fcec862e78a206a/href">https://medium.com/media/dc4ab92b322e9e892fcec862e78a206a/href</a></iframe><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2F8cqkmgvhHdw%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D8cqkmgvhHdw&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2F8cqkmgvhHdw%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/58080c4748ba29f96ee5ef32b6efc1a4/href">https://medium.com/media/58080c4748ba29f96ee5ef32b6efc1a4/href</a></iframe><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2Fd3ErFDxhanM%3Flist%3DPLxvyAnoL-vu6WtCSTlNXaJLx0Pgscq4-D&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3Dd3ErFDxhanM&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2Fd3ErFDxhanM%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/607779ed4d1d6531a6377f852fac0442/href">https://medium.com/media/607779ed4d1d6531a6377f852fac0442/href</a></iframe><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FfIqXbYAb9o8%3Flist%3DPLxvyAnoL-vu6WtCSTlNXaJLx0Pgscq4-D&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DfIqXbYAb9o8&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FfIqXbYAb9o8%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/3abe47f7785f0154ec3d51a00862d915/href">https://medium.com/media/3abe47f7785f0154ec3d51a00862d915/href</a></iframe><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FlwKP41KYqng%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DlwKP41KYqng&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FlwKP41KYqng%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/5d0d3a68659e2adf0ba3f9f11fde16a1/href">https://medium.com/media/5d0d3a68659e2adf0ba3f9f11fde16a1/href</a></iframe><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FcMwagcPRi0c%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DcMwagcPRi0c&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FcMwagcPRi0c%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/9815c301ff4c2563a4d292adb67204f8/href">https://medium.com/media/9815c301ff4c2563a4d292adb67204f8/href</a></iframe><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FlwKP41KYqng%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DlwKP41KYqng&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FlwKP41KYqng%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/5d0d3a68659e2adf0ba3f9f11fde16a1/href">https://medium.com/media/5d0d3a68659e2adf0ba3f9f11fde16a1/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7f3dd8f5d03" width="1" height="1" alt=""><hr><p><a href="https://medium.com/codecakes/flutter-game-lessons-in-2022-7f3dd8f5d03">Flutter Game Lessons in 2022</a> was originally published in <a href="https://medium.com/codecakes">CodeCakes</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Ubuntu and Wayland with OBS and Screen Capture]]></title>
            <link>https://craigoda.medium.com/ubuntu-and-wayland-with-obs-and-screen-capture-6913feff58c6?source=rss-cc169c48d16a------2</link>
            <guid isPermaLink="false">https://medium.com/p/6913feff58c6</guid>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[wayland]]></category>
            <dc:creator><![CDATA[Craig Oda]]></dc:creator>
            <pubDate>Sat, 05 Feb 2022 18:15:04 GMT</pubDate>
            <atom:updated>2022-02-05T18:15:04.026Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*u7R4Ue6KovnAsDYFxHfkzg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/422/1*ZLhgU29sFzqICKEwfVDdAw.png" /></figure><p>To get video capture working with OBS, I’m running OBS 27.1.3 with Screen Capture Pipewire. It must use PipeWire.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/513/1*Vrn6A36nh7cYXKt0Bfj1rw.png" /></figure><p>I’m running pipewire 0.3.45, which is a newer version than ships with Ubuntu 21.10.</p><p>pipewire — version<br>pipewire<br>Compiled with libpipewire 0.3.45<br>Linked with libpipewire 0.3.45</p><p>To get the newer version of pipewire, I added the pipewire-debian ppa to my system.</p><pre>sudo add-apt-repository ppa:pipewire-debian/pipewire-upstream</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/735/1*4yRxgsajdXaQu0FWXn4maQ.png" /></figure><p>I’m using Kooha version 2.0.1 installed from flatpak for the shorter screen video to gif videos.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/315/1*aHLFcbEJ1bKyoP82OexaCw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/300/1*J2f4mbbr8wLRrwlX1aT5xA.gif" /><figcaption>gif made on Wayland with Kooha</figcaption></figure><p>Despite not really understanding what I gain by moving from X11 to Wayland, I continue to use it. I hope that I’ll learn more about Wayland and pipewire over time.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6913feff58c6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Ubuntu Ethernet Configuration]]></title>
            <link>https://craigoda.medium.com/ubuntu-ethernet-configuration-67a960c4f41c?source=rss-cc169c48d16a------2</link>
            <guid isPermaLink="false">https://medium.com/p/67a960c4f41c</guid>
            <category><![CDATA[linux]]></category>
            <dc:creator><![CDATA[Craig Oda]]></dc:creator>
            <pubDate>Sun, 30 Jan 2022 18:00:50 GMT</pubDate>
            <atom:updated>2022-03-03T18:24:36.831Z</atom:updated>
            <content:encoded><![CDATA[<p>It’s been a long time since I’ve had networking issues with Linux. For the last 10 or 15 years, the Ethernet just seemed to work with most of my hardware.</p><p>I updated to Ubuntu 21.10 and my Ethernet stopped working.</p><p>Fortunately, I found this post on Reddit, which solved my problem.</p><p><a href="https://askubuntu.com/questions/906636/ethernet-adapter-was-disable-on-ubuntu-17-04">Ethernet adapter was disable on Ubuntu 17.04</a></p><p>Edit file <em>/usr/lib/NetworkManager/conf.d/10-globally-managed-devices.conf</em> and change it’s content from :</p><pre>[keyfile]<br>unmanaged-devices=*,except:type:wifi,except:type:wwan</pre><p>To :</p><pre>[keyfile]<br>unmanaged-devices=*,except:type:ethernet,except:type:wifi,except:type:wwan</pre><p>And then run :</p><pre>sudo service network-manager restart</pre><p>That solved the problem, but I realized later that Ubuntu was using netplan. I then added this to /etc/netplan/99_config.yaml</p><pre>network:<br>  version: 2<br>  renderer: networkd<br>  ethernets:<br>    ens6:<br>      dhcp4: true<br>      nameservers:<br>        addresses: [8.8.8.8, 8.8.4.4]</pre><p>That solved the problem on system reboot.</p><p>More interesting to me is that I got to use lshw, ifconfig, dhclient, and route to trace the problem.</p><p>Using lshw -C network, I was able to get the logical name of my Ethernet adapter.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/495/1*9bj4wc8MfoVpg_vK6ItW-g.png" /></figure><p>Another command to find the Ethernet interface is ip a.</p><p>I was able to bring it up with ifconfig ens6 up</p><p>That is a very nostalgic command for me. :-) I’m not sure when the network interfaces moved from the eth0 notation to ens*. That my might be good to track down. If anyone knows hen it changed, drop me a comment below. I think it’s been ens for 5 years on Ubuntu??</p><p>Using dhclient ens6, I was able to automatically configure the interface with an IP and routes.</p><p>My route table is now looking fine.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/733/1*6DkmgAkj1DqVnYnLIP7wlw.png" /></figure><p>I haven’t been keeping up with the changes to Linux networking configuration managers over the past decade.</p><p>It was a bit of a trip down memory lane for me to get my Ethernet back up on Ubuntu 21.10 as I sat here at my desk with a cup of coffee.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/592/1*jHMFyA0brHqx8XHx3iCgAg.png" /><figcaption>Another fine Sunday morning with Linux network configuration</figcaption></figure><h3>Linux Teaches by Giving Us Challenges</h3><p>Linux is sometimes an interesting beast that teaches us with challenges. I’ve been using wayland for years, not because I find it better, but because I have problems with wayland.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/438/1*CMjYD-zYdcfYW3Y81vmxVQ.png" /></figure><p>At my age and my current work, I no longer understand the graphics system of Linux. However, it is fun to tinker around when screen capture and screen sharing on video conferences stop working on Wayland.</p><p>At my level of hobby, I haven’t made the move to Arch Linux and still wait and see with Ubuntu. I guess that I should install Arch Linux on a spare SSD one day and join the fray on some relaxing Sunday morning.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=67a960c4f41c" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>