LogoRobo.js
TemplatesDiscord activities

2D Game

A 2D game template using KAPLAY for Discord Activities.

2D Game

A 2D game template using KAPLAY - a fun and simple JavaScript game library.

Getting Started

Create a project with this template:

npx create-robo@next <project-name> --template discord-activities/2d-game

Then navigate into your project directory:

cd <project-name>

Run development mode:

npm run dev

Features

This template includes:

  • KAPLAY game engine integration
  • Sprite loading and animation
  • Scene management
  • Basic game loop structure

Game Development

Build your game in the /src/app folder. KAPLAY provides:

vite.mjs
.env
  • Simple sprite handling
  • Collision detection
  • Scene transitions
  • Sound effects

Hosting

npm run deploy

On this page