<?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: Ramon Gebben</title>
    <description>The latest articles on DEV Community by Ramon Gebben (@ramongebben).</description>
    <link>https://dev.to/ramongebben</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.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F207318%2F22b92440-6970-4365-abdd-4192007475e0.jpg</url>
      <title>DEV Community: Ramon Gebben</title>
      <link>https://dev.to/ramongebben</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/ramongebben"/>
    <language>en</language>
    <item>
      <title>Building a Custom Stream Deck for My D&amp;D Table: Solving Gamepad Integration with a Custom SDK</title>
      <dc:creator>Ramon Gebben</dc:creator>
      <pubDate>Tue, 01 Oct 2024 11:16:20 +0000</pubDate>
      <link>https://dev.to/ramongebben/building-a-custom-stream-deck-for-my-dd-table-solving-gamepad-integration-with-a-custom-sdk-5c2h</link>
      <guid>https://dev.to/ramongebben/building-a-custom-stream-deck-for-my-dd-table-solving-gamepad-integration-with-a-custom-sdk-5c2h</guid>
      <description>&lt;p&gt;As a passionate Dungeons &amp;amp; Dragons player and tech enthusiast, I decided to elevate my game setup by creating a custom coffee table that features an embedded screen. This table displays maps, tokens, plays sound effects, and even shows artwork for players. All of this runs through a powerful platform called &lt;a href="https://foundryvtt.com/" rel="noopener noreferrer"&gt;Foundry VTT&lt;/a&gt;, which is similar to Roll20 but with a better pricing model and an extensive open module system. It's perfect for customizing your tabletop experience.&lt;/p&gt;

&lt;p&gt;While exploring ways to enhance my setup, I noticed modules that allowed stream decks to be integrated with Foundry. These tools provide quick access to macros and commands, making gameplay even smoother. However, after seeing the price of a stream deck (200+ euros!), I wasn't ready to make that investment.&lt;/p&gt;

&lt;p&gt;Then I remembered something – a few years ago, I built an arcade machine. Though the machine has long since been dismantled, I still had the buttons and controller boards from the project. With a bit of creativity and a 3D printer, I made my own custom "stream deck" by printing a small box with slots for the buttons.&lt;/p&gt;

&lt;p&gt;Now I had the hardware ready, but integrating it with Foundry VTT presented a challenge. I wanted to use the &lt;a href="https://developer.mozilla.org/en-US/docs/Web/API/Gamepad_API" rel="noopener noreferrer"&gt;Gamepad API&lt;/a&gt; in the browser to register my button presses, but I was shocked by the lack of flexibility in how the API handled inputs. The default approach was to use a &lt;code&gt;while(true)&lt;/code&gt; loop to constantly poll for the pressed state of each button. While this works fine in a game loop using &lt;code&gt;requestAnimationFrame&lt;/code&gt;, for my purposes, it felt inefficient and frankly, stupid. I wanted to simply respond to button presses with event listeners, not constantly check the gamepad state in an endless loop.&lt;/p&gt;

&lt;p&gt;This led me to create the &lt;a href="https://github.com/RamonGebben/Gamepad-SDK" rel="noopener noreferrer"&gt;Gamepad SDK&lt;/a&gt; I'm sharing today.&lt;/p&gt;

&lt;p&gt;With this SDK, I simplified the process by allowing developers to add event listeners for button presses, releases, and axis changes directly – no polling required. It also includes support for connecting and disconnecting gamepads, which makes it easy to integrate with platforms like Foundry VTT or any browser-based project.&lt;/p&gt;

&lt;p&gt;By using this SDK, anyone can hook up their custom controller to a browser-based app without the hassle of manually checking gamepad states. For my D&amp;amp;D table, it now means I can seamlessly use my makeshift stream deck to control in-game macros, actions, and more – all thanks to a few buttons and a little code.&lt;/p&gt;

&lt;p&gt;If you're interested, check out the SDK, and feel free to reach out if you're looking to solve similar problems!&lt;/p&gt;

&lt;p&gt;The Github: &lt;a href="https://github.com/RamonGebben/Gamepad-SDK" rel="noopener noreferrer"&gt;https://github.com/RamonGebben/Gamepad-SDK&lt;/a&gt;&lt;br&gt;
NPM: &lt;a href="https://www.npmjs.com/package/@pindakaasman/gamepad-sdk" rel="noopener noreferrer"&gt;https://www.npmjs.com/package/@pindakaasman/gamepad-sdk&lt;/a&gt;&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>typescript</category>
      <category>gamedev</category>
      <category>dnd</category>
    </item>
    <item>
      <title>lock-your-pc.com: A page made for people that do not lock their PC's</title>
      <dc:creator>Ramon Gebben</dc:creator>
      <pubDate>Fri, 31 Jan 2020 12:48:10 +0000</pubDate>
      <link>https://dev.to/ramongebben/lock-your-pc-com-a-page-made-for-people-that-do-not-lock-their-pc-s-5epk</link>
      <guid>https://dev.to/ramongebben/lock-your-pc-com-a-page-made-for-people-that-do-not-lock-their-pc-s-5epk</guid>
      <description>&lt;p&gt;The last couple of weeks in the office I noticed more and more tardiness when it come to locking PC's.&lt;br&gt;
Since the "shock images" like tubgirl are fun and all you cannot have that being open when customers walk into the office.&lt;/p&gt;

&lt;p&gt;With this in mind I created &lt;a href="https://lock-your-pc.com"&gt;lock-your-pc.com&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Pop open this page on fullscreen to give tardy people a care.&lt;/p&gt;

</description>
      <category>privacy</category>
      <category>satire</category>
      <category>fun</category>
    </item>
  </channel>
</rss>
