Introduction to Custom Services

Introduction to Custom Services


Top level header for an Introduction to Custom Services.

This article was written on Pragma Engine version 0.0.94.

Introduction to Custom Services #

In the first article of our Custom Services series, we’ll walk you through how Pragma Engine can support a plethora of unique and customizable services for your backend needs.

The articles in this series will provide a detailed overview of Pragma Engine’s custom services by teaching you how they work and how to design them yourself, as well as how to enable database storage and further service integration with Pragma Engine’s already provided services. You can also view our Custom Services Concepts page for more information.

The Basics #

Although games share similar genres, settings, stories, and gameplay, each game is ultimately unique. To support the universal uniqueness of every game, you can use Pragma Engine’s existing infrastructure to build your own entirely unique service or feature alongside our provided services and feature sets. These in-house constructed and designed services are called custom services, and they’re the key to customizing your unique game.

A book with a feather quill, inkwell, and mechanical gears.

Custom services can be entirely independent from Pragma Engine’s preexisting Game and Social mode interactions, integrated into the engine’s preexisting services completely, or they can adopt a mix of different integration approaches. They allow you the flexibility to add additional features to preexisting services, or to create something entirely new. Custom services can be as simple or as complex as you’d like, and due to the sheer size of options available when defining a custom service, they can be quite complex and detailed.

For example, you can extend an already existing service, such as the Inventory service, to further support your specific game’s questing and mission needs. Or you can define an entirely new custom service to support a leaderboard tracker in-game.

A flowchart showcasing how custom services operate.

Every piece in a custom service workflow.

Creating a custom service can be broken down into three distinct steps:

  1. Construct RPC calls for the custom service in protos and generate the calls for your PragmaSDK.

  2. Define the bulk of the custom service’s logic in a user-defined Kotlin file.

  3. Author or generate the game client files that communicate with your Pragma Engine custom service.

Make sure that you define your custom service’s protos, Kotlin logic, and configs entirely in 5-ext, or errors during engine updates and broken builds can occur.

You’ll need to already have your project’s PragmaSDK configured before interacting with any authored custom services; the SDK won’t be able to communicate with Pragma Engine otherwise. This process is done when onboarding to Pragma Engine with our support team.

The next article in this series will demonstrate how to create the RPCs for your custom service in protos.

For more information, check out the rest of the articles in this series:

Part I: Introduction to Custom Services (this article)
Part II: Creating a Custom Service
Part III: Using Database Storage for Custom Services
Part IV: Integrating Custom Services with Provided Services

Posted by Patrick Olszewski on May 11, 2023
Other posts

Contact Us

Pragma is currently working with a select group of studios in development.

A great underlying platform is essential in bringing players together. Pragma's technology lets us focus on the creative side of game development while offloading much of the complexity of shipping at scale.

Nate Mitchell

Founder of Mountaintop Studios and Oculus