Contributing to CASCADA Framework
Thank you for your interest in the project! Here's how you can help.
Development Setup
Requirements
- Node.js 18+
- pnpm 8+
- Git
Installation
bash
git clone <repository-url>
cd games
ppnpm install
pnpm devDevelopment Process
1. Create Branch
bash
git checkout -b feature/my-awesome-feature2. Make Changes
Follow project structure:
- Platform →
src/platform/(Phaser base only) - Core →
src/core/(universal systems) - Game →
src/game/(LINX-specific)
Important: Respect layer hierarchy:
Game → uses Core + Platform
Core → uses Platform
Platform → uses Dependencies only3. Testing
bash
# TypeScript check
pnpm lint
# Run in dev mode
pnpm dev4. Commit
Use Conventional Commits:
bash
git commit -m "feat: add new core system"
git commit -m "fix: correct collision detection"
git commit -m "docs: update architecture guide"Commit types:
feat:- new featurefix:- bug fixdocs:- documentation changesstyle:- code formattingrefactor:- refactoringtest:- adding testschore:- dependency updates, etc.
5. Push and Pull Request
bash
git push origin feature/my-awesome-featureCreate Pull Request with description:
- What was added/fixed
- Why it's needed
- How to test
Code Style
TypeScript
- Use strict typing
- Avoid
any, use specific types - Prefer
interfaceovertypefor objects
typescript
// Good
interface PlayerConfig {
x: number;
y: number;
speed: number;
}
// Bad
type PlayerConfig = any;Naming Conventions
- Classes: PascalCase (
PlayerEntity,GameScene) - Variables: camelCase (
playerSpeed,maxHealth) - Constants: UPPER_SNAKE_CASE (
MAX_PLAYERS,DEFAULT_SPEED) - Files: PascalCase for classes, camelCase for utilities
Comments
typescript
/**
* JSDoc comments for public methods
*/
export function calculateDistance(x1: number, y1: number): number {
// Regular comments for complex logic
return Math.sqrt(x1 * x1 + y1 * y1);
}File Structure
Adding New Scene
typescript
// src/game/scenes/MyNewScene.ts
import Phaser from "phaser";
export class MyNewScene extends Phaser.Scene {
constructor() {
super({ key: "MyNewScene" });
}
create(): void {
// Your code
}
}Then add to src/game/config/game.config.ts:
typescript
scene: [
BootScene,
PreloaderScene,
MainMenuSceneVue,
MyNewScene, // ← Add here
],Adding New Core System
typescript
// src/core/systems/MySystem.ts
import Phaser from "phaser";
/**
* Universal system for all games
*/
export class MySystem {
constructor(scene: Phaser.Scene) {
// System logic
}
}Important: Core systems must be universal, not game-specific!
Testing
Manual Testing
- Run
pnpm dev - Check in browser
- Open DevTools and check console
- Test on different resolutions
TypeScript Check
bash
pnpm lintDocumentation
When adding new systems:
- Update
README.mdif architecture changes - Add examples in
docs/if you created a new system - Use JSDoc comments for complex code
Questions?
- Create an Issue with question
- Check existing documentation in
/docs - Ask in Discord (if available)
License
By contributing to the project, you agree to the MIT license.
Thank you for contributing!