Better HN
topnewbestaskshowjobs
Log inSign up

phaser

1,460 karma · joined Feb 6, 2012 (14y ago) · 275 submissions

cristian at informationsuperhighway dot games
Submissions

comment 5mo ago · link · parent

I love this idea! I totally see it in the classroom or being played by someone who's trying to learn how to make an OS (which is on my personal bucket list)

What I didn't like, is the tutorial is separate from the game. It would be awesome imo, if there's a tutorial stage where the game is explained hands-on (maybe pausing the game with explainers, until I start to get how to play) Otherwise I have to memorise the instructions before trying the game.

Regardless, amazing little game.

comment 5mo ago · link · parent

Here is a blog article I wrote when the game was super early but it's outdated.

https://explodi.tubatuba.net/2025/09/26/using-deno-as-my-gam...

I also asked claude to give me a 1-paragraph summary of how our stack works. Anyway, if you have more questions i'm happy to answer e-mail (check my profile)

Robotic text below:

The whole thing is TypeScript end-to-end, run by Deno, which acts as the glue. In the browser, there are just two pieces communicating over a native WebSocket: a React front end bundled by Vite—Deno runs Vite for the development server and hot reload—and a Deno back end that owns the simulation.

The simulation runs on a tick loop, with each tick representing roughly one in-game day and taking about one second of wall-clock time. The client sends small command events such as `newBuilding` and `bulldoze`. The server processes each tick and broadcasts all resulting state changes in a single batched frame. This makes the client essentially a renderer of authoritative server state, with a full resynchronization whenever it reconnects.

Under the hood, the simulation distributes heavy workloads—including demographics, taxes, and housing markets—across Web Workers. These workers coordinate through a shared SQLite database used as a cross-thread bus, allowing the game to simulate tens of thousands of citizens.

The 3D layer uses Three.js with WebGPU, a WebGL2 fallback, TSL shaders, and batched draw calls. It runs imperatively in its own `requestAnimationFrame` loop inside one large component, deliberately avoiding React Three Fiber. React manages only the 2D HUD and menus layered on top, keeping the performance-critical rendering loop entirely outside React’s reconciliation process.

The key point for prototyping is that the browser application—the client plus a local server connected over WebSocket—is the entire game. The desktop builds are simply thin native shells around the exact same application. On macOS, the shell uses Tauri with Rust and the operating system’s WKWebView. On Windows and Linux, it uses Electron with bundled Chromium.

Each shell launches the server, compiled into a single self-contained binary using `deno compile`, as a sidecar process. It then finds an available localhost port and points its webview at the bundled client. This means the game can be built and iterated entirely in the browser, with native packaging added only at the end.

33.

The Baffling World of Masayoshi Son's Presentations (2020)(bloomberg.com ↗)

100 points · by phaser · 5mo ago · 52 comments

comment 5mo ago · link · parent

For Linux, it was an ABI nightmare, the Steam sandbox is based on Debian 11, and glibc/GTK/webkit can't be reliably static-linked to a modern version that Tauri wants. We also ship a stand-alone version in itch.io that doesn't have the limitations of the sandbox but it was a friction point for many players having to figure out how to meet the dependencies.

For Windows, it was a bit less dramatic, but WebView2 is controlled by Windows Update in Windows 10, Some players have it, some players don't. And requiring windows 11 and up is a very unpopular choice. Maybe could have been solved by vendoring it but also not super clean.

I look forward to give it a try again, when Steamworks Linux runtime 4.0 comes around, and less people are still using Windows 10.

comment 5mo ago · link · parent

is it also a game? godspeed!

comment 5mo ago · link · parent

I am the freaky outlier that's actually excited about this.

My city builder game, Microlandia[1], runs on Deno. The game's graphics and UI is a Three.js/React app, but the guts of the game are in a "sidecar" process that is a `deno compile` typescript executable.

On Mac, there's a Tauri shell that runs both client and server, and for Linux and Windows we use Electron, (Tauri proved to be quite problematic except when in macOS)

Why on earth did I choose this cursed stack instead of a "proper" game engine? Well,

Turns out developing the simulation in typescript with a performant sqlite driver hot reloads very fast and with a light code editor and my browser open on a second window I see the stuff updating live as I make it.

Deno has a good VSCode extension with test helpers and a fast language server. WebGPU is good enough for me to write any cool shader I can think of and I don't miss any capability of a game engine.

More importantly, not using Unity/Unreal brought back to me the joy of game development that I had lost due to and horrendous UI-driven workflow that takes me back to Macromedia Flash (yes, I am that old). Oh, and the licensing.

And I know I could switch to Bun with small changes in code but Deno has never got in my way. Maybe it's because I avoid using libraries at all costs (and don't need much).

Also, Typescript/React is such an amazing language for building a complex tycoon/simulation type of game that deals with a lot of data and displays it. Anyone who's worked on Unity knows it's the dark ages for UI over there.

I'm unsure if i'll port the game to Deno Desktop anytime soon but if I start a game again I will use this stack again, as my game engine, this time without Electron or Tauri.

1. https://microlandia.city

comment 5mo ago · link · parent

They could. But they rather get their "wisdom" from Steve Jobs trivia romanticizing the grind and being an asshole.

Like Elon Musk, who once wrote in a company-wide email in 2018: "Walk out of a meeting or drop off a call as soon as it is obvious you aren't adding value"

comment 5mo ago · link · parent

Is someone here using a Claude product that's not code? I'm puzzled about the amount of products they put out. I know a lot of people using Claude but we're all using the terminal-based code. Even for non-engineering stuff it suits great (tax documents, 3D modeling with blender through MCP, academic research, etc.)

comment 5mo ago · link · parent

I loved your game. I'm wondering about the decision of making the game with a registration on your website instead of a more traditional approach of having a standalone game. The friction point for me was having to register to save progress. I would gladly pay in Steam or itch.io for a game that i can download and play locally.

I'm guessing the decision is about making a online leaderboard?

comment 5mo ago · link · parent

Unhoused people do exist, and they vote for you so it's in there. Also shelters with real costs based on good data. Modeling slums is actually quite hard. There were unhoused camping sites in the early access version but I was unhappy with how it turned out and retired the feature back to the drawing board.

I want it to come back because it's in the spirit of the game not to hide the "ugly" aspects of city life.

There is gentrification in the way that landlords discriminate low income renters and NIMBYs have political power over you (in the form of the 'disagreement aura')

There's no rules against building single family homes in a city center, but the effect is what you would expect: non optimal tax revenue as you could zone it for something that's worth a lot more.

comment 5mo ago · link · parent

Social housing and bikes are on the roadmap :)

Regarding the unit economics for finance sector, you are right, the calculations are way too simple, and I'm not entirely happy with it, so I'm looking to improve it, but it does need to be a sweet spot between 1. realistic enough to be educatioal and 2. simple enough you can use it as a gameplay mechanic.

Before the end of the year there will be mod support, and I will pay special attention to making sure that modders can swap the economic formulas for more sophisticated models.

comment 5mo ago · link · parent

It's my main activity but I also work on other stuff to make ends meet.

comment 5mo ago · link · parent

We use Goxel. https://goxel.xyz

comment 5mo ago · link · parent

less than 2%

comment 5mo ago · link · parent

> How difficult was it to get on Steam and other vendors?

Not difficult at all. Pay the fee, get something going.

> Are there any artists you'd recommend working with? I need a 3D/Blender artist, especially.

My e-mail is on my profile, happy to send a few intros your way.

comment 5mo ago · link · parent

I love the idea. Are you thinking about an Apple TV or iOS version for connecting to the media server from the living room?

comment 5mo ago · link · parent

Only Apple Silicon is supported. It's unavailable for Intel, sadly.

comment 5mo ago · link · parent

awesome, i used notion in the past for this but it never felt right.

comment 5mo ago · link · parent

Loving the art style! I'm also bullish on the simulation games that can be created with newer architectures.

comment 5mo ago · link · parent

As someone who worked on HR Tech in 2024-2025, I think you're really solving a problem here. Cat is out of the bag already it's not like HR can go back to the pre-AI world ... I'm also puzzled by the flags. Congrats on your project :)

I like the landing page.

comment 5mo ago · link · parent

I continue to work on my city builder game Microlandia, launched here in HN ~6 months ago. I originally predicted a few dozen urbanism nerds would play it, but now almost 10,000 copies sold. I'm still a solo developer but now I collaborate with 2D, 3D and music artists. Which is good because the original art that I drew myself for the launch was horrible.

I'm currently working on modeling energy, climate and new policies like universal basic income

https://microlandia.city

comment 6mo ago · link · parent

Thanks I didn't know about kiwix, but, let's consider the fact that a wiki, or netflix movies are cheap or free, while AI is actually quite expensive at least for now, and i'm not sure if it's because of real costs or to justify the valuation.

So there is a bigger incentive to run locally something that's gonna get you $20 or $100 worth of bills to OpenAI than to mirror something that is actually free.

Example: In the past there was a whole market for sound cards, if you wanted your computer to have any "multimedia" capabilities you needed to get a sound blaster but now everybody assumes a computer will produce sound, and it's basically for free as all chips have it. Now sound interfaces are still a thing but only for audiophiles who are esoteric enough like me to believe that it's worth to have that extra hi-fi quality.

What I think it could happen, is that eventually AI will be part of all the chips, just like soundcards. And there will be people who will buy specialized AI from companies that perhaps are not OpenAI or Anthropic but second-generation sleepers who watched the carnage in the market and decided to enter when it was reasonable.

This could be Apple, or Nvidia or something new. They're just waiting for the others to do the research and introduce the taste for it to the masses, just like sound blaster made us fall in love with high fidelity sound in our computers.

comment 6mo ago · link · parent

Technology doesn't always work like that.

A new game is a totally new world with everything created from scratch. A creation. A model, on the other hand, is a reinterpretation machine for hundreds of years of human creations, but not a creation in itself, more like a discovery.

You would think that by now we would have a much better Bitcoin that's taking over the payment networks of the world but what we actually got is a shitload of shitcoin.

comment 6mo ago · link · parent

You can run mediawiki at home but you won't have wikipedia. You can run a video server but you won't have all the movies that Netfix has. A local model is actually the real thing.

comment 6mo ago · link · parent

What intrigues me the most about AI progress, is not AGI or the model du jour by $AI_UNICORN, but rather what can be run locally. I remember having an amusing, but rather useless model in a beefy gaming PC that I had 6 years ago; and now, something that’s a hundred times better on my M5 laptop.

Should the market react to the memory shortage, the progress of the Apple silicon continue at the same pace, and what we’ll be able to run locally in 6 years will be very exciting. or frightening.

Also I don’t know what this means for the valuation of the AI companies. I remember asking about this very idea to one of their employees at an event and instead of answering he bailed out to grab a cocktail.

comment 6mo ago · link · parent

I didn't learn anything about tulips, markets, or the tulip market in this article.

comment 6mo ago · link · parent

I see. I'm adding an option to "disable" a building, so you'll be able to suspend a city service due to budget constraints or any other reason.

comment 6mo ago · link · parent

The camera is very very close to isometric but as you've noticed, it's not an ortographic projection. During early access I decided against it but tbh I can't recall why. I'll go back to the drawing board on this one (or at least allow it to be enabled in settings)
12345
10