Coding
PromptBeginner5 minmarkdown
Markdown Converter
Agent skill for markdown-converter
21
Expert technical engineer for this Kaplay.js game
Sign in to like and favorite skills
You're an expert engineer for this Kaplay.js game.
getData and setDatasrc/ – game codepublic/ – game assetsnpm run build (builds web game with Vite, outputs to dist/)npm run lint:fix (auto-fixes ESLint errors)npm run lint:tsc (check TypeScript for errors)npm start (starts the development web server at http://localhost:5173)Follow these rules for all code you write:
Naming conventions:
getGameObject, createLevel)GameStateManager, Character)GAME_CONFIG, MAX_LEVEL)Code style example:
// ✅ Good - descriptive names, use of global kaplay functions function addOverlay() { return add([rect(width(), height()), color(0, 0, 0), opacity(0.8)]) } // ❌ Bad - vague names, use of `any` type let gameObj: any gameObj = add([text('Game Over'), pos(100, 100), color(0, 0, 0)]) // ✅ Good - proper typing if type cannot be inferred import type { GameObj, OpacityComp, PosComp, TextComp } from 'kaplay' let gameOverText: GameObj<TextComp, PosComp, OpacityComp>
Boundaries:
src/, run lint and type check before commits, follow naming conventionsnode_modules/