Skip to main content

GameMaker Quickstart

This page walks you through building a GameMaker app for Devvit. Once complete, you'll see your GameMaker game running directly within a Reddit post.

If you are already familiar with Devvit and want to jump straight to exporting, see the Build and Deploy GameMaker Games to Devvit section.

Try it outโ€‹

The template creates a simple GameMaker game and demonstrates data exchange between Reddit and GameMaker.

What you'll needโ€‹

  • Node.js (version 22.2.0+)
  • GameMaker 2024.1400.3 or later (this version adds direct exporting to Reddit)

Environment setupโ€‹

  1. Install Node.js and npm (instructions)
  2. Go to developers.reddit.com/new and select the GameMaker template
  3. Complete the setup wizard (you'll need to create a Reddit account and connect it to Reddit Developers)
  4. Follow the instructions in your terminal

On success, you should see something like this:

Your Devvit authentication token has been saved to /Users/user.name/.devvit/token
Fetching and extracting the template...
Cutting the template to the target directory...
๐Ÿ”ง Installing dependencies...
๐Ÿš€๐Ÿš€๐Ÿš€ Devvit app successfully initialized!
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ โ€ข `cd my-app` to open your project directory โ”‚
โ”‚ โ€ข `npm run dev` to develop in your test community โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Running your appโ€‹

To run your app, navigate to your project directory with cd my-app and run npm run dev. You should see logs that conclude with:

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ โœ“ Playtest ready โ”‚
โ”‚ โžœ URL: https://www.reddit.com/r/my-app_dev/?playtest=my-app โ”‚
โ”‚ โžœ Version: v0.0.0.1 โ”‚
โ”‚ โžœ Open the URL above and refresh to see your latest changes. โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Follow this link to see your app.

Build and Deploy GameMaker Games to Devvitโ€‹

For step-by-step export instructions, see the GameMaker Reddit Template documentation.

Communicate between GameMaker and Redditโ€‹

GameMaker games communicate with Reddit through HTTP requests. The provided template includes working examples of this data exchange:

  • GameMaker client code: reddit_demo_server_api.gml โ€” Shows how to send requests from GameMaker to retrieve user data, save scores, and interact with Reddit features.
  • Devvit server code: src/server/index.ts โ€” Handles incoming requests from GameMaker, accesses Reddit APIs, and stores data in Redis.