- Home
- Skills
- Miles990
- Flame Demo Game
- Flame Core
flame-core_skill
- JavaScript
0
GitHub Stars
1
Bundled Files
2 months ago
Catalog Refreshed
4 months ago
First Indexed
Readme & install
Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.
Installation
Preview and clipboard use veilstrat where the catalogue uses aiagentskills.
npx veilstrat add skill miles990/flame_demo_game --skill flame-core- SKILL.md2.7 KB
Overview
This skill documents Flame Engine core fundamentals for building 2D games in Flutter. It covers the component system, input handling, collision detection, camera setup, animation, and scene management. The material helps developers structure game logic, render sprites, and manage interactions and UI overlays.
How this skill works
The skill explains how Flame organizes game objects as Components and PositionComponents, and how lifecycle methods drive load, update, and render. It describes input layers (touch, keyboard, gamepad), Hitbox-based collision detection with HasCollisionDetection, and camera features like viewfinder anchoring and follow behavior. It also details sprite animation types, animation groups, scene routing via RouterComponent, and overlay UI management.
When to use it
- Starting a new Flame game project and choosing component types
- Implementing player controls, touch or keyboard input, or gamepad support
- Adding collision detection and hitboxes for physics or interactions
- Setting up camera behavior, HUDs, and viewports
- Creating sprite animations, effects, or animation state groups
- Organizing scenes, menus, and overlays with RouterComponent
Best practices
- Prefer small, focused Components to keep lifecycle and updates simple
- Use PositionComponent subclasses for renderable objects and separate logic-only Components
- Define clear Hitbox shapes and layers to limit collision checks for performance
- Keep camera logic separate from gameplay logic; use the viewfinder to control anchoring and follow targets
- Use SpriteAnimationGroupComponent for state-driven animations to simplify state transitions
- Profile performance early and batch static graphics where possible
Example use cases
- Player entity built from PositionComponent with SpriteAnimationComponent and Hitbox for collisions
- Top-down camera following player with a fixed HUD overlay using Camera.viewfinder and overlays
- Menu and scene flow managed by RouterComponent with separate Components for each screen
- Touch and keyboard input handlers added to game for cross-platform controls
- Particle explosion effect triggered on collision using the Particles system
FAQ
No. Choose the simplest type that fits your needs: use Component for logic-only systems and PositionComponent or Sprite-based components for things that render or have position.
How do I reduce collision overhead?
Use collision layers, coarse-grained hitboxes for broad-phase checks, and limit collision checks to relevant components to improve performance.