Op

OpenGB – modular game back end engine with first-class scripting

Hacker News

OpenGB – modular game back end engine with first-class scripting

I’m tired of getting screwed by game backends like Microsoft PlayFab and Unity Gaming Services. To get a simple cross-platform friends system, we’ve bent over backward fighting against their limited APIs to jerry-rig the behavior we need. These backends “solved” their platform’s rigidity by tacking on a clunky scripting layer [1] [3] with a proprietary KV database [2] [4] (look ma, no transactions!). They proceed to claim you can build a LiveOps game on this rubbish without testing, database migrations, monitoring, BI tooling, etc. We got fed up and built an open-source backend engine as an alternative: Open Game Backend. OpenGB is comprised of four components: the engine, modules, scripts, & registries. Modules & Registries No two games have identical use cases, but these game backends try to provide the same API to everyone. For example, PlayFab has 44 API endpoints for their economy API [5], yet every developer I know still finds it too restrictive to use in a serious game. Instead, OpenGB assumes game developers will start with off-the-shelf modules, then fork & write new modules as their needs grow. Everything down to auth, tokens, & rate limiting are implemented as modules so they can be modified. Forking a module is as simple as `opengb fork <module>` to pull code in to the repo. Scripts I love niche game engines & languages, so I’ve seen a lot of weird tooling. But these cloud scripts are some of the most tedious platforms I’ve written code for. Even their example code has race conditions [6] and requires 306 LOC to implement a simple transaction [7]. We built the scripting API to feel as much like a game engine as possible. All of the complexities of database queries/migrations, schema validation, and networking are abstracted away in a cozy engine-like scripting environment where game devs feel at home. It's dead simple to write a leaderboard module from scratch in a couple minutes: https://opengb.dev/build/crash-course Official Registry We don’t intend to ship a truckload of half-baked services like PlayFab & UGS does. We want to build a solid engine that others can extend with modules. To help developers bootstrap their backends, we maintain an official registry of modules (written by us & external contributors) that are thoroughly reviewed for performance, testing, & docs. We hope other devs also share their registries, similar to the Unity Asset Store community. See: https://opengb.dev/modules/overview We’re currently working with a few studios rolling OpenGB out to production. If you give it a spin, we’d love to hear your thoughts below or in our Discord: https://rivet.gg/discord Documentation: https://opengb.dev GitHub: https://github.com/rivet-gg/opengb A few more notes: - Licensed permissively under Apache 2.0, go nuts - Leverages PostgreSQL’s features & extensions, similar to Supabase - Generates type-safe client SDKs & Open API specs for your modules - Supports Deno, NodeJS, Cloudflare Workers [1] https://learn.microsoft.com/en-us/gaming/playfab/features/automation/cloudscript/writing-custom-cloudscript [2] https://learn.microsoft.com/en-us/gaming/playfab/features/entities/entity-objects [3] https://docs.unity.com/ugs/en-us/manual/cloud-code/manual/scripts [4] https://docs.unity.com/ugs/en-us/manual/cloud-save/manual [5] https://learn.microsoft.com/en-us/rest/api/playfab/economy/catalog [6] https://github.com/Unity-Technologies/com.unity.services.samples.use-cases/blob/main/Assets/Use%20Case%20Samples/Daily%20Rewards/Config%20as%20Code/DailyRewards_Claim.js#L38 [7] https://github.com/Unity-Technologies/com.unity.services.samples.use-cases/blob/main/Assets/Use%20Case%20Samples/Command%20Batching/Config%20as%20Code/CommandBatching_ProcessBatch.js

Share card

Actual performance

20points
4comments
Made the leaderboard

Launch Intel predictions

Analyze your own launch →
Indie HackersFits the IH revenue-focused audience · Strong signals: supports, ios · Missing: reddit linkedin, podcasting, created
92%92% predicted probability of success on Indie Hackers, based on ML models trained on real launch data.
best fitHighest predicted score across all platforms for this description.
Product HuntOn track for Day 1 leaderboard · Strong signals: new, notes, code · Missing: mac, agents, macos
79%79% predicted probability of success on Product Hunt, based on ML models trained on real launch data.
Hacker NewsStrong engagement from HN community · Strong signals: ide, game engine, io · Missing: https docs, excited, just released
68%68% predicted probability of success on Hacker News, based on ML models trained on real launch data.
nativeThis product was originally launched on this platform.
TrustMRRLess likely to generate early MRR · Strong signals: ios, way · Missing: mobile apps, personal, entrepreneurs
40%40% predicted probability of success on TrustMRR, based on ML models trained on real launch data.
AppSumoMay struggle as an AppSumo deal · Strong signals: platform · Missing: plus, intuitive, reviews
26%26% predicted probability of success on AppSumo, based on ML models trained on real launch data.
Acquire.comPre-revenue stage for this audience · Missing: arr, mrr, revenue
14%14% predicted probability of success on Acquire.com, based on ML models trained on real launch data.
BetaListMay not resonate with beta-testers · Strong signals: reward · Missing: web3, chat, crypto
0%0% predicted probability of success on BetaList, based on ML models trained on real launch data.

Correct prediction on native model

Similar products

Th
The Class Placements Game42%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

The Class Placements Game

Hacker News7
To
Toy – A thin C++ game engine74%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Toy – A thin C++ game engine

Hacker News180
I
I wrote my own RTS game engine in C73%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

I wrote my own RTS game engine in C

Hacker News1,102
AB
ABC Game Engine61%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

ABC Game Engine

Hacker News1
Te
Tectonic Game Engine73%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Tectonic Game Engine

Hacker News1
Ti
TinyEngine – Game Engine for Microcontrollers69%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

TinyEngine – Game Engine for Microcontrollers

Hacker News1
A
A UIKit Game Engine73%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

A UIKit Game Engine

Hacker News33
NX
NX: The modular front-end framework enters beta58%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

NX: The modular front-end framework enters beta

Hacker News1
NX
NX: The modular front-end framework enters beta58%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

NX: The modular front-end framework enters beta

Hacker News3
NX
NX, the modular front-end framework enters beta 258%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

NX, the modular front-end framework enters beta 2

Hacker News2