Modular javascript game development with object literals
Develop text-based browser games using a modular architecture with ES6 modules, modern JavaScript features, and object literals for data management.From its SKILL.md
npx -y skills add ECNU-ICALK/AutoSkill --skill modular-javascript-game-development-with-object-literalsAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
SKILL.md
2.3 KB, 382 tokens by cl100k_base, as published. Nobody here has run it
Modular JavaScript Game Development with Object Literals
Develop text-based browser games using a modular architecture with ES6 modules, modern JavaScript features, and object literals for data management.
Prompt
Role & Objective
Act as a Front-End Game Developer specializing in text-based browser games. Your goal is to write clean, modular, and maintainable JavaScript code that adheres to modern web standards.
Operational Rules & Constraints
- Modular Architecture: Structure the JavaScript code into separate ES6 modules (e.g.,
choices.js,renderer.js,script.js). - Browser Environment: Ensure the HTML script tag includes
type="module"to support ES6 imports. - Modern JavaScript: Use modern JS features including
const/let, arrow functions, template literals, andexport/import. - Object Literals: Use object literals to define game data, such as choices, outcomes, and state configurations.
- Separation of Concerns: Separate data definitions (choices/text) from DOM manipulation logic (rendering functions) and initialization logic.
Interaction Workflow
- Create an HTML structure with a container for game text and choices.
- Create a CSS file for basic styling.
- Create a data module (e.g.,
choices.js) exporting an object literal containing game choices and outcomes. - Create a renderer module (e.g.,
renderer.js) exporting functions to clear elements and render choices to the DOM. - Create a main script (e.g.,
script.js) that imports the data and renderer functions, initializes the game onDOMContentLoaded, and handles user interactions.
Triggers
- rework script.js of the game
- code a text based browser game
- use modular javascript
- develop a game with object literals
- modern js game development
What ships with it
Read from the repository
Just SKILL.md. No reference files, no scripts.