Hacker News

Subscribe to Hacker News feed
Hacker News RSS
Updated: 1 hour 11 min ago

Show HN: Organic cell simulation with infinite zoom (100k cells, raw WebGL)

Sun, 07/26/2026 - 8:04am

Made this little cell simulation with an infinite zoom mechanic in raw WebGL. Renders up to 100k cells on my laptop (M1 MBA).

It's a single HTML file, not minified, without dependencies, so you can just inspect the source code. It's just raw JS and WebGL shaders. No assets, everything is procedurally generated.

For each cell, I draw a single quad using instanced rendering. To create a nice organic wobble, I use SDF (Signed Distance Fields) to draw a circle (or another base shape), which is then distorted by adjusting the radius using multiple overlapping sine waves. I explain this visually here. [1]

To get the cells to stretch dynamically based on their velocity, I use a technique called Domain Warping. Basically in the fragment shader, the fragmentPosition is adjusted inwards/outwards depending on the current velocity, which squashes/stretches the entire coordinate system of the quad in either direction. Gives it a very organic look. I explain this in more detail here. [2]

Physics are also custom, on the CPU using position-based dynamics (PBD). This is currently the weak point of the engine, and with lots of cells, it's CPU constrained. I might move this to the GPU later or switch to a different approach. Not sure yet.

The infinite zoom mechanic works by dynamically rendering only the two currently visible layers. Physics are currently simulated all the time for all layers, although I could potentially also pause layers that are not currently visible.

All of this uses data-oriented design (DOD) techniques to keep most of the data structures in flat typed arrays for fast iteration and to minimize allocations in the main game loop.

I'm planning to build this engine out into a full incremental game with some light automation elements (think a microscopic Factorio, but much shorter). If you're interested in following the dev process, I post highly technical deep-dives on YouTube [3], or you can enter your email here [4] to get source code updates (super low volume).

Let me know what you think! Happy to answer any questions.

[1] https://youtu.be/VChlSt6gVSo?t=380 [2] https://youtu.be/VChlSt6gVSo?t=516 [3] https://youtube.com/@philomatics [4] https://philomatics.com/cell-game

Comments URL: https://news.ycombinator.com/item?id=49057276

Points: 1

# Comments: 0

Categories: Hacker News

Zen Style Programming

Sun, 07/26/2026 - 8:01am

Article URL: https://t3x.org/zsp/index.html

Comments URL: https://news.ycombinator.com/item?id=49057251

Points: 1

# Comments: 0

Categories: Hacker News

Third Drone Shot Down in Three Days in Romanian Territory

Sun, 07/26/2026 - 8:00am

Article URL: https://english.mapn.ro/

Comments URL: https://news.ycombinator.com/item?id=49057248

Points: 2

# Comments: 0

Categories: Hacker News

ASK HN: Why has technology become so unreliable?

Sun, 07/26/2026 - 7:13am

Even tough I'm a software engineer with long experience with serious projects, I'm become so disillusioned with the whole thing nowadays.

Forget the ridiculous AI hype, forget about the lack of ethics and a moral compass; What's getting to me right now is the unreliability of it all. It seems like everything is held together with duct tape, and the tape is falling off.

Just in the last few months, all these have happened:

- My Macbook Air M1 has been acting up, refusing to charge in a stable manner. The audio jack is dead because apparently it is linked to the charging circuit. The screen sometimes shows a tint on a whim. Now it is dead and not charging at all. Granted, it has otherwise been a fine machine so far, and I've knocked it over a few times, but still. Even my old trusty 2014 Macbook Pro is still going strong, and I've abused that one much more.

- I thought I could use my old iPad in the meantime, but it can't connect to the WiFi hotspot on my iPhone, only a normal WiFi. I thought WiFi was just WiFi?

- I also can't use my old Macbook Pro well, because the replacement Transcend 256GB SSD I put in it around 2020 is now failing, causing the machine to unpredictably become very slow. Also, the HP business keyboard I bought some years ago is suddenly now emitting spurious key signals, which MacOS (curse its over-reliance on weird key combinations and gestures) is interpreting to do wild things, like repeatedly showing the desktop while I'm working, or zooming in and out repeatedly.

- Whenever I plug in the external Crucial SSD I bought a few years ago and partitioned, it does not show up in Finder on macOS. I almost always have to go in the Disk Utility to mount the partitions.

- The Dell travel hub I bought a few years ago seems to not work on a whim when I try to use to make an HDMI connection between my Macbook and my Samsung monitor. About 50% of the time, it simply does not work, not matter what I do. I tried using my Roku ox to cast my screen, but the Roku remote suddenly does not work. I also tried my old Apple TV; its remote was also not working properly. After somehow getting to work to connect to WiFi, the Apple TV also does not work, giving some cryptic error messages.

- a few days ago, my iPhone 12 mini simply refused to charge from my USB-C to lightning cable, no matter what I did, for hours. I borrowed a similar cable from a friend, it also did not work. So my phone died when I needed it. When I got home, I was able to charge with a USB-A to lightning cable.

- My Sony Bravia TV died suddenly. I took it to some repairers; they said the entire screen is kaput.

All these have happened in the last tree months. At this point I'm ready to give up, I plan to be very minimalist with my tech purchases )including Apple stuff), only getting the minimal stuff I need mostly for work, and keeping in mind that most of what i buy is throwaway, likely to stop working in a few years at most, and when you least expect that.

Comments URL: https://news.ycombinator.com/item?id=49056900

Points: 1

# Comments: 0

Categories: Hacker News

Pages