IDE-Tools · Foto: Homedust, CC BY 2.0
Dragonruby Best Practices
Zuletzt aktualisiert:
Typ
Regel
Lizenz
CC0 1.0
Anwendungsfeld
Cursor Rules
Voraussetzungen
Keine besonderen — direkt loslegen.
Best Practices speziell für 2D-Spieleentwicklung mit dem DragonRuby-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
Bündelt Best Practices speziell für DragonRuby, ein kompaktes Ruby-basiertes Framework zur 2D-Spieleentwicklung, etwa zur Struktur des Game-Loops, zu Performance-Fallstricken und zum idiomatischen Umgang mit dem framework-eigenen API-Stil. Die Regel richtet sich an ein sehr spezifisches Nischenpublikum: Entwickler, die kleine bis mittlere 2D-Spiele mit DragonRuby statt mit Unity oder Godot bauen. Wer bereits Ruby kennt, aber neu bei DragonRuby ist, profitiert am meisten, da typische Anfängerfehler im Framework-Kontext vermieden werden. Für generische Spieleentwicklung ohne DragonRuby-Bezug ist die Regel nicht anwendbar.
Praxis-Tipp
In einem DragonRuby-Projekt aktivieren mit “@dragonruby-best-practices überprüfe die Struktur meiner tick-Methode”.
Lizenz & Quelle
- Lizenz: CC0 1.0
- Quelle: PatrickJS/awesome-cursorrules (GitHub)
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 …
Passt dazu.
AI Agent Specialist
Cursor-Regel für diszipliniertes, klar abgegrenztes Agenten-Verhalten statt unstrukturierter KI-Antworten.
Alpha Skills Quant Factor Research
Cursor-Regel für methodisch saubere quantitative Faktor-Recherche im Trading-Umfeld.
Android Jetpack Compose
Cursor-Regel für idiomatischen, deklarativen Android-UI-Code mit Jetpack Compose.
