First AI change: Pink Demo
Use this exercise to make one small AI-assisted change to an existing game. Run the Demo, ask Chat to analyze and modify it, review the diff, run it again, and build a Web version.
Download the ZIP from the official Pink Demo repository using Code → Download ZIP, or clone it:
git clone https://github.com/SUD-GLOBAL/pink-game-demo.gitAfter extracting the ZIP or cloning, follow Open an existing COCOS project.
Before you begin
- Open the Pink Demo root directory obtained from the official repository.
- Confirm that
main.scene,ClickGame.ts, the target image, and the click animation exist. - Use the validated COCOS Creator 3.8.8 environment.
- Run the unchanged game. It starts at 0 points; clicking the target adds 1 point and moves it; resetting returns the score to 0.
1. Understand Pink Demo
Open assets/main.scene and locate the target, score, and reset button. This fixed gameplay provides a repeatable baseline for the exercise; it is not a built-in PinK feature.
COCOS scene nodes define the interface. Edit layout, colors, images, and static text in the scene editor. ClickGame.ts handles scoring, movement along fixed positions, and resetting. Select GameController to see its Score Label, Target, and Reset Button references in the Inspector, bound to the corresponding component or nodes.
2. Ask Chat to understand the project
Open Chat and ask it to read the project first:
Analyze Pink Demo without changing files. Read assets/main.scene and
assets/scripts/ClickGame.ts. Explain click scoring, the fixed movement route,
and reset logic, and list the files that need verification.Then request a small change, such as: “Change only the text of Canvas/ResetButton/Label to Play Again. Preserve node names, component references, and reset behavior.” The button's static text is stored in the scene, so this change does not require a script edit.
3. Review the changes
Before accepting, confirm that Chat changed only the expected files, preserved scoring, movement, and reset logic, and did not modify caches or install unrelated dependencies.
4. Run and correct
Save the changes and run main.scene. Verify 0 points initially, 1 point and movement after a click, and 0 points after resetting. If a check fails, give Chat the earliest error, relevant files, and expected and actual results.
5. Build
After the runtime checks pass, open Build & Publish → Native Platform → web desktop. Confirm that main.scene is the startup scene, then select Build.
Continue with Create a game with AI to define context, constraints, and acceptance criteria for your own tasks.