develop-web-game

Automates Playwright-based testing of HTML/JS web games with JSON state output.

Updated Mar 17, 2026
One-click install
npx skills add https://github.com/Estom/aiflex --skill develop-web-game-estom
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: develop-web-game
Source: https://github.com/Estom/aiflex/tree/main/skills-repo/openai-skills/develop-web-game
Command: npx skills add https://github.com/Estom/aiflex --skill develop-web-game-estom

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires playwright, and includes scripts (resource) and references (resource) components.

What problem does it solve?

Provides a deterministic development and testing loop for HTML/JavaScript web games so developers can implement small changes, run controlled input bursts, and verify visual and textual state without flaky timing issues.

Core Features & Use Cases

  • Playwright-based client that advances virtual time, drives inputs, captures screenshots, and writes render_game_to_text JSON state for reliable validation.
  • Canvas-first capture with transparency and bounding-box fallbacks, console error aggregation, and early-fail behavior on new errors.
  • Use cases: iterate on single features (movement, shooting, menus), reproduce multi-step interactions end-to-end, collect test artifacts for debugging, and create repeatable regression checks.

Quick Start

Run the provided Playwright client against your local dev server with a URL and an actions file to exercise inputs, capture screenshots, and record render_game_to_text state.

Frequently Asked Questions about develop-web-game

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run deterministic automated testing for HTML and JavaScript web games?

Deterministic automated testing for web games uses a Playwright-based loop to advance virtual time, drive inputs, and capture screenshots without flaky timing issues. You provide an actions JSON payload, and the test records textual state for validation.

What's the best way to capture screenshots and JSON state during a web game test burst?

Capture screenshots and JSON state during a web game test burst by running a Playwright client against your local dev server. The client triggers an advanceTime hook, collects window.render_game_to_text output, and writes artifacts for debugging.

Do I need a specific Node environment to automate web game validation with Playwright?

Yes, you need a Playwright-capable Node environment to automate web game validation. Your game must also expose a window.render_game_to_text function and an advanceTime hook to process the provided actions and client script correctly.

How does virtual time advance during Playwright web game testing?

Virtual time advances through a specific advanceTime hook triggered by the Playwright client during test execution. This mechanism drives inputs in controlled bursts, ensuring deterministic state capture and reliable regression checks without relying on real-time execution.

Does Playwright automated testing support canvas-first screenshot capture with transparency fallbacks?

Yes, Playwright automated testing supports canvas-first screenshot capture with transparency and bounding-box fallbacks. It also aggregates console errors and enforces early-fail behavior when new errors are detected during the test loop.

Why does my web game test loop fail early during a Playwright run?

Your web game test loop enforces early-fail behavior during a Playwright run by aggregating console errors and stopping execution immediately if new errors are detected, preventing unreliable test artifacts.