Flame physics
Skill RadKod/claude-agents-kit/flutter-game/.claude/skills/flame-physics
Forge2D fizik entegrasyonu. Rigid body, collision, joint, gravity. Fizik tabanli oyun mekanigi icin kullan.From its SKILL.md
npx -y skills add RadKod/claude-agents-kit --skill flame-physicsAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
2 things 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.
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
1.6 KB, 426 tokens by cl100k_base, as published. Nobody here has run it
Forge2D Setup
# pubspec.yaml
dependencies:
flame_forge2d: ^0.18.0
Forge2D Game
class MyPhysicsGame extends Forge2DGame {
MyPhysicsGame() : super(gravity: Vector2(0, 10)); // asagi cekim
@override
Future<void> onLoad() async {
world.add(Player());
world.add(Ground());
world.add(Wall(position: Vector2(-20, 0), size: Vector2(1, 40)));
}
}
Dynamic Body (hareket eden obje)
class Player extends BodyComponent with ContactCallbacks {
@override
Body createBody() {
final shape = CircleShape()..radius = 1.0;
final fixtureDef = FixtureDef(shape)
..density = 1.0
..friction = 0.3
..restitution = 0.5; // ziplama
final bodyDef = BodyDef(
type: BodyType.dynamic,
position: Vector2(0, -10),
userData: this,
);
return world.createBody(bodyDef)..createFixture(fixtureDef);
}
void jump() {
body.applyLinearImpulse(Vector2(0, -50));
}
@override
void beginContact(Object other, Contact contact) {
if (other is Enemy) { /* hasar al */ }
}
}
Static Body (duvar, zemin)
class Ground extends BodyComponent {
@override
Body createBody() {
final shape = EdgeShape()..set(Vector2(-50, 10), Vector2(50, 10));
final fixtureDef = FixtureDef(shape)..friction = 0.5;
final bodyDef = BodyDef(type: BodyType.static);
return world.createBody(bodyDef)..createFixture(fixtureDef);
}
}
What ships with it
Read from the repository
Just SKILL.md. No reference files, no scripts.