machichdigital
RegelCursor RulesLizenz: CC0 1.0frei kopierbar

Dragonruby Best Practices

Cursor-Regel mit Best Practices speziell für das DragonRuby-Game-Framework.

⬇ Als Datei laden

× kopiert× heruntergeladenBewertung:

Cursor-Regel mit Best Practices speziell für das DragonRuby-Game-Framework.

Original-Beschreibung der Autoren: Cursor rules for DragonRuby development with best practices integration.

Die Regel

---
description: "Cursor rules for DragonRuby development with best practices integration."
globs: **/*
alwaysApply: false
---
You are an expert game developer in Ruby using the DragonRuby Game Toolkit.

Code Style and Structure

- Write concise, idiomatic Ruby code with accurate examples.
- Follow Ruby and DragonRuby conventions and best practices.
- Use object-oriented and functional programming patterns as appropriate.
- Prefer iteration and modularization over code duplication.
- Use descriptive variable and method names (e.g., user_signed_in?, calculate_total).
- Structure files according to DragonRuby conventions.

Naming Conventions

- Use snake_case for file names, method names, and variables.
- Use CamelCase for class and module names.
- Follow DragonRuby naming conventions.

Syntax and Formatting

- Follow the Ruby Style Guide (https://rubystyle.guide/)
- Use Ruby's expressive syntax (e.g., unless, ||=, &.)
- Prefer single quotes for strings unless interpolation is needed.

Error Handling and Validation

- Use exceptions for exceptional cases, not for control flow.
- Implement proper error logging and user-friendly messages.

Follow the official DragonRuby Game Toolkit guides for best practices in routing, controllers, models, views, and other Rails components.

So nutzt du sie

Die Regel kopieren (Button oben) oder als Datei herunterladen und im Projekt unter .cursor/rules/ ablegen — Cursor lädt sie beim nächsten Start automatisch. Ältere Cursor-Versionen lesen alternativ eine einzelne .cursorrules-Datei im Projektstamm; dort einfach den Regel-Text ohne den Kopfblock zwischen den ----Zeilen einfügen.

Der Regel-Text ist englisch — Cursor versteht ihn unabhängig von der Sprache, in der Sie mit dem Editor chatten.

Im Detail

Cursor-Regel mit Best Practices für DragonRuby, ein kommerzielles 2D-Game-Framework auf Ruby-Basis. Gibt der KI Konventionen für Spiel-Loop-Struktur, Performance-typische Fallstricke (z. B. Objekt-Allokation pro Frame) und DragonRuby-eigene Idiome vor, statt generischen Ruby-Code zu erzeugen. Relevant nur für das kleine Publikum, das tatsächlich mit DragonRuby entwickelt — für allgemeine Ruby- oder Gamedev-Projekte ohne DragonRuby wenig nützlich. Aus der CC0-Sammlung, frei verwendbar.

Praxis-Tipp

Nur einsetzen, wenn im Projekt konkret die DragonRuby-Engine läuft — bei generischem Ruby führt die Regel eher zu falschen Annahmen über die Laufzeitumgebung.

Lizenz & Quelle

Inhalt ansehen (dragonruby-best-practices.mdc)
Lade …

Erfahrungen & Kommentare.

Funktioniert der Regel bei Ihnen? Tipps, Stolperfallen, Varianten — teilen Sie es mit der Community.

Lade Kommentare …

Ihre IP-Adresse wird zum Schutz vor Missbrauch gespeichert und nach 14 Tagen automatisch entfernt (Datenschutz).

Passt dazu.