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.

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.
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!

MAI-Code-1-Flash

https://microsoft.ai/news/introducingmai-code-1-flash/
286•EvanZhouDev•3h ago•137 comments

CT scans of BYD car parts

https://www.lumafield.com/scan-of-the-month/byd
101•viasfo•1h ago•31 comments

Gmail thinks I'm stupid, so I left

https://moddedbear.com/gmail-thinks-im-stupid-so-i-left
426•speckx•2h ago•253 comments

Open Repair Data Standard – Open Repair Alliance

https://openrepair.org/open-data/open-standard/
61•cassepipe•2h ago•1 comments

My thoughts after using Clojure for about a month

https://www.acdw.net/clojure/
46•speckx•2h ago•8 comments

HP re-releases classic computer science calculator: The HP-16C

https://hpcalcs.com/product/hp-16c-collectors-edition/
76•dm319•3h ago•46 comments

A walking tour of surveillance infrastructure in Seattle (2020)

https://coveillance.org/a-walking-tour-of-surveillance-infrastructure-in-seattle/
352•eustoria•8h ago•213 comments

Adafruit receives demand letter from Fenwick legal counsel on behalf of Flux.ai

https://blog.adafruit.com/
572•semanser•12h ago•236 comments

The advertising cartel coming to your web browser

https://blog.zgp.org/the-advertising-cartel-coming-to-your-web-browser/
93•speckx•2h ago•27 comments

Show HN: Live breath detection and biofeedback from a phone microphone

https://github.com/shiihaa-app/shiihaa-breath-detection
15•felixzeller•6h ago•7 comments

How we index images for RAG

https://www.kapa.ai/blog/how-we-index-images-for-rag
52•mooreds•6h ago•7 comments

Trump signs downsized AI order after weeks of reversals

https://www.politico.com/news/2026/06/02/trump-signs-downsized-ai-order-00946389
140•_alternator_•5h ago•94 comments

Multicore suppport for DOS is real – partly

https://www.vogons.org/viewtopic.php?t=111336
38•beebix•2d ago•7 comments

Launch HN: Rudus (YC P26) – AI for concrete contractors

29•rishipankhaniya•3h ago•14 comments

Microsoft announces Scout, an autonomous AI agent built on OpenClaw

https://www.computerworld.com/article/4180103/microsoft-unveils-scout-an-autonomous-ai-agent-buil...
72•EvanZhouDev•4h ago•63 comments

Bringing Up DeepSeek-V4-Flash on AMD MI300X

https://fergusfinn.com/blog/deepseek-v4-flash-mi300x/
64•kkm•4h ago•6 comments

QBE – Compiler Backend – 1.3

https://c9x.me/compile/release/qbe-1.3.html
60•birdculture•4h ago•12 comments

Why Janet? (2023)

https://ianthehenry.com/posts/why-janet/
414•yacin•12h ago•220 comments

GitHub Copilot App

https://github.com/features/preview/github-app
89•theanonymousone•4h ago•62 comments

Review of the MoErgo Glove80 Keyboard (2024)

https://arslan.io/2024/04/22/review-of-the-moergo-glove80-keyboard/
10•akyuu•1d ago•3 comments

Expanding Project Glasswing

https://www.anthropic.com/news/expanding-project-glasswing
144•surprisetalk•9h ago•189 comments

Fidonet: Technology, Use, Tools, and History (1993)

https://www.fidonet.org/inet92_Randy_Bush.txt
136•BruceEel•8h ago•50 comments

Preparing for KDE Plasma's Last X11-Supported Release

https://blog.davidedmundson.co.uk/blog/596/
121•jandeboevrie•8h ago•152 comments

Love systemd timers

https://blog.tjll.net/you-dont-love-systemd-timers-enough/
315•yacin•12h ago•206 comments

Age verification for social media, the beginning of the end for a free internet?

https://mullvad.net/en/blog/age-verification-for-social-media-the-beginning-of-the-end-for-a-free...
422•StrLght•22h ago•324 comments

MAI-Thinking-1

https://microsoft.ai/news/introducing-mai-thinking-1/
150•LER0ever•3h ago•66 comments

Great Question (YC W21) Is Hiring Applied AI Interns

https://www.ycombinator.com/companies/great-question/jobs/J5TNvQH-ai-engineer-intern
1•nedwin•10h ago

BQN: What Is a Primitive?

https://mlochbaum.github.io/BQN/commentary/primitive.html
31•tosh•3d ago•2 comments

Made a Tool to Streams Changes from Microsoft SQL Server to Apache Kafka

https://github.com/Niyko/Athena
12•hyvr_official•2d ago•2 comments

Show HN: RePlaya – self-hosted browser session replay with live tailing

https://github.com/s2-streamstore/replaya
33•shikhar•4h ago•6 comments