К основному содержанию
скилл GitHub Copilot официальный · GitHub

game-engine — скилл для GitHub Copilot: что делает и установка

Помогает GitHub Copilot создавать браузерные игры и игровые движки на HTML5 и JavaScript. Подходит для 2D, 3D, физики, коллизий и управления.

Установить в Claude Code · Через Skills CLI (Vercel) Все способы и платформы ↓
npx skills add github/awesome-copilot --skill game-engine -a claude-code
Открыть на GitHub

Что делает game-engine

Скилл направляет GitHub Copilot при разработке браузерных игр на HTML5 и JavaScript. Он охватывает Canvas и WebGL, игровой цикл через requestAnimationFrame, физику, коллизии, спрайты и ввод с клавиатуры, мыши, touch или gamepad.

В assets/ лежат стартовые шаблоны для Breakout, лабиринта, платформера и простого 2D-движка. В references/ собрана справка по Web Audio, tilemaps, raycasting, WebRTC, WebSockets, WebXR, публикации и отладке типичных проблем.

Нужны базовые знания HTML, CSS и JavaScript, а также браузер с Canvas/WebGL. Node.js пригодится для сборки и локального сервера. Ставить стоит тем, кто делает игру в браузере; для проектов без игровой графики этот скилл будет лишним.

Какие задачи решает

  • собрать игровой цикл через requestAnimationFrame
  • добавить столкновения и гравитацию в платформер
  • отрисовать 2D-сцену в Canvas
  • настроить управление с клавиатуры или gamepad
  • подготовить WebGL-сцену для 3D-игры

Примеры запросов агенту

  • «Создай 2D-платформер на Canvas с гравитацией и коллизиями.»
  • «Добавь игровой цикл через `requestAnimationFrame` и delta time.»
  • «Используй `2d-maze-game.md` как основу для игры с управлением наклоном устройства.»

Как установить game-engine

1Через Skills CLI (Vercel)

npx skills add github/awesome-copilot --skill game-engine -a claude-code

2Вручную: положить файлы

~/.claude/skills/game-engine/SKILL.md

Папка скилла целиком; для одного проекта — .claude/skills/game-engine/

Похожие

prototype Matt Pocock Создаёт временный прототип, чтобы проверить логику, модель состояния или вид интерфейса до работы над основным кодом. Claude Code 986 201установок webapp-testing официальный anthropics Скилл запускает проверки локальных веб-приложений через Playwright: помогает отлаживать UI, делать скриншоты и смотреть логи браузера. Claude Code Claude.ai 186 758установок web-artifacts-builder официальный anthropics Скилл собирает сложные HTML-артефакты для claude.ai на React, Tailwind CSS и shadcn/ui. Подходит для интерфейсов с состоянием и маршрутизацией. Claude Code Claude.ai 112 122установок theme-factory официальный anthropics Применяет готовые цветовые палитры и пары шрифтов к слайдам, документам и HTML-страницам. Подходит, когда материалу нужен единый стиль. Claude Code Claude.ai 94 921установок algorithmic-art официальный anthropics Создаёт генеративное искусство на p5.js с seed-случайностью и настройкой параметров. Подходит для flow fields, частиц и кодовых арт-экспериментов. Claude Code Claude.ai 89 081установок chrome-devtools официальный github Управляет живым Chrome через Chrome DevTools MCP: открывает страницы, проверяет ошибки и пишет трассы производительности. Нужен для отладки интерфейса прямо из агента. GitHub Copilot 15 258установок

Вопросы о game-engine

Как установить game-engine в GitHub Copilot?

Выполните npx skills add github/awesome-copilot --skill game-engine. Также доступна команда gh skill install github/awesome-copilot game-engine.

Что делает game-engine?

Это скилл для создания браузерных игр и игровых движков. Он покрывает 2D- и 3D-рендеринг, физику, коллизии, управление, звук и публикацию игр.

Что нужно для работы со скиллом game-engine?

Понадобятся базовые знания HTML, CSS и JavaScript, плюс современный браузер с поддержкой Canvas/WebGL. Для инструментов сборки и локального сервера можно использовать Node.js.

Исходный текст

SKILL.md · MIT
---
name: game-engine
description: 'Expert skill for building web-based game engines and games using HTML5, Canvas, WebGL, and JavaScript. Use when asked to create games, build game engines, implement game physics, handle collision detection, set up game loops, manage sprites, add game controls, or work with 2D/3D rendering. Covers techniques for platformers, breakout-style games, maze games, tilemaps, audio, multiplayer via WebRTC, and publishing games.'
---

# Game Engine Skill

Build web-based games and game engines using HTML5 Canvas, WebGL, and JavaScript. This skill includes starter templates, reference documentation, and step-by-step workflows for 2D and 3D game development with frameworks such as Phaser, Three.js, Babylon.js, and A-Frame.

## When to Use This Skill

- Building a game engine or game from scratch using web technologies
- Implementing game loops, physics, collision detection, or rendering
- Working with HTML5 Canvas, WebGL, or SVG for game graphics
- Adding game controls (keyboard, mouse, touch, gamepad)
- Creating 2D platformers, breakout-style games, maze games, or 3D experiences
- Working with tilemaps, sprites, or animations
- Adding audio to web games
- Implementing multiplayer features with WebRTC or WebSockets
- Optimizing game performance
- Publishing and distributing web games

## Prerequisites

- Basic knowledge of HTML, CSS, and JavaScript
- A modern web browser with Canvas/WebGL support
- A text editor or IDE
- Optional: Node.js for build tooling and local development servers

## Core Concepts

The following concepts form the foundation of every web-based game engine.

### Game Loop

Every game engine revolves around the game loop -- a continuous cycle of:

1. **Process Input** - Read keyboard, mouse, touch, or gamepad input
2. **Update State** - Update game object positions, physics, AI, and logic
3. **Render** - Draw the current game state to the screen

Use `requestAnimationFrame` for smooth, browser-optimized rendering.

### Rendering

- **Canvas 2D** - Best for 2D games, sprite-based rendering, and tilemaps
- **WebGL** - Hardware-accelerated 3D and advanced 2D rendering
- **SVG** - Vector-based graphics, good for UI elements
- **CSS** - Useful for DOM-based game elements and transitions

### Physics and Collision Detection

- **2D Collision Detection** - AABB, circle, and SAT-based collision
- **3D Collision Detection** - Bounding box, bounding sphere, and raycasting
- **Velocity and Acceleration** - Basic Newtonian physics for movement
- **Gravity** - Constant downward acceleration for platformers

### Controls

- **Keyboard** - Arrow keys, WASD, and custom key bindings
- **Mouse** - Click, move, and pointer lock for FPS-style controls
- **Touch** - Mobile touch events and virtual joysticks
- **Gamepad** - Gamepad API for controller support

### Audio

- **Web Audio API** - Programmatic sound generation and spatial audio
- **HTML5 Audio** - Simple audio playback for music and sound effects

## Step-by-Step Workflows

### Creating a Basic 2D Game

1. Set up an HTML file with a `<canvas>` element
2. Get the 2D rendering context
3. Implement the game loop using `requestAnimationFrame`
4. Create game objects with position, velocity, and size properties
5. Handle keyboard/mouse input for player control
6. Implement collision detection between game objects
7. Add scoring, lives, and win/lose conditions
8. Add sound effects and music

### Building a 3D Game

1. Choose a framework (Three.js, Babylon.js, A-Frame, or PlayCanvas)
2. Set up the scene, camera, and renderer
3. Load or create 3D models and textures
4. Implement lighting and shaders
5. Add physics and collision detection
6. Implement player controls and camera movement
7. Add audio and visual effects

### Publishing a Game

1. Optimize assets (compress images, minify code)
2. Test across browsers and devices
3. Choose distribution platform (web, app stores, game portals)
4. Implement monetization if needed
5. Promote through game communities and social media

## Game Templates

Starter templates are available in the `assets/` folder. Each template provides a complete, working example that can be used as a starting point for a new project.

| Template | Description |
|----------|-------------|
| `paddle-game-template.md` | 2D Breakout-style game with pure JavaScript |
| `2d-maze-game.md` | Maze game with device orientation controls |
| `2d-platform-game.md` | Platformer game using Phaser framework |
| `gameBase-template-repo.md` | Game base template repository structure |
| `simple-2d-engine.md` | Simple 2D platformer engine with collisions |

## Reference Documentation

Detailed reference material is available in the `references/` folder. Consult these files for in-depth coverage of specific topics.

| Reference | Topics Covered |
|-----------|---------------|
| `basics.md` | Game development introduction and anatomy |
| `web-apis.md` | Canvas, WebGL, Web Audio, Gamepad, and other web APIs |
| `techniques.md` | Collision detection, tilemaps, async scripts, audio |
| `3d-web-games.md` | 3D theory, frameworks, shaders, WebXR |
| `game-control-mechanisms.md` | Touch, keyboard, mouse, and gamepad controls |
| `game-publishing.md` | Distribution, promotion, and monetization |
| `algorithms.md` | Raycasting, collision, physics, vector math |
| `terminology.md` | Game development glossary |
| `game-engine-core-principles.md` | Core design principles for game engines |

## Troubleshooting

| Issue | Solution |
|-------|----------|
| Canvas is blank | Check that you are calling drawing methods after getting the context and inside the game loop |
| Game runs at different speeds | Use delta time in update calculations instead of fixed values |
| Collision detection is inconsistent | Use continuous collision detection or reduce time steps for fast-moving objects |
| Audio does not play | Browsers require user interaction before playing audio; trigger playback from a click handler |
| Performance is poor | Profile with browser dev tools, reduce draw calls, use object pooling, and optimize asset sizes |
| Touch controls are unresponsive | Prevent default touch behavior and handle touch events separately from mouse events |
| WebGL context lost | Handle the `webglcontextlost` event and restore state on `webglcontextrestored` |

© github · MIT · github/awesome-copilot

Смотрите также

Спонсоры проекта

Компании, которые помогают держать аналитику открытой