<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Teki Solves</title>
    <description>The latest articles on DEV Community by Teki Solves (@teki_solves_fb72717580279).</description>
    <link>https://dev.to/teki_solves_fb72717580279</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F2951876%2Ffecb8ad3-d664-4350-91d5-8b2c9c1ab5b9.png</url>
      <title>DEV Community: Teki Solves</title>
      <link>https://dev.to/teki_solves_fb72717580279</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/teki_solves_fb72717580279"/>
    <language>en</language>
    <item>
      <title>Phaser 4 Texture Atlases: Fix the Pivot Bug That Misaligns Your Weapons</title>
      <dc:creator>Teki Solves</dc:creator>
      <pubDate>Mon, 23 Nov 2026 20:54:18 +0000</pubDate>
      <link>https://dev.to/teki_solves_fb72717580279/phaser-4-texture-atlases-fix-the-pivot-bug-that-misaligns-your-weapons-1dfj</link>
      <guid>https://dev.to/teki_solves_fb72717580279/phaser-4-texture-atlases-fix-the-pivot-bug-that-misaligns-your-weapons-1dfj</guid>
      <description>&lt;p&gt;Loading a texture atlas in Phaser takes one line. Getting a weapon to sit in a character's hand, fire from the right spot and upgrade without jumping around takes more, and that's the part most tutorials skip.&lt;/p&gt;

&lt;p&gt;This guide covers both, for &lt;strong&gt;Phaser 4&lt;/strong&gt;. Most atlas tutorials out there are still for Phaser 2 or 3.&lt;/p&gt;

&lt;h2&gt;
  
  
  TL;DR
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Atlas frame names often end in &lt;code&gt;.png&lt;/code&gt;. Leave it off and Phaser silently shows the &lt;strong&gt;first frame&lt;/strong&gt; instead.&lt;/li&gt;
&lt;li&gt;Phaser applies the JSON &lt;code&gt;pivot&lt;/code&gt; automatically, measured from the &lt;strong&gt;top-left&lt;/strong&gt;. Unity-style atlases measure from the &lt;strong&gt;bottom-left&lt;/strong&gt;, so your weapon floats off the hand.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;setFrame(name, false, false)&lt;/code&gt; keeps your origin when you swap frames. The default resets it.&lt;/li&gt;
&lt;li&gt;Store a muzzle point in the atlas and bullets come out of the barrel at any angle.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Follow along with real files:&lt;/strong&gt; the Laser Pistol from my pack Retro Arsenal, all 3 tiers, as an atlas + JSON with a working Phaser 4 demo.&lt;/p&gt;

&lt;p&gt;👉 &lt;strong&gt;&lt;a href="https://tekisolves.github.io/assets/blog/phaser-4-texture-atlas/retro-arsenal-free-sample.zip" rel="noopener noreferrer"&gt;Download the free sample (ZIP, 210 KB)&lt;/a&gt;&lt;/strong&gt; · &lt;strong&gt;&lt;a href="https://tekisolves.github.io/assets/blog/phaser-4-texture-atlas/demo/" rel="noopener noreferrer"&gt;Try the live demo&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The live demo has all five weapons, each behaving like what it is: hold to fire the rifle, get close with the shotgun, swing the blade onto a target, lob a grenade. Press &lt;strong&gt;D&lt;/strong&gt; to see every pivot and muzzle point while you play, and resize the window to watch it re-lay itself out.&lt;/p&gt;

&lt;h2&gt;
  
  
  What a texture atlas is (and why bother)
&lt;/h2&gt;

&lt;p&gt;A texture atlas is one big image with lots of sprites packed into it, plus a data file that says where each sprite is. Instead of loading 15 separate PNGs, the game loads one image and one JSON file.&lt;/p&gt;

&lt;p&gt;Why it's worth it:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Fewer downloads.&lt;/strong&gt; One request instead of dozens, which matters on mobile.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Faster rendering.&lt;/strong&gt; Sprites that share a texture can be drawn together.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Extra data travels with the art.&lt;/strong&gt; This is the underrated part. The JSON can carry pivot points, muzzle points, tier names, anything you want. We'll use that below.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Loading the atlas in Phaser 4
&lt;/h2&gt;

&lt;p&gt;In your scene's &lt;code&gt;preload&lt;/code&gt;, point Phaser at the image and the JSON:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nf"&gt;preload&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kc"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;load&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;atlas&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'arsenal'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'retro_arsenal_sample.png'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'retro_arsenal_sample.json'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Phaser reads the two common TexturePacker formats, JSON Hash and JSON Array, so most packers work out of the box.&lt;/p&gt;

&lt;p&gt;Then in &lt;code&gt;create&lt;/code&gt;, add a sprite using the atlas key and a frame name:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nf"&gt;create&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kc"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;gun&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;add&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;image&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;260&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;260&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'arsenal'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'weapon_laser_pistol_t1_scrap.png'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Gotcha 1: frame names often include ".png"
&lt;/h3&gt;

&lt;p&gt;Look at your JSON before you guess frame names. Many packers keep the original file name as the key, extension and all:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="nl"&gt;"frames"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;"weapon_laser_pistol_t1_scrap.png"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nl"&gt;"frame"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nl"&gt;"x"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nl"&gt;"y"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nl"&gt;"w"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1024&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nl"&gt;"h"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1024&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="err"&gt;...&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you write &lt;code&gt;'weapon_laser_pistol_t2_military'&lt;/code&gt; without &lt;code&gt;.png&lt;/code&gt;, Phaser doesn't crash. It logs a warning (&lt;code&gt;Texture "arsenal" has no frame ...&lt;/code&gt;) and quietly shows the &lt;strong&gt;first frame in the atlas&lt;/strong&gt; instead. So you get a real sprite, just the wrong one, which is easy to miss. Keep the console open and it's a four-character fix.&lt;/p&gt;

&lt;h2&gt;
  
  
  Putting the weapon in the hand: pivots
&lt;/h2&gt;

&lt;p&gt;A pivot (or origin) is the point of a sprite that sits on its x and y position, and the point it rotates around. For a gun, you want that to be the grip, not the middle of the image. Otherwise the gun swings around its own centre like a propeller.&lt;/p&gt;

&lt;p&gt;Good asset packs store the pivot for you. Retro Arsenal stores two versions per frame:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;pivot&lt;/code&gt;: normalised 0 to 1, measured from the &lt;strong&gt;bottom-left&lt;/strong&gt; (Unity's convention)&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;custom.pivot_px&lt;/code&gt;: in pixels, measured from the &lt;strong&gt;top-left&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Gotcha 2: Phaser applies the pivot for you, upside down
&lt;/h3&gt;

&lt;p&gt;This one is sneaky. When Phaser loads a JSON atlas, it looks for a &lt;code&gt;pivot&lt;/code&gt; on each frame, and if it finds one, every sprite using that frame gets that origin automatically.&lt;/p&gt;

&lt;p&gt;The catch: Phaser measures origin from the &lt;strong&gt;top-left&lt;/strong&gt;. If your atlas was exported with a bottom-left pivot, like many Unity-friendly packs, Phaser applies it without complaint and your weapon ends up noticeably above or below the hand. No error, just a gun floating in the wrong place.&lt;/p&gt;

&lt;p&gt;The fix is to set the origin yourself from the top-left pixel values:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;data&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;gun&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;frame&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;customData&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;custom&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;   &lt;span class="c1"&gt;// everything from the JSON frame&lt;/span&gt;
&lt;span class="kc"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;gun&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;setOrigin&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;pivot_px&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;x&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="mi"&gt;1024&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;pivot_px&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;y&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="mi"&gt;1024&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;frame.customData&lt;/code&gt; is Phaser's copy of the whole JSON entry for that frame, so any extra data your atlas carries is right there.&lt;/p&gt;

&lt;p&gt;If your atlas only has a bottom-left &lt;code&gt;pivot&lt;/code&gt;, flip the y yourself:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kc"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;gun&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;setOrigin&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;frame&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;pivotX&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="n"&gt;frame&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;pivotY&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Aiming and firing from the muzzle
&lt;/h2&gt;

&lt;p&gt;Rotating towards the pointer is one line:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kc"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;input&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;on&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'pointermove'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;p&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;angle&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;Phaser&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nb"&gt;Math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;Angle&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;Between&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kc"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;gun&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kc"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;gun&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;y&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;p&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;worldX&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;p&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;worldY&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="kc"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;gun&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;setRotation&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;angle&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="c1"&gt;// Pointing left? Flip vertically so the gun isn't upside down.&lt;/span&gt;
  &lt;span class="kc"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;gun&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;setScale&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mf"&gt;0.25&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nb"&gt;Math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;abs&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;angle&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="nb"&gt;Math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="no"&gt;PI&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt; &lt;span class="o"&gt;?&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mf"&gt;0.25&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mf"&gt;0.25&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now the interesting bit. Bullets should come out of the barrel, not the hand. Retro Arsenal stores a &lt;code&gt;muzzle_px&lt;/code&gt; point per frame, so we can work out where it is in the world, whatever the rotation and scale:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nf"&gt;muzzle&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;c&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;gun&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;frame&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;customData&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;custom&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;dx&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;c&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;muzzle_px&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;x&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="n"&gt;c&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;pivot_px&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="kc"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;gun&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;scaleX&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;dy&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;c&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;muzzle_px&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;y&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="n"&gt;c&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;pivot_px&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;y&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="kc"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;gun&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;scaleY&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;cos&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;Math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;cos&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kc"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;gun&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;rotation&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;sin&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;Math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;sin&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kc"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;gun&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;rotation&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;gun&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;x&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;dx&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;cos&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="n"&gt;dy&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;sin&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;y&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;gun&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;y&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;dx&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;sin&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;dy&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;cos&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That's the offset from the grip to the muzzle, scaled, then rotated. Spawn your projectile there:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nf"&gt;fire&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;m&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;muzzle&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;r&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;gun&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;rotation&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;bolt&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;add&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;rectangle&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;m&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;m&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;y&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;26&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mh"&gt;0xb2dd31&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;setRotation&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;r&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="kc"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;tweens&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;add&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;targets&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;bolt&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;m&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;x&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nb"&gt;Math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;cos&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;r&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mi"&gt;900&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;y&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;m&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;y&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nb"&gt;Math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;sin&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;r&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mi"&gt;900&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;duration&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;600&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;onComplete&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;bolt&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;destroy&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The same idea works for any attachment point: a blade tip for hit effects, a grenade pin, a muzzle flash.&lt;/p&gt;

&lt;h2&gt;
  
  
  Swapping weapon tiers at runtime
&lt;/h2&gt;

&lt;p&gt;Every weapon in Retro Arsenal comes in three tiers (Scrap, Military, Prototype) drawn on the same shape, with the &lt;strong&gt;same pivot and muzzle point&lt;/strong&gt;. So an upgrade is just a frame swap:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kc"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;gun&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;setFrame&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'weapon_laser_pistol_t2_military.png'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Gotcha 3: setFrame resets your origin
&lt;/h3&gt;

&lt;p&gt;Look at that last &lt;code&gt;false&lt;/code&gt;. By default, &lt;code&gt;setFrame&lt;/code&gt; re-applies the frame's pivot from the JSON, which brings Gotcha 2 straight back and undoes your &lt;code&gt;setOrigin&lt;/code&gt;. Passing &lt;code&gt;false&lt;/code&gt; as the third argument (&lt;code&gt;updateOrigin&lt;/code&gt;) keeps the origin you set.&lt;/p&gt;

&lt;h2&gt;
  
  
  Will a 4096px atlas work on a cheap phone?
&lt;/h2&gt;

&lt;p&gt;The full Retro Arsenal atlas is 4096 × 4096. Most phones from the last several years handle that, but older or budget GPUs can top out lower. You can check the device limit with plain WebGL:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;gl&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;createElement&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'canvas'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getContext&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'webgl'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nb"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;gl&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getParameter&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;gl&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="no"&gt;MAX_TEXTURE_SIZE&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// e.g. 4096, 8192 or 16384&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you need to support very old devices, repack into smaller atlases (2048 is a safe size) and load them with &lt;code&gt;this.load.multiatlas()&lt;/code&gt;. The free sample is 3072 × 1024, so it runs anywhere.&lt;/p&gt;

&lt;h2&gt;
  
  
  Phaser 3 vs Phaser 4: what changed for atlases?
&lt;/h2&gt;

&lt;p&gt;Very little for this workflow. &lt;code&gt;this.load.atlas&lt;/code&gt;, &lt;code&gt;frame.customData&lt;/code&gt;, the automatic pivot and &lt;code&gt;setFrame(frame, updateSize, updateOrigin)&lt;/code&gt; all work the same way in both, so this guide applies to Phaser 3 too.&lt;/p&gt;

&lt;p&gt;The new thing in Phaser 4 is the &lt;strong&gt;Phaser Compact Texture Atlas&lt;/strong&gt; (&lt;code&gt;.pct&lt;/code&gt;), a text format that's typically 90 to 95% smaller than the JSON, loaded with &lt;code&gt;this.load.atlasPCT()&lt;/code&gt;. Worth a look once you're shipping lots of atlases.&lt;/p&gt;

&lt;h2&gt;
  
  
  Bonus: aim through the barrel, not the grip
&lt;/h2&gt;

&lt;p&gt;The aim code above points the &lt;strong&gt;grip&lt;/strong&gt; at the cursor. Because the muzzle sits above the grip, shots land a little above where you click. The fix is to tilt the gun until the line out of the muzzle passes through the pointer:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nf"&gt;aimAt&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;p&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;c&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;gun&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;frame&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;customData&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;custom&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;px&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;p&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;worldX&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="kc"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;gun&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;py&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;p&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;worldY&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="kc"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;gun&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;y&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;dist&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;Math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;hypot&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;px&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;py&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;phi&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;Math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;atan2&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;py&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;px&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;flip&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;Math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;abs&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;phi&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="nb"&gt;Math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="no"&gt;PI&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt; &lt;span class="o"&gt;?&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;              &lt;span class="c1"&gt;// pointing left?&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;off&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;c&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;muzzle_px&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;y&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="n"&gt;c&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;pivot_px&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;y&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mf"&gt;0.25&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;flip&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;          &lt;span class="c1"&gt;// muzzle height above the grip, scaled&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;angle&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;dist&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="nb"&gt;Math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;abs&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;off&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;?&lt;/span&gt; &lt;span class="n"&gt;phi&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="nb"&gt;Math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;asin&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;off&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="n"&gt;dist&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;phi&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="kc"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;gun&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;setRotation&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;angle&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;setScale&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mf"&gt;0.25&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mf"&gt;0.25&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;flip&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;off / dist&lt;/code&gt; is the angle the barrel has to tilt so its line still hits the target. It matters most up close, which is exactly where players notice.&lt;/p&gt;

&lt;h2&gt;
  
  
  Grab the code
&lt;/h2&gt;

&lt;p&gt;The free sample includes everything in this post as one working file (&lt;code&gt;main.js&lt;/code&gt;), plus the pistol in all 3 tiers. Use the sprites in your own games, commercial ones included. Just don't resell the files.&lt;/p&gt;

&lt;p&gt;👉 &lt;strong&gt;&lt;a href="https://tekisolves.github.io/assets/blog/phaser-4-texture-atlas/retro-arsenal-free-sample.zip" rel="noopener noreferrer"&gt;Download the free sample (ZIP)&lt;/a&gt;&lt;/strong&gt; · &lt;strong&gt;&lt;a href="https://tekisolves.github.io/assets/blog/phaser-4-texture-atlas/demo/" rel="noopener noreferrer"&gt;Try the live demo&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If you want the other four weapons (laser rifle, shotgun, energy blade and plasma grenade), each in the same three tiers with pivot and muzzle data, that's &lt;strong&gt;&lt;a href="https://tekisolves.github.io/retro-arsenal.html" rel="noopener noreferrer"&gt;Retro Arsenal&lt;/a&gt;&lt;/strong&gt;. I made it, so I'm biased, but it's built for exactly this setup.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Which of the three gotchas has caught you before?&lt;/strong&gt; Or if you've hit an atlas bug I didn't cover, drop it in the comments. I'll test it and add the fix.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;How this post was made: Written by Khaya, drafted with help from Claude (AI). The demo was tested in Phaser 4.2.1 on a low-end Android phone before publishing. It was first published on the &lt;a href="https://tekisolves.github.io/blog/phaser-4-texture-atlas/" rel="noopener noreferrer"&gt;Teki Solves blog&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>phaser</category>
      <category>gamedev</category>
      <category>javascript</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Programming is 50% technical, 50% how you think and behave</title>
      <dc:creator>Teki Solves</dc:creator>
      <pubDate>Wed, 27 May 2026 11:21:16 +0000</pubDate>
      <link>https://dev.to/teki_solves_fb72717580279/programming-is-50-technical-50-how-you-think-and-behave-5bkm</link>
      <guid>https://dev.to/teki_solves_fb72717580279/programming-is-50-technical-50-how-you-think-and-behave-5bkm</guid>
      <description>&lt;p&gt;&lt;strong&gt;Programming is 50% technical, 50% how you think and behave&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Gone are the days where you can be a genius in the corner coding. Whether you're on your own or working as part of a team, the game has become more complex. Everyone has to have soft skills.&lt;/p&gt;

&lt;p&gt;Great programming isn't just about remembering syntax, how many languages you know, or even how fast you type. It's about how you think. That's what landed my big jobs, Meta included. It's how you approach a problem and whether you're thinking beyond the current task. Are you fixing something or creating future problems? Can you understand problems and effectively communicate with stakeholders?&lt;/p&gt;

&lt;p&gt;Here are the 8 thinking habits that actually matter:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Computational thinking&lt;/strong&gt; — It's not magic. It's asking: what needs to happen, what are the steps, what repeats, what can I ignore? If you can think clearly, you can code.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Breaking problems down&lt;/strong&gt; — Don't try to build the whole thing at once. Break it into the smallest possible steps and solve them one at a time. That's how real systems get built.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Spotting patterns&lt;/strong&gt; — When you notice something repeating, you can reuse it instead of rewriting it. Cleaner code, less debugging, more time saved.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Abstraction&lt;/strong&gt; — Focus on what something does, not every internal detail. Frameworks and libraries exist so you don't have to rebuild everything from scratch. Use them.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5. Writing pseudocode&lt;/strong&gt; — Plan before you code. Write your logic in plain English first. It saves you from messy refactors and hours of confusion later.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;6. The debugging mindset&lt;/strong&gt; — Bugs are not proof you're incapable. They're feedback. Read the error, understand the context, test one thing at a time. Stay calm. Every bug teaches you something.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;7. How programmers actually solve problems&lt;/strong&gt; — Gather context first. Read the errors. Review documentation. Ask questions. Isolate one issue at a time. Sometimes stepping away briefly is the smartest move you can make.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;8. Common thinking traps&lt;/strong&gt; — You don't need a degree. You don't need to know every language. Stop comparing your beginning to someone else's middle. Focus on progress and clear thinking.&lt;/p&gt;

&lt;p&gt;I know programming and tech can be intimidating but remember everyone in this is human. Even the best of us. So don't compare yourself just yet. Debugging can be tough, but like any muscle you can get stronger with patience and right thinking. My goal is to teach people about the philosophy of coding as best I can. I'm still learning too, trust me.&lt;/p&gt;

&lt;p&gt;I wrote this guide, How To Think Like A Programmer, for beginners and anyone who wants to get better. Get it here: &lt;a href="https://tekisolves.gumroad.com/l/hrdtoh" rel="noopener noreferrer"&gt;https://tekisolves.gumroad.com/l/hrdtoh&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Thanks for reading.&lt;/p&gt;

</description>
      <category>programming</category>
      <category>beginners</category>
      <category>career</category>
      <category>codenewbie</category>
    </item>
    <item>
      <title>Back to basics, Escape Tutorial Hell</title>
      <dc:creator>Teki Solves</dc:creator>
      <pubDate>Fri, 22 May 2026 14:34:41 +0000</pubDate>
      <link>https://dev.to/teki_solves_fb72717580279/back-to-basics-escape-tutorial-hell-nln</link>
      <guid>https://dev.to/teki_solves_fb72717580279/back-to-basics-escape-tutorial-hell-nln</guid>
      <description>&lt;p&gt;Coding is hard to start and even harder to get to where you want to go with it.&lt;br&gt;
Tutorial hell is real. But I think the deeper problem is this. A lot of people go through college or self-taught routes to learn and pass. Then they think they're ready. I'll tell you this much, that couldn't be further from the truth.&lt;br&gt;
And that's more true today than ever. With AI and vibe coding, languages have never been more accessible. But fundamentals are being mentioned less and less. Nobody's talking about data types, for loops, the basics. People are skipping the foundation and wondering why they're stuck.&lt;br&gt;
So I took it back to basics. I'm releasing the Get Out of Tutorial Hell series. Guides on coding and building based on what I learned studying and working at top tech companies and the startups I founded.&lt;br&gt;
The first one is Escape Tutorial Hell: Programming Fundamentals for Beginners. Grab it here: &lt;a href="https://tekisolve.gumroad.com/l/esndw" rel="noopener noreferrer"&gt;https://tekisolve.gumroad.com/l/esndw&lt;/a&gt;&lt;/p&gt;

</description>
      <category>programming</category>
      <category>codenewbie</category>
      <category>beginners</category>
      <category>career</category>
    </item>
    <item>
      <title>What I Wish Someone Told Me Before I Started Learning to Code</title>
      <dc:creator>Teki Solves</dc:creator>
      <pubDate>Thu, 07 May 2026 18:20:34 +0000</pubDate>
      <link>https://dev.to/teki_solves_fb72717580279/what-i-wish-someone-told-me-before-i-started-learning-to-code-27k7</link>
      <guid>https://dev.to/teki_solves_fb72717580279/what-i-wish-someone-told-me-before-i-started-learning-to-code-27k7</guid>
      <description>&lt;h1&gt;
  
  
  What I Wish Someone Told Me Before I Started Learning to Code
&lt;/h1&gt;

&lt;p&gt;I used to think learning to code was about finding the right tutorial, the right language, or the right roadmap.&lt;/p&gt;

&lt;p&gt;It is not.&lt;/p&gt;

&lt;p&gt;If you are a beginner, the hardest part is usually not the code itself. It is getting stuck in tutorial hell, second-guessing everything, and feeling like you are always one step behind. That is what makes learning to code feel overwhelming.&lt;/p&gt;

&lt;p&gt;I have not written in a while, so I wanted to keep this simple and useful: if you are just starting out, here are the things I wish someone had told me earlier.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. You do not need the perfect tutorial
&lt;/h2&gt;

&lt;p&gt;A lot of beginners believe they need the best course, the best YouTube channel, or the best beginner roadmap before they can really start.&lt;/p&gt;

&lt;p&gt;That is a trap.&lt;/p&gt;

&lt;p&gt;The truth is that no tutorial will do the work for you. Tutorials can show you the basics, but they cannot replace the part where you actually sit down and try to think through a problem yourself.&lt;/p&gt;

&lt;p&gt;If you keep watching and rarely building, you will feel productive without really improving. That is tutorial hell.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Tutorial hell feels safe, but it slows you down
&lt;/h2&gt;

&lt;p&gt;Tutorial hell is comfortable because it gives you structure.&lt;/p&gt;

&lt;p&gt;You can follow along line by line, copy what is on the screen, and feel like you are learning. But when the tutorial ends and you have to build something on your own, everything suddenly feels blurry again.&lt;/p&gt;

&lt;p&gt;That is usually the sign that you were learning passively, not actively.&lt;/p&gt;

&lt;p&gt;A better approach is to use tutorials as a starting point, then change the project, rebuild it from memory, or try to make a small variation on your own.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. You do not need to pick the “right” language first
&lt;/h2&gt;

&lt;p&gt;This one matters a lot for beginners.&lt;/p&gt;

&lt;p&gt;People waste too much energy arguing about which language is best to start with. In reality, the first language is usually less important than learning the core ideas.&lt;/p&gt;

&lt;p&gt;Variables, conditionals, loops, functions, data structures, debugging, problem solving — those ideas exist across languages. Once you understand them, switching languages gets much easier.&lt;/p&gt;

&lt;p&gt;So if you are stuck choosing, stop overthinking it. Pick one and begin.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Coding is not memorizing syntax
&lt;/h2&gt;

&lt;p&gt;A lot of beginners think coding is about remembering every keyword and symbol perfectly.&lt;/p&gt;

&lt;p&gt;It is not.&lt;/p&gt;

&lt;p&gt;Syntax matters, but it is not the real skill. The real skill is learning how to break down a problem into smaller steps and express those steps clearly enough for a computer to follow.&lt;/p&gt;

&lt;p&gt;You will forget syntax. Everyone does. That is normal.&lt;/p&gt;

&lt;p&gt;What matters more is understanding the logic behind the code, because logic transfers much better than memorized examples.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Being stuck is part of the process
&lt;/h2&gt;

&lt;p&gt;If you are new, you will get stuck. A lot.&lt;/p&gt;

&lt;p&gt;That does not mean you are bad at coding. It means you are learning something difficult and unfamiliar.&lt;/p&gt;

&lt;p&gt;The mistake many beginners make is assuming they should understand everything immediately. In reality, progress often looks like confusion, then clarity, then confusion again. That cycle is normal.&lt;/p&gt;

&lt;p&gt;The goal is not to never get stuck. The goal is to get better at working through being stuck.&lt;/p&gt;

&lt;h2&gt;
  
  
  6. Build tiny things, not perfect things
&lt;/h2&gt;

&lt;p&gt;Beginners often wait until they feel ready to build something impressive.&lt;/p&gt;

&lt;p&gt;That usually delays progress.&lt;/p&gt;

&lt;p&gt;Start with small things instead:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;a simple calculator.&lt;/li&gt;
&lt;li&gt;a to-do list.&lt;/li&gt;
&lt;li&gt;a basic form.&lt;/li&gt;
&lt;li&gt;a small game.&lt;/li&gt;
&lt;li&gt;a page that responds to clicks.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Tiny projects teach more than endless note-taking. They also help you see progress faster, which matters when motivation is low.&lt;/p&gt;

&lt;h2&gt;
  
  
  7. Debugging is not a side skill
&lt;/h2&gt;

&lt;p&gt;When you start coding, debugging feels like an annoying extra step.&lt;/p&gt;

&lt;p&gt;Later, you realize it is part of the job.&lt;/p&gt;

&lt;p&gt;You will spend time figuring out why something broke, why a value is wrong, or why the output is not what you expected. That is not failure. That is normal development work.&lt;/p&gt;

&lt;p&gt;Learning how to read errors, test small changes, and isolate problems will save you much more time than trying to avoid mistakes altogether.&lt;/p&gt;

&lt;h2&gt;
  
  
  8. You do not need to feel ready to start
&lt;/h2&gt;

&lt;p&gt;A lot of people delay learning to code because they think they need more preparation.&lt;/p&gt;

&lt;p&gt;More time. More confidence. More clarity. More of everything.&lt;/p&gt;

&lt;p&gt;But coding is one of those things you learn by doing. You do not become ready first and then start. You start, and readiness follows.&lt;/p&gt;

&lt;p&gt;That was a big mental shift for me.&lt;/p&gt;

&lt;h2&gt;
  
  
  9. Progress is easier when you stop comparing yourself
&lt;/h2&gt;

&lt;p&gt;It is easy to look at people who seem to “get it” quickly and think you are behind.&lt;/p&gt;

&lt;p&gt;But most people are comparing their beginning to someone else’s middle.&lt;/p&gt;

&lt;p&gt;That comparison is unfair and usually demotivating. Focus on your own consistency instead. Even small daily progress compounds over time.&lt;/p&gt;

&lt;p&gt;A beginner who keeps going usually beats a beginner who keeps restarting.&lt;/p&gt;

&lt;h2&gt;
  
  
  10. The beginning is supposed to feel awkward
&lt;/h2&gt;

&lt;p&gt;The first phase of learning anything technical is messy.&lt;/p&gt;

&lt;p&gt;You will not understand everything.&lt;br&gt;
You will repeat things.&lt;br&gt;
You will forget things.&lt;br&gt;
You will question whether this is for you.&lt;/p&gt;

&lt;p&gt;That does not mean you should stop.&lt;/p&gt;

&lt;p&gt;It means you are in the part where things are still clicking into place. Most people quit here because they mistake discomfort for failure. In reality, discomfort is often part of the learning curve.&lt;/p&gt;

&lt;h2&gt;
  
  
  Final thoughts
&lt;/h2&gt;

&lt;p&gt;If I had to sum it up, I would say this:&lt;/p&gt;

&lt;p&gt;Do not get trapped in tutorial hell.&lt;br&gt;
Do not overthink your first language.&lt;br&gt;
Do not wait until you feel ready.&lt;br&gt;
Do not expect the process to feel smooth at the beginning.&lt;/p&gt;

&lt;p&gt;Learn the basics. Build small things. Get comfortable being stuck. Keep going.&lt;/p&gt;

&lt;p&gt;That is a much better starting point than trying to find the perfect tutorial or roadmap.&lt;/p&gt;

&lt;p&gt;I wrote this because I know how easy it is to make learning to code feel bigger and more confusing than it needs to be. If you are a beginner, I hope this helps make the path feel a little clearer.&lt;/p&gt;

&lt;p&gt;I put together a beginner-friendly guide that goes deeper into these ideas here: &lt;a href="https://tekisolve.gumroad.com/l/esndw" rel="noopener noreferrer"&gt;Everything I Wish Someone Told Me Before I Wrote My First Line of Code&lt;/a&gt;&lt;/p&gt;

</description>
      <category>programming</category>
      <category>beginners</category>
      <category>career</category>
      <category>codenewbie</category>
    </item>
    <item>
      <title>Master React Interviews the Smart Way (Not the Hard Way)</title>
      <dc:creator>Teki Solves</dc:creator>
      <pubDate>Tue, 07 Oct 2025 13:51:05 +0000</pubDate>
      <link>https://dev.to/teki_solves_fb72717580279/master-react-interviews-the-smart-way-not-the-hard-way-3e48</link>
      <guid>https://dev.to/teki_solves_fb72717580279/master-react-interviews-the-smart-way-not-the-hard-way-3e48</guid>
      <description>&lt;h2&gt;
  
  
  🚀 Master React Interviews the Smart Way (Not the Hard Way)
&lt;/h2&gt;

&lt;p&gt;If you’ve ever stared at your screen before a React interview wondering &lt;em&gt;“What should I even revise?”&lt;/em&gt; — you’re not alone.&lt;/p&gt;

&lt;p&gt;Most developers don’t fail React interviews because they can’t code.&lt;br&gt;
They fail because &lt;strong&gt;they forget the fundamentals under pressure&lt;/strong&gt;, or they overprepare on the wrong things.&lt;/p&gt;

&lt;p&gt;After years of building and scaling real-world products at major tech companies, one thing became clear:&lt;br&gt;
React interviews aren’t about how flashy your portfolio is — they test how well you understand &lt;em&gt;why&lt;/em&gt; React works the way it does.&lt;/p&gt;

&lt;p&gt;That’s why I put together something simple but powerful:&lt;br&gt;
👉 &lt;a href="https://tekisolve.gumroad.com/l/goazh" rel="noopener noreferrer"&gt;&lt;strong&gt;Top 30 React JS Interview Questions &amp;amp; Answers (2025 Edition)&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It’s a concise, no-nonsense prep guide for developers who want to &lt;strong&gt;refresh the right concepts quickly&lt;/strong&gt; and &lt;strong&gt;walk into interviews confident&lt;/strong&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  💬 “Why should I buy this when I can just Google the questions?”
&lt;/h3&gt;

&lt;p&gt;You absolutely &lt;em&gt;can&lt;/em&gt; — and you probably will.&lt;br&gt;
But here’s the problem:&lt;br&gt;
Google gives you &lt;strong&gt;fragments&lt;/strong&gt;.&lt;br&gt;
You’ll find ten different answers for the same question, half of them outdated or missing key context.&lt;/p&gt;

&lt;p&gt;This guide cuts through that noise.&lt;br&gt;
It’s curated from &lt;strong&gt;real interview experiences&lt;/strong&gt; and &lt;strong&gt;hands-on work&lt;/strong&gt; in production-level React apps — so you’re getting clarity, not confusion.&lt;br&gt;
It’s designed to be read in one sitting, with clean explanations you can actually &lt;em&gt;remember&lt;/em&gt; under interview pressure.&lt;/p&gt;

&lt;p&gt;Think of it as the difference between &lt;strong&gt;scrolling endlessly&lt;/strong&gt; and &lt;strong&gt;actually preparing&lt;/strong&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Inside the guide:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;✅ 30 of the most-asked React questions — updated for 2025&lt;/li&gt;
&lt;li&gt;✅ Concise, easy-to-digest answers&lt;/li&gt;
&lt;li&gt;✅ Modern hooks, patterns, and performance insights&lt;/li&gt;
&lt;li&gt;✅ Bonus: “interview-ready” add-ons to stand out in tech interviews&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you’ve been brushing up for React roles — or mentoring someone who is — this will save you hours of scattered Googling.&lt;/p&gt;

&lt;p&gt;Grab it here → &lt;a href="https://tekisolve.gumroad.com/l/goazh" rel="noopener noreferrer"&gt;https://tekisolve.gumroad.com/l/goazh&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Get it while it's here guys :). Share your feedback here. &lt;/p&gt;

</description>
      <category>react</category>
      <category>interviewtips</category>
      <category>webdev</category>
      <category>frontend</category>
    </item>
    <item>
      <title>Break the Limits: Your First Steps Into Software Development</title>
      <dc:creator>Teki Solves</dc:creator>
      <pubDate>Tue, 23 Sep 2025 17:55:06 +0000</pubDate>
      <link>https://dev.to/teki_solves_fb72717580279/break-the-limits-your-first-steps-into-software-development-4glj</link>
      <guid>https://dev.to/teki_solves_fb72717580279/break-the-limits-your-first-steps-into-software-development-4glj</guid>
      <description>&lt;p&gt;Break the Limits: Your First Steps Into Software Development&lt;/p&gt;

&lt;p&gt;Starting your journey into software development can feel overwhelming. Too many programming languages, too many tutorials, and too much noise. If you’ve ever asked yourself &lt;strong&gt;“Where do I even begin?”&lt;/strong&gt;, you’re not alone.&lt;/p&gt;

&lt;p&gt;The truth is: you don’t need 10 different courses, hundreds of hours of YouTube, or the “perfect setup” to start coding. What you need is a &lt;strong&gt;clear, beginner-friendly roadmap&lt;/strong&gt; that gets you building real projects from day one.&lt;/p&gt;

&lt;p&gt;That’s why I created the &lt;strong&gt;Beginner’s Roadmap to Software Engineering&lt;/strong&gt; — a step-by-step guide designed to cut through the confusion and help you &lt;strong&gt;start coding with confidence&lt;/strong&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  💡 What You’ll Learn
&lt;/h2&gt;

&lt;p&gt;Inside this roadmap, you’ll discover:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;How to choose your path&lt;/strong&gt; → Frontend, Backend, Full Stack, or niche areas like AI and Game Dev.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Essential tools &amp;amp; languages&lt;/strong&gt; → Learn the right ones without drowning in endless options.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Small, finishable projects&lt;/strong&gt; → Build momentum with real wins instead of half-finished ideas.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Curated resources&lt;/strong&gt; → Stop wasting time hunting for the “best” tutorial.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Insider tips from a developer&lt;/strong&gt; → Habits and mindsets that will help you grow faster.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Common pitfalls to avoid&lt;/strong&gt; → Save yourself months of frustration by skipping beginner mistakes.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This isn’t just another list of coding tutorials — it’s a &lt;strong&gt;practical roadmap&lt;/strong&gt; built to help beginners &lt;strong&gt;break through limits&lt;/strong&gt; and start creating.&lt;/p&gt;




&lt;h2&gt;
  
  
  🎯 Why This Roadmap Works
&lt;/h2&gt;

&lt;p&gt;Most beginners quit not because coding is too hard, but because they get lost in &lt;strong&gt;choice overload&lt;/strong&gt;. This guide is built around one philosophy:&lt;/p&gt;

&lt;p&gt;👉 &lt;strong&gt;Done is better than perfect.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Each module is focused on helping you finish something real — a personal webpage, a to-do list app, or even a small game. Every project gives you momentum, confidence, and proof that you’re moving forward.&lt;/p&gt;




&lt;h2&gt;
  
  
  🖼️ Who This Is For
&lt;/h2&gt;

&lt;p&gt;This roadmap is perfect if you’re:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A complete beginner curious about software engineering.&lt;/li&gt;
&lt;li&gt;A self-taught coder who’s tired of jumping between random tutorials.&lt;/li&gt;
&lt;li&gt;Someone who wants to &lt;strong&gt;build projects that actually work&lt;/strong&gt; instead of just reading theory.&lt;/li&gt;
&lt;li&gt;Anyone ready to &lt;strong&gt;start today&lt;/strong&gt; without waiting for the “perfect time.”&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  🔗 Take Your First Step Today
&lt;/h2&gt;

&lt;p&gt;The best time to start coding was yesterday. The second-best time is right now.&lt;/p&gt;

&lt;p&gt;👉 &lt;a href="https://tekisolve.gumroad.com/l/pywju" rel="noopener noreferrer"&gt;&lt;strong&gt;Download the Beginner’s Roadmap to Software Engineering here&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Start small. Build something real. &lt;strong&gt;Break the limits.&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>softwareengineering</category>
      <category>webdev</category>
      <category>career</category>
    </item>
    <item>
      <title>Learn Coding Faster: Essential Cheat Sheet for Beginner Developers</title>
      <dc:creator>Teki Solves</dc:creator>
      <pubDate>Wed, 27 Aug 2025 15:35:40 +0000</pubDate>
      <link>https://dev.to/teki_solves_fb72717580279/learn-coding-faster-essential-cheat-sheet-for-beginner-developers-34ii</link>
      <guid>https://dev.to/teki_solves_fb72717580279/learn-coding-faster-essential-cheat-sheet-for-beginner-developers-34ii</guid>
      <description>&lt;h3&gt;
  
  
  &lt;strong&gt;Learn Coding Faster: Essential Cheat Sheet for Beginner Developers&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Starting out in coding can feel like drinking from a firehose. Tutorials, documentation, and endless tools make it easy to get stuck before you even write your first meaningful program. But here’s a small trick that makes a big difference: &lt;strong&gt;focus on core patterns instead of memorizing every function&lt;/strong&gt;. Understanding the “why” behind loops, conditionals, and functions saves you hours of trial and error.&lt;/p&gt;

&lt;p&gt;That’s exactly what the &lt;strong&gt;Beginner’s Software Engineering Cheat Sheet&lt;/strong&gt; does—it distills the essentials into a single, easy-to-use reference. From practical coding shortcuts to job-ready skills, it helps beginner developers &lt;strong&gt;learn faster, avoid common pitfalls, and build confidence&lt;/strong&gt; in real-world projects.&lt;/p&gt;

&lt;p&gt;Instead of getting lost in the noise, you can &lt;strong&gt;start applying what matters immediately&lt;/strong&gt; and see real progress. Don’t spend months figuring it out on your own—let this cheat sheet be your shortcut.&lt;/p&gt;

&lt;p&gt;Download it today and &lt;strong&gt;jumpstart your coding career&lt;/strong&gt;: &lt;a href="https://tekisolve.gumroad.com/l/wqttrw" rel="noopener noreferrer"&gt;Get the Cheat Sheet&lt;/a&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>programming</category>
      <category>javascript</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Crush Your React Doubts A Real Take on Entrepreneurship and My First Sale</title>
      <dc:creator>Teki Solves</dc:creator>
      <pubDate>Tue, 05 Aug 2025 16:59:12 +0000</pubDate>
      <link>https://dev.to/teki_solves_fb72717580279/crush-your-react-doubts-a-real-take-on-entrepreneurship-and-my-first-sale-34c6</link>
      <guid>https://dev.to/teki_solves_fb72717580279/crush-your-react-doubts-a-real-take-on-entrepreneurship-and-my-first-sale-34c6</guid>
      <description>&lt;p&gt;Entrepreneurship is messy. Honestly, it reminds me a lot of software development. You lay out a detailed plan, map every step, and then the real work begins and suddenly, nothing feels straightforward anymore. That’s when you have to keep showing up, day after day, even when you don’t have all the answers. It’s exactly like coding: things rarely go as planned, but you figure it out as you go.&lt;/p&gt;

&lt;p&gt;I’m not going to pretend that I’m happy all the time or that this feels easy. Most of the time, it’s daunting. But I’m starting to see that when something good happens like making my first sale it means I must be doing something right, even if it still feels chaotic. I’m learning to embrace the mess and find answers inside it.&lt;/p&gt;

&lt;p&gt;After spending a decade working at big tech companies like Facebook and Accenture, I saw those places as massive beasts run by geniuses, and honestly, I never thought I could do what they do. But, step by step, I learned that I could. It wasn’t easy, and it’s still not. The uncertainty never fully goes away.&lt;/p&gt;

&lt;p&gt;The sale I made yesterday is just a spark. Maybe it’s the beginning of a slow burning flame for Teki Solves. I’m still learning how to give value to the world, to help others grow with me. I don’t have a secret strategy there’s no perfect method I can share. I just keep showing up and keep my mind set on moving forward.&lt;/p&gt;

&lt;p&gt;If you’re out there building something whether it’s a product, a business, or even just yourself embrace the chaos. No one has it all figured out. Progress comes from staying in the game, learning as you go, and helping others along the way. That’s what I’m trying to do, and I hope you are too.&lt;/p&gt;

&lt;p&gt;Note: If you want to check out the cheat sheet I created, feel free to have a look here: &lt;a href="https://tekisolve.gumroad.com/l/qbzxx" rel="noopener noreferrer"&gt;https://tekisolve.gumroad.com/l/qbzxx&lt;/a&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>programming</category>
      <category>javascript</category>
      <category>startup</category>
    </item>
    <item>
      <title>Big Update: Pay What You Want &amp; New Tools for Developers</title>
      <dc:creator>Teki Solves</dc:creator>
      <pubDate>Fri, 18 Jul 2025 16:47:10 +0000</pubDate>
      <link>https://dev.to/teki_solves_fb72717580279/big-update-pay-what-you-want-new-tools-for-developers-437o</link>
      <guid>https://dev.to/teki_solves_fb72717580279/big-update-pay-what-you-want-new-tools-for-developers-437o</guid>
      <description>&lt;h1&gt;
  
  
  Big Update: Pay What You Want &amp;amp; New Tools for Developers
&lt;/h1&gt;

&lt;p&gt;After years of researching and building my collection of cheat sheets, I’ll be honest—sales never came. I realized most developers expect these resources for free, so I’m embracing it:&amp;nbsp;&lt;strong&gt;you can now pay what you want for the ultimate developer cheat sheet bundle&lt;/strong&gt;. This isn’t just a pile of random notes—this is knowledge built over years as a working software engineer, distilled to help you level up faster.&lt;/p&gt;

&lt;p&gt;I still remember how intimidating the software world felt when I started—how tough it was to break in and find your footing. That challenge is one of the reasons I started Teki Solves: to make the path a bit clearer for anyone stepping into code, no matter where you’re starting from.&lt;/p&gt;

&lt;p&gt;Now, I’m excited to share another tool just for you:&amp;nbsp;&lt;strong&gt;Teki Test Bot&lt;/strong&gt;. It lets you practice and sharpen your React and JavaScript interview skills in a friendly, interactive way. If technical interviews have ever made you sweat, this is your chance to prepare smarter, not harder.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://tekitestbot-github-io-wb8m.vercel.app/" rel="noopener noreferrer"&gt;Try Teki Test Bot now&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://tekisolve.gumroad.com/l/qbuul" rel="noopener noreferrer"&gt;Grab the Cheat Sheet Bundle (pay what you want)&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Whether you’re just beginning or looking to grow, these resources are here to support your journey. Thanks for being part of the community and for paying it forward.&lt;/p&gt;

&lt;p&gt;All together let me know what you guys think. &lt;/p&gt;

</description>
      <category>webdev</category>
      <category>programming</category>
      <category>javascript</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Having Trouble Context Switching?</title>
      <dc:creator>Teki Solves</dc:creator>
      <pubDate>Thu, 10 Jul 2025 17:33:56 +0000</pubDate>
      <link>https://dev.to/teki_solves_fb72717580279/having-trouble-context-switching-438d</link>
      <guid>https://dev.to/teki_solves_fb72717580279/having-trouble-context-switching-438d</guid>
      <description>&lt;h3&gt;
  
  
  Having Trouble Context Switching?
&lt;/h3&gt;

&lt;p&gt;Let’s face it—being a fullstack developer means jumping from styling and UI work to deep-diving into CSS, React, or HTML, then flipping over to backend code and frameworks. It’s a totally different mindset, and honestly, it’s easy to forget the exact syntax or best practices along the way. No shame in that! We’ve all been there—sometimes the quality of your code slips, or you lose precious time just trying to remember how something works. And then, of course, you still have to deploy.&lt;/p&gt;

&lt;p&gt;That’s where a handy guide comes in. The &lt;a href="https://tekisolve.gumroad.com/l/qbuul" rel="noopener noreferrer"&gt;Modern Web Developer’s Reference Kit&lt;/a&gt; is your quick-access cheat sheet for those moments when your brain just can’t keep up. No more endless Googling or second-guessing yourself—just grab what you need and get back to building.&lt;/p&gt;

&lt;p&gt;👉 &lt;a href="https://tekisolve.gumroad.com/l/qbuul" rel="noopener noreferrer"&gt;Check it out here!&lt;/a&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>programming</category>
      <category>javascript</category>
      <category>beginners</category>
    </item>
    <item>
      <title>No More Googling: Developer Cheat Sheet Kit</title>
      <dc:creator>Teki Solves</dc:creator>
      <pubDate>Wed, 09 Jul 2025 16:07:08 +0000</pubDate>
      <link>https://dev.to/teki_solves_fb72717580279/no-more-googling-developer-cheat-sheet-kit-4apn</link>
      <guid>https://dev.to/teki_solves_fb72717580279/no-more-googling-developer-cheat-sheet-kit-4apn</guid>
      <description>&lt;h1&gt;
  
  
  No More Googling: Developer Cheat Sheet Kit
&lt;/h1&gt;

&lt;p&gt;Ever catch yourself searching for the same command over and over? I have. And let’s be honest—it’s not about not knowing how to code. It’s about working smart, not just hard. The real mark of an expert isn’t memorizing every detail, but knowing exactly where to look when you need answers fast.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Every Developer Needs a Go-To Reference
&lt;/h2&gt;

&lt;p&gt;When you’re deep in a big project, you’re not thinking about CSS rules or that one SQL query—until you need them. Maybe you solved a problem months ago and now you need a quick reminder. Or you’re juggling deadlines, talking to stakeholders, and the last thing you want is to lose momentum hunting for a line of code you know is out there.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Save Time:&lt;/strong&gt; Stop wasting hours searching for the same snippets or commands.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Stay Focused:&lt;/strong&gt; Keep your flow, even when you hit a roadblock.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Work Smarter:&lt;/strong&gt; Have the essentials at your fingertips, so you can spend more time building and less time searching.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The Real Value of a Cheat Sheet
&lt;/h2&gt;

&lt;p&gt;Here’s the truth: even if a cheat sheet doesn’t give you the exact answer, it gets you closer. Sometimes, seeing what doesn’t work is just as valuable—it points you in the right direction, helps you remember what you don’t want, and sparks the solution you need. That’s the real power of having a solid reference kit by your side.&lt;/p&gt;

&lt;h2&gt;
  
  
  For Developers Who Want to Move Faster
&lt;/h2&gt;

&lt;p&gt;This isn’t about shortcuts or skipping the learning. It’s about having a reliable toolkit that keeps you moving, especially when the pressure is on. Whether you’re prepping for a meeting, fixing a bug, or just need a quick refresher, the Developer Cheat Sheet Kit is designed to be your silent partner—always ready, always helpful.&lt;/p&gt;

&lt;h2&gt;
  
  
  Take a Look and Share Your Thoughts
&lt;/h2&gt;

&lt;p&gt;Even if you’re not looking to buy right now, I’d love for you to check out my Gumroad page and let me know what you think. Your feedback means a lot and helps me make these resources even better for the community.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;See the kit here:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
&lt;a href="https://tekisolve.gumroad.com/l/qbuul" rel="noopener noreferrer"&gt;https://tekisolve.gumroad.com/l/qbuul&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you’ve ever felt stuck, lost time searching, or just want to work a little smarter, this kit was made for you. Take a look, and let me know your thoughts right here.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>programming</category>
      <category>javascript</category>
      <category>beginners</category>
    </item>
    <item>
      <title>The Moment It Clicked: Why I Created the Ultimate Cheat Sheet Kit</title>
      <dc:creator>Teki Solves</dc:creator>
      <pubDate>Mon, 07 Jul 2025 18:21:49 +0000</pubDate>
      <link>https://dev.to/teki_solves_fb72717580279/the-moment-it-clicked-why-i-created-the-ultimate-cheat-sheet-kit-2115</link>
      <guid>https://dev.to/teki_solves_fb72717580279/the-moment-it-clicked-why-i-created-the-ultimate-cheat-sheet-kit-2115</guid>
      <description>&lt;h2&gt;
  
  
  The Moment It Clicked: Why I Created the Ultimate Cheat Sheet Kit
&lt;/h2&gt;

&lt;p&gt;I remember the exact moment it hit me. I was knee-deep in code, tabs everywhere, bouncing between my own scattered cheat sheets. It was late, I was tired, and I thought—why am I making this so hard for myself? That’s when the idea landed. What if I just brought all my best cheat sheets together? One single, powerful reference for everything I actually use as a developer.&lt;/p&gt;

&lt;p&gt;I started pulling together my notes, the quick fixes, the little reminders that have saved me over and over. It felt like cleaning up my mental desktop. Suddenly, I could see the bigger picture. This wasn’t just about making my life easier—it was about helping anyone who’s ever felt stuck or overwhelmed by the endless search for the right snippet or command.&lt;/p&gt;

&lt;h3&gt;
  
  
  What You Get
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Instant answers for real-world coding challenges&lt;/li&gt;
&lt;li&gt;All the essentials for React, JavaScript, CSS, Tailwind, TypeScript, SQL and Git in one place&lt;/li&gt;
&lt;li&gt;Clear, practical examples that actually work&lt;/li&gt;
&lt;li&gt;A resource you can rely on whether you are prepping for an interview or just want to code smarter&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Why This Matters
&lt;/h3&gt;

&lt;p&gt;I know what it’s like to feel lost in the noise. I’ve been there, and I built this kit for people like us—people who want to spend less time searching and more time building. This is the guide I wish I had when I started out. Now it’s yours.&lt;/p&gt;

&lt;h2&gt;
  
  
  Ready to Level Up?
&lt;/h2&gt;

&lt;p&gt;If you are tired of wasting time hunting for answers, grab the Modern Web Developer’s Reference Kit now. Make your coding life easier, faster, and a whole lot more fun.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Get your kit here and let’s build something amazing together: &lt;a href="https://tekisolve.gumroad.com/l/qbuul" rel="noopener noreferrer"&gt;Gumroad Link&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>cheatsheet</category>
      <category>programming</category>
      <category>coding</category>
    </item>
  </channel>
</rss>
