moymo,Docs
Skip to content
Games: the Moymo SDK

How it works ​

Read this once before you start. It explains the handful of ideas the rest of these pages use.

The pieces ​

What it is
Your game in the Developer PortalMade with New game at developer.moymo.net/games. It gets an app key, such as starfall-outpost, which never changes.
moymo.tomlA file next to your project that lists what your game tells Moymo: its events, moments, presence lines, achievements and stats. You write it; Moymo reads nothing else.
The generated codemoymo push turns moymo.toml into C# or C++ that you call: Ev.LevelFinished, Rp.Playing(3), Ach.FirstBanner. A name that is not in the file does not compile.
The SDK in your gamemoymo.dll with a thin layer for your engine. It never blocks a frame and never throws.
Moymo for WindowsThe Moymo program on the player's PC. The game talks to it, and it talks to Moymo. It asks the player what to allow, records clips of the big moments, and shows friends what the player is doing.
Your server (optional)If your game has a server, it can report achievements and stats to Moymo itself, with a server key. See Your game's server.

How data travels ​

Your game ──► moymo.dll ──► Moymo for Windows ──► Moymo          (every game)
Your server ──────────────────────────────────► Moymo          (if you have one)

From the game. The game calls the SDK. Moymo for Windows passes it on to Moymo, but only what the player allowed. If Moymo for Windows is not running, nothing is sent and the game runs as before.

From your server. Your server calls the Server API with its server key. That is the way to report what must not be faked, because a player cannot change your server. See Fair play.

What the game tells Moymo ​

ExampleWhat happens
Events"a raid was repelled, wave 3, no losses"Nothing is sent. The SDK turns events into stats, moments and achievements, as moymo.toml says.
Statspopulation 25, raids repelled 14Kept by the SDK on the player's PC, or by Moymo when your server sets them. Rules read them.
AchievementsNot a ScratchShown on the player's Moymo profile, and on Steam too if you want. Unlocked by your code, by an event, or by a rule about stats.
MomentsRaid repelled · wave 3Moymo for Windows keeps a clip of it, if the player records clips.
PresenceDefending the settlement · wave 3The line friends read under the player's name, in their own language.

The game never sends free text. Presence lines and moment titles are written in moymo.toml, in every language, and take only numbers and listed words. So a game cannot put anything on a player's profile that you did not write.

Sandbox and live ​

Every game has two versions of moymo.toml:

  • Sandbox is for you. moymo push puts a change there at once. Only your team and your Testers see what the sandbox version does.
  • Live is what players see. moymo push --env live uploads it, and the game goes live after one review in the Go live tab.

The game says which one it uses when it starts (Environment::Sandbox or Environment::Live). Server keys are per environment too: an mk_test_ key works only with the sandbox.

The player decides ​

The first time a game connects, Moymo for Windows shows the player what the game would like to do, one module at a time: presence, moments, achievements. The player can allow some and refuse others, and change their mind later. Nothing from a module reaches Moymo before the player allows it, and that includes what your server sends.

Each game sees a different id for the same player, so games cannot join what they know about someone.

Where to go next ​

  1. Your engine: Unity, Unreal Engine or C and C++.
  2. moymo.toml: everything the file can say.
  3. Fair play: what Moymo checks, and what to send from your server.
  4. Your game's server, if you have one.
  5. When something does not work.

The wiki is for Moymo's members and developers. Something wrong or missing? Use "Suggest a change" on any page.