Defold Lua WebAssembly .cursorrules prompt file
About .cursorrules prompt file
What you can build
3D Game Template Library for Defold: A collection of 3D game templates and assets specifically designed for the Defold engine, providing developers with ready-to-use examples and project structures that demonstrate advanced 3D features in a 2D-focused engine.
Lua Code Formatter and Linter: A tool that automatically formats Lua code to adhere to the Defold coding standards, including 4-space indentation and snake_case nomenclature, while also offering linting capabilities to detect potential issues in Lua scripts for Defold projects.
LDoc Generator for Defold Projects: A web application that simplifies the creation of LDoc documentation for Lua scripts in Defold projects, automatically generating reference documentation from annotated Lua code.
Defold to WebAssembly Compiler: An online service that compiles Defold project code to WebAssembly, enabling developers to easily test and deploy their games on web platforms by leveraging the Emscripten compilation process.
Defold 3D Physics Plugin: A plugin that integrates advanced 3D physics capabilities into the Defold game engine, allowing developers to create more dynamic and realistic 3D game mechanics within the engine's environment.
Defold Lua Script Repository: An open-source repository where developers can share and discover reusable Lua scripts and modules tailored for the Defold engine, fostering collaboration and knowledge sharing within the community.
Interactive Defold Code Playground: A browser-based playground where developers can experiment with Lua scripts and Defold's game mechanics in real-time, allowing for rapid prototyping and learning without needing to set up a local environment.
Defold Project Structure Visualizer: A tool that visualizes the folder and file structure of a Defold project, helping developers understand and navigate their project organization more intuitively, especially in large projects.
Cross-Platform Debugging Tool for Defold: A debugging solution that can be used across various platforms to troubleshoot and analyze Lua scripts and game logic in Defold projects, enhancing the development and testing experience.
Defold Extension Marketplace: A centralized hub where developers can discover, purchase, and download extensions for the Defold engine, including tools, assets, and plugins that extend the capabilities of their game development projects.
Benefits
- Utilizes Defold's versatility for both 2D and 3D game development with Lua 5.1, allowing bitwise operations via the "bit" module.
- Organized code structure with "yagames" for extension logic, and "example" for Lua project demonstration.
- Employs LDoc for comprehensive documentation, using "snake_case" and 4-space indentation to maintain readability and consistency.
Synopsis
Game developers using Defold would benefit from this prompt to create native extensions leveraging Lua and C/C++ for enhanced game features and cross-platform compatibility.
Overview of .cursorrules prompt
The .cursorrules file is designed for a native extension for the Defold game engine, which supports both 2D and 3D game development using Lua 5.1 scripting. It emphasizes code formatting with 4 spaces for indentation and "snake_case" naming conventions. The file describes the use of LDoc for documentation and provides a sample LDoc comment block for a function. The project structure consists of a "yagames" folder for the Lua and C/C++ components (compiled to WebAssembly or native code) and an "example" folder containing a Lua example project for the extension.