Skip to content
macos-game-testing logo

macOS Game Testing for Nathaniel

macos-game-testing

Test the Nathaniel macOS game. Use when asked to test the macOS version, verify changes work on Mac, run sanity tests on desktop, or when the user says "test macOS", "run on mac", "verify mac build".

SKILL.md

Full skill instructions

macOS Game Testing for Nathaniel

This skill provides reliable testing of the Nathaniel SpriteKit game on macOS using the embedded GameCommandServer HTTP API.

Key Insight: Use GameCommandServer for All Interaction

The game uses SpriteKit with custom scene coordinates. Unlike iOS Simulator, there are no reliable external UI automation tools for macOS SpriteKit games.

Always use the GameCommandServer HTTP API (port 8765) for:

  • Navigating menus
  • Clicking buttons
  • Getting game state
  • Interacting with gameplay
  • Taking screenshots

XcodeBuildMCP is used only for: building, running, and stopping the app.

Quick Start: Test a Feature

# 1. Build and run the macOS app
mcp__XcodeBuildMCP__build_run_macos

# 2. Wait 2-3 seconds for app to load, then check server health
curl -s http://localhost:8765/​health

# 3. Get current game state
curl -s http://localhost:8765/​state | jq .

# 4. Navigate and interact using actions
curl -s http://localhost:8765/​action -X POST -H "Content-Type: application/​json" -d '{"name":"startGame"}'

Testing Workflow

Step 1: Setup and Build

# Set session defaults for XcodeBuildMCP
mcp__XcodeBuildMCP__session-set-defaults:
  projectPath: /​Users/​ruairi/​dev/​Nathaniel/​Nathaniel.xcodeproj
  scheme: Nathaniel macOS

# Build and run (opens the app automatically)
mcp__XcodeBuildMCP__build_run_macos

Step 2: Wait for GameCommandServer

After the app launches, wait 2-3 seconds, then verify the server is running:

# Check health - should return {"status":"ok"}
curl -s http://localhost:8765/​health

If it fails, the app may not have fully launched. Wait and retry.

Step 3: Navigate to Test Location

Use the HTTP API to navigate through menus:

Main Menu -> Level Select:

curl -s http://localhost:8765/​action -X POST \
  -H "Content-Type: application/​json" \
  -d '{"name":"startGame"}'

Level Select -> Level 1:

curl -s http://localhost:8765/​action -X POST \
  -H "Content-Type: application/​json" \
  -d '{"name":"level_1"}'

Step 4: Interact with Game

Get game state:

curl -s http://localhost:8765/​state | jq .
# Returns: scene, score, lives, resources, playerPosition, hermesPosition, enemyCount

Get interactive nodes:

curl -s http://localhost:8765/​nodes | jq .
# Returns: all clickable elements with frame coordinates

Click at coordinates (scene coordinates, not screen):

curl -s http://localhost:8765/​tap -X POST \
  -H "Content-Type: application/​json" \
  -d '{"x": 500, "y": 300}'

Execute named actions:

# Select characters
curl -s http://localhost:8765/​action -X POST -d '{"name":"selectNathaniel"}'
curl -s http://localhost:8765/​action -X POST -d '{"name":"selectHermes"}'

# Toggle between characters (switches and animates camera)
curl -s http://localhost:8765/​action -X POST -d '{"name":"toggleCharacter"}'

# Move character
curl -s http://localhost:8765/​action -X POST -d '{"name":"moveNathaniel","params":{"x":"500","y":"300"}}'

# Target enemy
curl -s http://localhost:8765/​action -X POST -d '{"name":"targetEnemy","params":{"index":"0"}}'

Step 5: Visual Verification

Get screenshot from GameCommandServer and save to file:

# Save screenshot as PNG file
curl -s http://localhost:8765/​screenshot | jq -r .data | base64 -d > /​tmp/​macos-screenshot.png

# View the screenshot
open /​tmp/​macos-screenshot.png

Or use macOS screencapture for the entire window:

# Capture the Nathaniel window
screencapture -l $(osascript -e 'tell app "Nathaniel" to id of window 1') /​tmp/​nathaniel-window.png

Step 6: Stop the App

mcp__XcodeBuildMCP__stop_mac_app:
  appName: Nathaniel

Available Actions by Scene

MainMenuScene

  • startGame - Go to level select
  • options - Open options
  • credits - Open credits

LevelSelectScene

  • level_1 through level_5 - Start specific level
  • back - Return to main menu

GameScene

  • selectNathaniel - Select Nathaniel
  • selectHermes - Select Hermes
  • toggleCharacter - Toggle between Nathaniel and Hermes (animates camera)
  • moveNathaniel (params: x, y) - Move to position
  • moveHermes (params: x, y) - Move Hermes to position
  • targetEnemy (params: index) - Target enemy by index

OptionsScene / CreditsScene

  • back - Return to main menu

DevSettings (DEBUG Builds Only)

Adjust game settings for easier testing:

# Get current settings
curl -s http://localhost:8765/​settings | jq .

# Make player invincible
curl -s http://localhost:8765/​settings -X POST \
  -H "Content-Type: application/​json" \
  -d '{"playerInvincible": true}'

# Give infinite resources
curl -s http://localhost:8765/​settings -X POST \
  -H "Content-Type: application/​json" \
  -d '{"infiniteResources": true}'

# Reset all settings to defaults
curl -s http://localhost:8765/​settings/​reset -X POST

Common Test Scenarios

Test Menu Navigation

# Start at main menu
curl -s http://localhost:8765/​state | jq '.scene'
# Should be "MainMenuScene"

# Go to level select
curl -s http://localhost:8765/​action -X POST -d '{"name":"startGame"}'
sleep 0.5
curl -s http://localhost:8765/​state | jq '.scene'
# Should be "LevelSelectScene"

# Go back
curl -s http://localhost:8765/​action -X POST -d '{"name":"back"}'
sleep 0.5
curl -s http://localhost:8765/​state | jq '.scene'
# Should be "MainMenuScene"

Test Gameplay

# Navigate to level 1
curl -s http://localhost:8765/​action -X POST -d '{"name":"startGame"}'
sleep 0.5
curl -s http://localhost:8765/​action -X POST -d '{"name":"level_1"}'
sleep 2

# Check initial state
curl -s http://localhost:8765/​state | jq '{scene, lives, enemyCount}'

# Select Hermes and move
curl -s http://localhost:8765/​action -X POST -d '{"name":"selectHermes"}'
curl -s http://localhost:8765/​action -X POST -d '{"name":"moveHermes","params":{"x":"600","y":"400"}}'

Test Character Toggle

# In GameScene, toggle between characters
curl -s http://localhost:8765/​action -X POST -d '{"name":"toggleCharacter"}'
sleep 0.5
# Take screenshot to verify camera moved
curl -s http://localhost:8765/​screenshot | jq -r .data | base64 -d > /​tmp/​after-toggle.png

Troubleshooting

IssueSolution
curl: Connection refusedApp not running or GameCommandServer not started (DEBUG builds only)
Actions return "not found"Wrong scene - check state.scene first
Clicks don't registerVerify coordinates are in scene space (use /​nodes to get frames)
Build failsCheck Xcode is installed, try xcodebuild -version
App won't stopUse pkill -f Nathaniel or Activity Monitor

Important Notes

  • GameCommandServer only runs in DEBUG builds
  • Scene coordinates: origin (0,0) is bottom-left, scene size is 1366x1024
  • Bundle ID: com.ruarfff.Nathaniel
  • The game runs in landscape mode (window is wider than tall)
  • Port 8765 is shared between iOS Simulator and macOS - only run one at a time

More Productivity & Planning skills

brainstorming logo
Productivity & Planning

brainstorming

Structured design dialogue that validates ideas before implementation begins.

295.4K 385.7K
View
ui-ux-pro-max logo
Productivity & Planning

ui-ux-pro-max

Comprehensive design intelligence for web and mobile UI/UX across 10 technology stacks.

133.1K 383.9K
View
writing-plans logo
Productivity & Planning

writing-plans

Comprehensive implementation plans for multi-step tasks, breaking down specs into bite-sized, testable steps.

295.4K 268K
View
using-superpowers logo
Productivity & Planning

using-superpowers

Introduction to the obra skills system with mandatory skill invocation rules and best practices.

295.4K 259.8K
View
executing-plans logo
Productivity & Planning

executing-plans

Execute a written implementation plan with critical review and task checkpoints.

295.4K 229.1K
View
dispatching-parallel-agents logo
Productivity & Planning

dispatching-parallel-agents

Delegate independent tasks to specialized agents working concurrently with isolated context.

295.4K 206.3K
View
using-git-worktrees logo
Productivity & Planning

using-git-worktrees

Isolated git worktrees with smart directory selection and safety verification.

295.4K 205.2K
View
webapp-testing logo
Productivity & Planning

webapp-testing

Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.

179.7K 170.6K
View
content-strategy logo
Productivity & Planning

content-strategy

Plan searchable and shareable content that drives traffic, builds authority, and generates leads.

53.3K 150.9K
View
repo-intake-and-plan logo
Productivity & Planning

repo-intake-and-plan

README-first repository scanner that extracts commands and classifies reproduction candidates without executing them.

497 139.6K
View
marketing-ideas logo
Productivity & Planning

marketing-ideas

Brainstorm and prioritize marketing strategies tailored to your SaaS stage, budget, and goals.

53.3K 137.2K
View
site-architecture logo
Productivity & Planning

site-architecture

Plan and optimize your website's page hierarchy, navigation, URL structure, and internal linking.

53.3K 112.8K
View

Productivity AI tools

Vimcal logo
Productivity

Vimcal

The world's fastest calendar for remote work

Free
View
SaveDay logo
Productivity

SaveDay

Capture, organize, and utilize your knowledge effortlessly.

Free
View
A
Productivity

Any Summary

Instant Summaries of Audio & Video Interviews with AnySummary

Freemium
View
M
Productivity

Map This

Transform PDFs into engaging mind maps.

Freemium
View
ChatPDF logo
Productivity

ChatPDF

Chat with any PDF instantly

Free
View
I
Productivity

intellisay

Create an optimal daily plan using your voice

Paid
View
A
Productivity

Aurora AI

A productivity platform to centralize organizational knowledge and workflows with contextual AI assistance.

Paid
View
AskYourPDF logo
Productivity

AskYourPDF

AskYourPDF Pricing Plans: Tailored to Your Needs

Free
View