Adding Games
This guide walks you through packaging your game files and uploading them to PlayRen's storage system so they can be deployed to game servers.
Packaging Your Game
Games must be packaged as tar.gz archives before upload. The archive should contain the complete, ready-to-run game directory.
Ren'Py Games
For a Ren'Py game, build the Linux distribution first:
- Open your project in the Ren'Py Launcher.
- Go to Build Distributions.
- Select Linux as the target platform.
- Build the distribution.
This produces a directory with the game executable and all required files.
Creating the Archive
Package the build output into a tar.gz archive:
# Navigate to the directory containing your game build
cd /path/to/your/builds
# Create the archive
tar -czf my-game.tar.gz my-game-linux/Archive Structure
The archive should extract to a single top-level directory containing:
my-game-linux/
game/
script.rpy
...
lib/
linux-x86_64/
...
renpy/
...
my-game.sh # The launcher script
The launcher script (.sh file) is what PlayRen uses to start your game. Make sure it has execute permissions.
Pre-Upload Checklist
Before uploading, verify:
- The game runs on Linux x86_64 without errors.
- The launcher script is present and executable.
- No Windows-only dependencies are included.
- All game assets (images, audio, scripts) are included in the archive.
- The archive extracts cleanly to a single directory.
Uploading via Storage API
Once packaged, upload your game to the storage server using the partner API.
Upload Endpoint
PUT /api/games/{slug}/upload
Content-Type: application/gzip
Authorization: Bearer {your-api-key}
Replace {slug} with a URL-friendly identifier for your game (e.g., my-visual-novel). The slug must be unique within your partner catalog.
Example Upload
curl -X PUT \
https://storage.play.ren.bd/api/games/my-visual-novel/upload \
-H "Authorization: Bearer your-api-key-here" \
-H "Content-Type: application/gzip" \
--data-binary @my-game.tar.gzUpload Response
A successful upload returns:
{
"status": "ok",
"slug": "my-visual-novel",
"size": 524288000,
"checksum": "sha256:abc123..."
}Updating a Game
To update an existing game, simply upload a new archive to the same slug. The old version is replaced, and game servers will fetch the updated version on the next cache refresh.
Active sessions continue using the old version until they end. New launches will use the updated files.
Game Distribution to Servers
After upload, game files are distributed on-demand to game servers:
- A user launches your game.
- The scheduler selects a server.
- If the server doesn't have your game cached, it downloads the archive from your storage endpoint.
- The archive is extracted and cached locally.
- Subsequent launches on that server use the cache.
Cache invalidation happens automatically when you upload a new version.
Troubleshooting
- Upload fails with 413 — your archive exceeds the size limit. Contact support for large games.
- Game won't launch — verify the launcher script is executable and the game runs on Linux.
- Missing assets — check that all files are included in the archive. Use
tar -tzfto list contents.
Next Steps
- Game Metadata — Provide required metadata for your game.
- API Reference — Full partner API documentation.