frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Vircadia, a Bun and PostgreSQL-powered reactivity layer for games

https://vircadia.com/
12•kaliqt•1y ago

Comments

kaliqt•1y ago
We gave Vircadia a full Gen 2 overhaul (big thanks to our sponsors such as Linux Professional Institute, Deutsche Telekom, etc. for enabling this), aiming to cut down on code bloat and boost performance. The main shift is swapping out our custom backend infrastructure for a battle-tested, high-performance system like PostgreSQL with Bun wrapping and managing every end of it.

It's kind of unheard of to do this for things like game dev (preferring custom solutions), but it works and makes things way easier to manage. The shape of the data in a database affects how well it works for a use case, and that model scales well for virtually every kind of software ever, the same should apply here!

Feel free to prototype some game ideas you might have been tossing around, our priority is DX for the project as a whole to enable more developers with less resources to build bigger worlds, so please do share feedback here and/or in GH issues!

Our roadmap is for more SDKs, and cutting down on bloat where possible, with the express goal of giving devs more cycles in the day to focus on the actual gameplay instead of tooling.

porridgeraisin•1y ago
Interested to know why Deutsche telekom sponsored this
nand_gate•1y ago
My guess is money laundering, given that the product is pretty vapourware-y (as a game dev in a past life: Vircadia looks more like 'how a web dev thinks multiplayer games work' aka basically unusable in a serious title).
kaliqt•1y ago
I think you fundamentally misunderstand the stack. Their main usage of the platform has to do with a E2E solution with avatars, audio, etc. all synced without issue. These features ship with the client and other private repositories wrapping the core.

However, for usage to HN users they would be (likely) more interested in the SDK, the core, the underlying system, and how it can fit their use cases.

If you want to understand a small part of the scale of this project, you are welcome to check out:

https://github.com/vircadia/vircadia-web https://github.com/vircadia/vircadia-web-sdk https://github.com/vircadia/vircadia-native-core

kaliqt•1y ago
For an E2E worlds solution, so this https://github.com/vircadia/vircadia-web and this https://github.com/vircadia/vircadia-native-core except heavily condensed so it's easier to modify/upgrade for each new bespoke use case.

Our old system, being very monolithic, while extremely performant and capable, was nearly impossible to adapt and change. So what we have now is much more dynamic but also still a work in progress, a more complete example will be published in the coming weeks.

ricardobeat•1y ago
The example shows using it to update player positions. Doesn’t Postgres add significant latency considering a 16-33ms budget for state updates? How well does this scale?
andyferris•1y ago
Generally client games optimistically carry on a few frames (and sometimes much more!) ahead of the what the server has responded with as accepted.

This is because gamers require low latency to effectively play, but things can be slightly out of sync and logic can be complex, and anti cheat can be hard to implement server side only (which is why eg fortnite and valarant install fancy client side anti cheat software too).

For a friendly game of stardew valley or turn based strategy you can afford to wait for transactions to complete and causality to be enforced.

kaliqt•1y ago
We CAN submit the change to the DB and not listen to the message on if it succeeded or not! The message will arrive eventually, it's just not necessary to await it, so you have options.
jasonjmcghee•1y ago
I had a similar reaction / question. Why not use KV store and get sub millisecond latency?
kaliqt•1y ago
So it's a bit of tradeoffs, we may add a second DB to the compose by the time we reach v1.0, but, if we had to pick the convergence of simplicity and flexibility to start, PostgreSQL is it.

We prototyped SQLite as well. It just wasn't working in the stack like we had needed.

The idea is simple: use as few components as possible to achieve the outcome. Better to have less than more initially, because we can simply add the more and extend the API, but ripping everything out and trying to trim it down is damn near impossible, especially when the platform garners widespread usage.

The decision to do the less then more instead of more then less approach was spurred by us (the wider project) always having way too much bulk and then finding it impossible to turn the ship when we needed to (https://github.com/vircadia/vircadia-native-core).

We need to be agile to reach the milestones we have set out, hence the differed approach using off the shelf parts and only adding what we need, when we need it.

kaliqt•1y ago
Postgres finishes its updates sub-ms in a reasonably sized DB if optimized correctly. In terms of upper-scale (>1000 players in a somewhat real-world scenario), we're working out benchmarks to test that.

Postgres is not slow by any stretch of the imagination, but it depends on how the schema is setup and what layers you have between the user and the DB, naturally any game developer will want to tweak the client+schema before going live. The layers between we manage to make it as minimal as possible, so that shouldn't be touched, if it's too slow for a reasonable use case, it means we have more optimization to do!

koakuma-chan•1y ago
I love that you use Bun.
kaliqt•1y ago
We have to cut bloat where we can if this is to work for higher up revision games, so Bun is the only answer that balances speed and simplicity (TypeScript native).
Drakim•1y ago
How does the system separate between state changes that must be confirmed by backed compared to state changes that can be updated locally (by prediction) to give the user more snappy experience?
reedf1•1y ago
I would love to get into some game design - and something like this seems intuitive enough from my perspective as a software engineer. Forgive me if this is a naive question, but is the use case for this single-player games or multiplayer games?
kaliqt•1y ago
Definitely multiplayer games, you wouldn't really need a syncing networking layer if you're doing single player as you can store state in any method you desire, something as simple as serializing JSON to the disk for example, or up to your server. But even then, a traditional setup like Supabase might be simpler to wrap your head around if you're just handing "user" data and not "player" data in a shared world.

It's time to talk about my writerdeck

https://veronicaexplains.net/my-first-writerdeck/
83•hggh•1h ago•57 comments

On The <dl> (2021)

https://benmyers.dev/blog/on-the-dl/
299•ravenical•7h ago•95 comments

Texas woman arrested for Facebook post about town water quality

https://reclaimthenet.org/texas-woman-arrested-for-facebook-post-about-town-water-quality
333•abawany•2h ago•136 comments

My two-part desk setup

https://arslan.io/2025/11/18/my-two-part-desk-setup/
127•James72689•2d ago•71 comments

Reverse engineering circuitry in a Spacelab computer from 1980

https://www.righto.com/2026/05/reverse-engineering-spacelab-computer.html
62•elpocko•4h ago•5 comments

Hengefinder: Finding When the Sun Aligns with Your Street

https://victoriaritvo.com/blog/hengefinder/
57•evakhoury•23h ago•14 comments

We made our filesystem 47× faster by deleting it

https://microsandbox.dev/blog/oci-filesystem-47x-faster
34•appcypher•4d ago•21 comments

Green card seekers must leave U.S. to apply, Trump administration says

https://www.nytimes.com/2026/05/22/us/politics/green-card-changes-trump.html
194•tlhunter•23h ago•500 comments

z386: An Open-Source 80386 Built Around Original Microcode

https://nand2mario.github.io/posts/2026/z386/
89•wicket•6h ago•19 comments

80386 Microcode Disassembled

https://www.reenigne.org/blog/80386-microcode-disassembled/
187•nand2mario•8h ago•32 comments

PHP's Oddities

https://flowtwo.io/post/php%27s-oddities
66•thejoeflow•3d ago•74 comments

SpaceX launches Starship v3 rocket

https://www.space.com/space-exploration/launches-spacecraft/spacex-starship-v3-megarocket-first-t...
280•busymom0•20h ago•196 comments

Making Deep Learning Go Brrrr from First Principles (2022)

https://horace.io/brrr_intro.html
125•tosh•8h ago•46 comments

The Art of Money Getting

https://kk.org/cooltools/book-freak-210-the-art-of-money-getting/
128•dxs•7h ago•87 comments

Italy Cancels Boeing Pegasus Order, Shifting to Airbus A330 MRTT

https://www.euronews.com/my-europe/2026/05/21/italy-moves-to-airbus-a330-tankers-in-major-nato-al...
167•embedding-shape•4h ago•52 comments

Project Glasswing: An Initial Update

https://www.anthropic.com/research/glasswing-initial-update
510•louiereederson•1d ago•299 comments

- -dangerously-skip-reading-code

https://olano.dev/blog/dangerously-skip/
50•fagnerbrack•10h ago•65 comments

Reflections on Building Forum Software

https://www.counting-stuff.com/reflections-on-building-forum-software/
9•sebg•2d ago•0 comments

Kindle loyalists scramble as Amazon turns page on old e-readers

https://www.reuters.com/business/retail-consumer/kindle-loyalists-scramble-amazon-turns-page-old-...
68•cf100clunk•4d ago•79 comments

Evaluating Spec CPU2026

https://chipsandcheese.com/p/evaluating-spec-cpu2026
15•zdw•4h ago•3 comments

Highest Random Weight in Elixir

https://jola.dev/posts/highest-random-weight-in-elixir
51•shintoist•2d ago•2 comments

sp.h: Fixing C by giving it a high quality, ultra portable standard library

https://spader.zone/sp/
147•dboon•3d ago•146 comments

Lisp in Vim (2019)

https://susam.net/lisp-in-vim.html
38•whent•5h ago•5 comments

Why Japanese companies do so many different things

https://davidoks.blog/p/why-japanese-companies-do-so-many
824•d0ks•1d ago•384 comments

Oura says it gets government demands for user data

https://this.weekinsecurity.com/oura-says-it-gets-government-demands-for-user-data-will-it-share-...
214•donohoe•6h ago•132 comments

Shipping a laptop to a refugee camp in Uganda

https://notesbylex.com/shipping-a-laptop-to-a-refugee-camp-in-uganda
640•lexandstuff•22h ago•228 comments

Rubish: A Unix shell written in pure Ruby

https://github.com/amatsuda/rubish
152•winebarrel•14h ago•92 comments

Solving the “Zork” Mystery

https://www.dpolakovic.space/blogs/zork-part2
47•dpola•4d ago•17 comments

Electrobun 2.0 will be decoupled from Bun due to the Rust rewrite

https://twitter.com/i/status/2058064720553222567
92•bundie•8h ago•93 comments

Improving C# Memory Safety

https://devblogs.microsoft.com/dotnet/improving-csharp-memory-safety/
126•soheilpro•2d ago•27 comments