<?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: Thumbyard</title>
    <description>The latest articles on DEV Community by Thumbyard (@thumbyard).</description>
    <link>https://dev.to/thumbyard</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%2F4256892%2Fcca862cd-d8f5-4fa4-91c4-3a9d576573d5.png</url>
      <title>DEV Community: Thumbyard</title>
      <link>https://dev.to/thumbyard</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/thumbyard"/>
    <language>en</language>
    <item>
      <title>The numbers behind a one-button wall jump</title>
      <dc:creator>Thumbyard</dc:creator>
      <pubDate>Sat, 21 Nov 2026 07:29:58 +0000</pubDate>
      <link>https://dev.to/thumbyard/the-numbers-behind-a-one-button-wall-jump-247d</link>
      <guid>https://dev.to/thumbyard/the-numbers-behind-a-one-button-wall-jump-247d</guid>
      <description>&lt;p&gt;We made a small browser game called Wall Jump Tower. You press one button. Your climber jumps from one wall to the&lt;br&gt;
other while lava rises under you. It runs in the browser with no sign-up:&lt;br&gt;
&lt;a href="https://thumbyard.com/go/wjt-devto" rel="noopener noreferrer"&gt;https://thumbyard.com/go/wjt-devto&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;With one button there is nothing to hide behind. If the jump feels a little off, the player has no other input to&lt;br&gt;
blame, so the jump is the whole game. Before we tuned anything we studied&lt;br&gt;
Celeste, Super Meat Boy, N++, Mega Man X and Hollow Knight, and wrote down every constant we could trace to a source.&lt;br&gt;
This post is what we kept, with our real values.&lt;/p&gt;
&lt;h2&gt;
  
  
  Gravity is three numbers, not one
&lt;/h2&gt;

&lt;p&gt;Our climber launches at 610 px/s. Gravity depends on what the player is doing:&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="n"&gt;p&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;vy&lt;/span&gt; &lt;span class="o"&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="n"&gt;vy&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt; &lt;span class="o"&gt;?&lt;/span&gt; &lt;span class="mi"&gt;2000&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;inp&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;hold&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&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;vy&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;90&lt;/span&gt; &lt;span class="o"&gt;?&lt;/span&gt; &lt;span class="mi"&gt;800&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1500&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;dt&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;if&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;vy&lt;/span&gt; &lt;span class="o"&gt;&amp;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;p&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;vy&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;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Rising: 1500 px/s^2.&lt;/li&gt;
&lt;li&gt;Falling: 2000 px/s^2. A heavier fall makes the arc feel snappy instead of floaty.&lt;/li&gt;
&lt;li&gt;Near the top of the arc while the button is held: 800. That gives a short hang where you can read the next wall.
Celeste does the same thing with its &lt;code&gt;HalfGravThreshold&lt;/code&gt; (half gravity while jump is held and vertical speed is under
40 px/s).&lt;/li&gt;
&lt;li&gt;Fall speed caps at 900 px/s, so a long drop stays readable on a phone screen.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Physics at a fixed 120 steps a second
&lt;/h2&gt;

&lt;p&gt;If physics steps once per drawn frame, a 60 Hz laptop and a 120 Hz phone give different jumps for the same&lt;br&gt;
tap, and a one-button game cannot afford that. Our physics runs at a fixed 1/120 s step from an accumulator, whatever&lt;br&gt;
the screen does. A run is just the list of steps where the button went down, so it replays the same on any screen.&lt;br&gt;
That is what makes the ghost of your best run, and challenge links to a friend, possible.&lt;/p&gt;

&lt;h2&gt;
  
  
  A 0.14 s grip before the wall slide
&lt;/h2&gt;

&lt;p&gt;When the climber touches a wall in the air it sticks for 0.14 s before it starts to slide (slides cap at 70 px/s).&lt;br&gt;
Without the grip, a tap that lands a hair late finds the climber already sliding away and the kick looks weak. With it,&lt;br&gt;
late taps still feel like clean kicks. Ice walls skip the grip on purpose.&lt;/p&gt;

&lt;h2&gt;
  
  
  Small helpers the player never sees
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Corner correction: if the head clips the corner of a ledge by a few pixels on the way up, we nudge the climber
sideways instead of killing the jump.&lt;/li&gt;
&lt;li&gt;Ledge pull-up: a jump that ends with the feet just under a ledge lifts onto it.&lt;/li&gt;
&lt;li&gt;The lava waits for your first press, so reading the level is free.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  When a one-button puzzle feels pixel perfect
&lt;/h2&gt;

&lt;p&gt;Level 9 has two circles that throw you upward. A playtester got stuck there and said it felt pixel perfect. We measured&lt;br&gt;
the tap window with a script that tries every press time: the first circle gave an average of 113 ms. The fix did not&lt;br&gt;
touch the jump numbers. A held press now fires a circle as you pass through it, and a press just before a circle waits&lt;br&gt;
for it instead of spending your air jump. The window went to 182 ms, and one held press from the floor now carries&lt;br&gt;
through both circles.&lt;/p&gt;

&lt;h2&gt;
  
  
  Animation follows physics, never the other way
&lt;/h2&gt;

&lt;p&gt;Every clip is timed in milliseconds, not display frames, so 60 Hz and 120 Hz look the same. A turn takes 100 ms, as in&lt;br&gt;
Hollow Knight, and a wall kick 167 ms (four frames at Hollow Knight's 24 fps wall-jump rate), and no animation ever delays a jump: physics decides,&lt;br&gt;
the sprite catches up.&lt;/p&gt;

&lt;p&gt;That is most of it. The game has 15 short levels, and every level keeps a ghost of your best&lt;br&gt;
run. If you try it, we would like to know which level stopped you first:&lt;br&gt;
&lt;a href="https://thumbyard.com/go/wjt-devto" rel="noopener noreferrer"&gt;https://thumbyard.com/go/wjt-devto&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Made by Thumbyard.&lt;/p&gt;

</description>
      <category>gamedev</category>
      <category>javascript</category>
      <category>webdev</category>
      <category>design</category>
    </item>
  </channel>
</rss>
