This Claude skill serves as a comprehensive quick reference for the Flame engine, the most popular 2D game engine for Flutter. It provides developers with instant access to core API documentation, covering essential topics such as component lifecycles, collision detection, the effects system, and camera management to accelerate game development workflows.
Use Cases
Quickly looking up component lifecycle methods like onLoad, onMount, and update to ensure proper resource initialization and state management.
Implementing complex collision detection logic by referencing hitbox types (Rectangle, Circle, Polygon) and handling collision callbacks.
Configuring game cameras to follow targets, set world boundaries, and manage different viewport types for responsive game design.
Applying visual enhancements using the Effects system, including movement, rotation, and opacity transitions with custom EffectControllers.
Integrating essential bridge packages such as flame_audio for sound effects, flame_forge2d for physics, and flame_riverpod for state management.
name
flame-docs
description
"[Flame] Flame engine quick reference. Component lifecycle, Collision, Effects, Camera and core API reference. (project)"
// Game
class MyGame extends FlameGame with RiverpodGameMixin {}
// Component
class MyComponent extends Component with RiverpodComponentMixin {
@override
void onMount() {
super.onMount();
final state = ref.watch(myProvider);
}
}
// Widget
RiverpodAwareGameWidget<MyGame>(
game: game,
)
flame_forge2d (Physics Engine)
class MyGame extends Forge2DGame {}
class MyBody extends BodyComponent {
@override
Body createBody() {
final shape = CircleShape()..radius = 10;
final fixtureDef = FixtureDef(shape);
final bodyDef = BodyDef(type: BodyType.dynamic);
return world.createBody(bodyDef)..createFixture(fixtureDef);
}
}