| name | godot |
| version | 1.2.0 |
| description | Develop, test, build, and deploy Godot 4.x games. Includes GdUnit4 for GDScript unit tests and PlayGodot for game automation and E2E testing. Supports web/desktop exports, CI/CD pipelines, and deployment to Vercel/GitHub Pages/itch.io. |
Godot Skill
Develop, test, build, and deploy Godot 4.x games.
Quick Reference
godot --headless --path . -s res://addons/gdUnit4/bin/GdUnitCmdTool.gd --run-tests
export GODOT_PATH=/path/to/godot-automation-fork
pytest tests/ -v
godot --headless --export-release "Web" ./build/index.html
vercel deploy ./build --prod
Testing Overview
| GdUnit4 | PlayGodot |
|---|
| Type | Unit testing | Game automation |
| Language | GDScript | Python |
| Runs | Inside Godot | External (like Playwright) |
| Requires | Addon | Custom Godot fork |
| Best for | Unit/component tests | E2E/integration tests |
GdUnit4 (GDScript Tests)
GdUnit4 runs tests written in GDScript directly inside Godot.
Project Structure
project/
├── addons/gdUnit4/ # GdUnit4 addon
├── test/ # Test directory
│ ├── suites/ # Test suites
│ │ └── MyTestSuite.gd # Test suite file
│ └── test_resources/ # Test resources
└── src/ # Source code
Test Example
# test/suites/MyTestSuite.gd
extends GdUnitTestSuite
func test_example():
var result = 2 + 2
assert_int(result).is_equal(4)
func test_node_creation():
var node = Node.new()
assert_node(node).is_not_null()
node.queue_free()
Running Tests
godot --headless --path . -s res://addons/gdUnit4/bin/GdUnitCmdTool.gd --run-tests
godot --headless --path . -s res://addons/gdUnit4/bin/GdUnitCmdTool.gd --run-tests --suite MyTestSuite
godot --headless --path . -s res://addons/gdUnit4/bin/GdUnitCmdTool.gd --run-tests --verbose
PlayGodot (Python Tests)
PlayGodot provides Python-based game automation, similar to Playwright for web applications.
Setup
pip install -r requirements.txt
export GODOT_PATH=/path/to/godot-automation-fork
Test Example
from playgodot import Game, GameTest
class TestGame(GameTest):
async def test_player_movement(self):
game = await Game.launch("res://scenes/main.tscn")
player = game.get_node("Player")
initial_pos = player.position
await game.press_key(KEY_RIGHT)
await game.wait(0.5)
assert player.position.x > initial_pos.x
await game.close()
Running Tests
pytest tests/ -v
pytest tests/test_game.py::TestGame::test_player_movement -v
pytest tests/ --cov=src --cov-report=html
Export and Deployment
Web Export
godot --headless --export-release "Web" ./build/index.html
godot --headless --export-release "Web" ./build/index.html --custom-template path/to/template
Desktop Export
godot --headless --export-release "Windows Desktop" ./build/game.exe
godot --headless --export-release "Mac OSX" ./build/game.app
godot --headless --export-release "Linux/X11" ./build/game.x86_64
Deployment to Vercel
vercel deploy ./build --prod
vercel deploy ./build --prod --domain my-game.vercel.app
Deployment to GitHub Pages
gh-pages -d ./build
gh-pages -d ./build --cname my-game.github.io
CI/CD Integration
GitHub Actions
name: Test and Deploy
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: godotengine/godot-ci@v3
with:
godot-version: 4.2
- name: Run GdUnit4 tests
run: godot --headless --path . -s res://addons/gdUnit4/bin/GdUnitCmdTool.gd --run-tests
- name: Run PlayGodot tests
run: pytest tests/ -v
- name: Export web build
run: godot --headless --export-release "Web" ./build/index.html
- name: Deploy to Vercel
run: vercel deploy ./build --prod
Best Practices
Testing
- Write unit tests for core game logic
- Use PlayGodot for integration and E2E tests
- Keep tests fast and focused
- Mock external dependencies
Export
- Optimize assets for target platform
- Test exports on all target platforms
- Use custom export templates when needed
- Include proper error handling
Deployment
- Use automated CI/CD pipelines
- Test deployments in staging first
- Monitor deployed applications
- Keep deployment configurations versioned
Integration with Claude Code Game Studios
This skill integrates with the following agents:
- Godot Specialist [37] - Core Godot development
- Godot GDScript Specialist [38] - GDScript programming
- Godot GDExtension Specialist [39] - Native extensions
- Godot Shader Specialist [40] - Shader development
- Godot Full-Stack Specialist - Testing, deployment, and CI/CD
Version: 1.2.0
Last updated: 2026-03-10
Integration: Claude Code Game Studios