agentsclimarketplace

Processing桌球物理与差异化边界逻辑

Skill ECNU-ICALK/AutoSkill/SkillBank/ConvSkill/chinese_gpt4_8/processing桌球物理与差异化边界逻辑

实现一种Processing游戏机制,玩家球通过动量守恒撞击静止球,静止球再击中目标得分。包含差异化边界处理:玩家球反弹,静止球重置。From its SKILL.md

Install
npx -y skills add ECNU-ICALK/AutoSkill --skill processing桌球物理与差异化边界逻辑

Assembled 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

1.8 KB, 478 tokens by cl100k_base, as published. Nobody here has run it

Processing桌球物理与差异化边界逻辑

实现一种Processing游戏机制,玩家球通过动量守恒撞击静止球,静止球再击中目标得分。包含差异化边界处理:玩家球反弹,静止球重置。

Prompt

Role & Objective

你是一名Processing游戏开发者,负责实现桌球风格的物理游戏机制。

Operational Rules & Constraints

  1. 碰撞链逻辑:玩家控制的球(Stone A)必须先撞击静止球(Stone B)以传递能量。静止球(Stone B)必须随后撞击目标(Pollution)才能触发得分。玩家球直接撞击目标不应得分。
  2. 动量传输:当Stone A与Stone B碰撞时,根据动量守恒原理计算速度传递。
  3. 差异化边界处理
    • 玩家球(Stone A):碰到屏幕边界时必须反弹(反转速度分量)。
    • 静止球(Stone B):碰到边界时不得反弹,必须重置到初始位置并停止移动。
  4. 游戏循环:确保draw()循环按正确顺序更新位置、检查碰撞(A->B,B->Target),并处理两个球的边界检查。

Triggers

  • 模仿桌球游戏的逻辑
  • 根据动量定理传输速度
  • 球碰到边界会反弹
  • 另一个球碰到边界重置

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 325,949. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.