Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added docs/assets/quickstart_gamemaker.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
58 changes: 58 additions & 0 deletions docs/quickstart/quickstart-gamemaker.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# 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 ](#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.

<img src={require('../assets/quickstart_gamemaker.gif').default} alt="GameMaker example" style={{maxWidth: '40%', height: 'auto', display: 'block', margin: '0 auto'}} />

## What you'll need

- Node.js (version 22.2.0+)
- [GameMaker 2024.1400.3](https://releases.gamemaker.io/release-notes/2024/1400_3) or later (this version adds direct exporting to Reddit)

## Environment setup

1. Install Node.js and npm ([instructions](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm))
2. Go to [developers.reddit.com/new](https://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:

```sh
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:

```
https://www.reddit.com/r/my-app_dev?playtest=my-app
```

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](https://github.com/YoYoGames/GameMakerRedditTemplate/blob/main/docs/HowToBuild.md).

## 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](https://github.com/YoYoGames/GM-RedditDemo/blob/main/source/Reddit_gml/scripts/reddit_demo_server_api/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](https://github.com/reddit/devvit-template-gamemaker/blob/main/src/server/index.ts) — Handles incoming requests from GameMaker, accesses Reddit APIs, and stores data in Redis.
7 changes: 6 additions & 1 deletion sidebars.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,12 @@ const sidebars: SidebarsConfig = {
{
type: "doc",
id: "quickstart/quickstart-unity",
label: "Quickstart for Unity Games",
label: "Quickstart for Unity",
},
{
type: "doc",
id: "quickstart/quickstart-gamemaker",
label: "Quickstart for GameMaker",
},
],
},
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
58 changes: 58 additions & 0 deletions versioned_docs/version-0.12/quickstart/quickstart-gamemaker.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# 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 ](#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.

<img src={require('../assets/quickstart_gamemaker.gif').default} alt="GameMaker example" style={{maxWidth: '40%', height: 'auto', display: 'block', margin: '0 auto'}} />

## What you'll need

- Node.js (version 22.2.0+)
- [GameMaker 2024.1400.3](https://releases.gamemaker.io/release-notes/2024/1400_3) or later (this version adds direct exporting to Reddit)

## Environment setup

1. Install Node.js and npm ([instructions](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm))
2. Go to [developers.reddit.com/new](https://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:

```sh
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:

```
https://www.reddit.com/r/my-app_dev?playtest=my-app
```

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](https://github.com/YoYoGames/GameMakerRedditTemplate/blob/main/docs/HowToBuild.md).

## 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](https://github.com/YoYoGames/GM-RedditDemo/blob/main/source/Reddit_gml/scripts/reddit_demo_server_api/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](https://github.com/reddit/devvit-template-gamemaker/blob/main/src/server/index.ts) — Handles incoming requests from GameMaker, accesses Reddit APIs, and stores data in Redis.
7 changes: 6 additions & 1 deletion versioned_sidebars/version-0.12-sidebars.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,12 @@
{
"type": "doc",
"id": "quickstart/quickstart-unity",
"label": "Quickstart for Unity Games"
"label": "Quickstart for Unity"
},
{
"type": "doc",
"id": "quickstart/quickstart-gamemaker",
"label": "Quickstart for GameMaker"
}
]
},
Expand Down