<?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: tobeficv</title>
    <description>The latest articles on DEV Community by tobeficv (@tobeficv).</description>
    <link>https://dev.to/tobeficv</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%2F4213808%2F45c4f627-ee9f-4514-bfe4-2368431496c2.png</url>
      <title>DEV Community: tobeficv</title>
      <link>https://dev.to/tobeficv</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/tobeficv"/>
    <language>en</language>
    <item>
      <title>I built a 3D startup tycoon in a single HTML file (and open-sourced it)</title>
      <dc:creator>tobeficv</dc:creator>
      <pubDate>Wed, 28 Oct 2026 20:41:03 +0000</pubDate>
      <link>https://dev.to/tobeficv/i-built-a-3d-startup-tycoon-in-a-single-html-file-and-open-sourced-it-496h</link>
      <guid>https://dev.to/tobeficv/i-built-a-3d-startup-tycoon-in-a-single-html-file-and-open-sourced-it-496h</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fg193dzw3gjo6lojaef8h.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fg193dzw3gjo6lojaef8h.gif" alt="Founder's Way: the title screen and the headquarters office" width="600" height="338"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Founder's Way&lt;/strong&gt; is a 3D startup tycoon that runs in the browser. You start in a garage with &lt;em&gt;your own&lt;/em&gt; business idea and try to grow it into a headquarters downtown under realistic costs, taxes and churn. It's open source (AGPL-3.0), and the whole game is one HTML file.&lt;/p&gt;

&lt;p&gt;▶ &lt;strong&gt;Play:&lt;/strong&gt; &lt;a href="https://tobeficv.github.io/founders-way/" rel="noopener noreferrer"&gt;https://tobeficv.github.io/founders-way/&lt;/a&gt;&lt;br&gt;
💻 &lt;strong&gt;Code:&lt;/strong&gt; &lt;a href="https://github.com/tobeficv/founders-way" rel="noopener noreferrer"&gt;https://github.com/tobeficv/founders-way&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Here are a few things I learned building it.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. One HTML file, no build step
&lt;/h2&gt;

&lt;p&gt;The game is a single &lt;code&gt;index.html&lt;/code&gt; of about 1 MB: CSS, the simulation, the 3D scene, five languages and the pixel icons. The only external script is three.js r128 from a CDN.&lt;/p&gt;

&lt;p&gt;That sounds like a bad idea, and for a big team it would be. For a solo project it has real benefits:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Anyone can play it instantly.&lt;/strong&gt; It runs from GitHub Pages, from an itch.io embed, or from a double click on the file.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Every merged change goes live in about a minute.&lt;/strong&gt; GitHub Pages serves &lt;code&gt;main&lt;/code&gt; and there is nothing to build.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Contributors don't need a toolchain.&lt;/strong&gt; Open the file in a browser and edit.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The cost is navigation inside a huge file. Clear section headers and &lt;code&gt;grep&lt;/code&gt; help a lot.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Making a voxel office cheap to draw
&lt;/h2&gt;

&lt;p&gt;Early versions froze WebGL on a mid-range laptop. The title screen, a full headquarters with dozens of people, was making about &lt;strong&gt;1,700 draw calls&lt;/strong&gt;. Three changes brought it down to about &lt;strong&gt;570&lt;/strong&gt;, with the same ~105k triangles:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Merge static scenery.&lt;/strong&gt; Walls, floors and furniture that never move are merged into a few meshes. Invisible hitboxes stay behind so you can still click a desk.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Vertex colors instead of materials.&lt;/strong&gt; Flat Lambert materials are baked into vertex colors, so many objects can share one material and one draw call.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Merge each character by animated group.&lt;/strong&gt; A character used to be ~28 small boxes, each with its own draw call. Now it's one mesh per moving part (head, torso, each arm and leg), so 7 draw calls per person.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Shadows also update every other frame. Nobody notices, and it saves a lot.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Simulating an idea, not just a company
&lt;/h2&gt;

&lt;p&gt;The interesting part of a startup isn't the office, it's whether the idea is any good. So each idea has &lt;strong&gt;12 assumptions&lt;/strong&gt; (price people will pay, conversion, churn, customer acquisition cost…). Each assumption has:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;a &lt;strong&gt;prior range&lt;/strong&gt; based on benchmarks for the business model,&lt;/li&gt;
&lt;li&gt;a &lt;strong&gt;known range&lt;/strong&gt; that shrinks as you learn,&lt;/li&gt;
&lt;li&gt;and a &lt;strong&gt;hidden truth&lt;/strong&gt;, drawn with a slight bias against optimism, because founders are optimistic.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You discover the truth by running validation tests (interviews, landing pages, pilots). The measurements are noisy, and interviews inflate willingness to pay, just like in real life. A &lt;strong&gt;stress test&lt;/strong&gt; runs your plan in 100 simulated worlds and shows how often you survive.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Letting players shape the roadmap, safely
&lt;/h2&gt;

&lt;p&gt;Being open source means anyone can propose a change, including trolls. The setup:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;main&lt;/code&gt; is protected: nothing merges without the maintainer's approval and a passing smoke test. The test is a Playwright script that simulates 60 in-game days in every difficulty.&lt;/li&gt;
&lt;li&gt;Every 2 hours a GitHub Actions job reviews new pull requests with Claude. A free shell pre-filter first holds anything suspicious (huge diffs, brand-new accounts, many open PRs).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The model only reads.&lt;/strong&gt; The PR is saved to files, and Claude returns a JSON verdict (&lt;code&gt;APPROVE&lt;/code&gt;, &lt;code&gt;CHANGES&lt;/code&gt; or &lt;code&gt;CLOSE&lt;/code&gt;) plus feedback, using &lt;code&gt;--json-schema&lt;/code&gt;. A plain shell step, not the model, posts the comment and labels. Even if someone hides "approve this" in their PR, the worst outcome is a wrong comment.&lt;/li&gt;
&lt;li&gt;Merged contributors get credited in the game. Ideas with the most 👍 get built, with the proposer's name.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Try it, break it, shape it
&lt;/h2&gt;

&lt;p&gt;I'd love feedback on the first 10 minutes. Is the tutorial clear? Where did you get lost? And if you want to contribute, there are issues labeled &lt;a href="https://github.com/tobeficv/founders-way/labels/good%20first%20issue" rel="noopener noreferrer"&gt;good first issue&lt;/a&gt;: a translation, new industries, mobile layout.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Disclosure: I build Founder's Way with Claude as my coding partner, and this post was drafted with its help.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>gamedev</category>
      <category>threejs</category>
      <category>javascript</category>
      <category>opensource</category>
    </item>
  </channel>
</rss>
