Skip to content
Skills Library
Programming · Building & coding

pythonide-scene

/pythonide-scene

Build or repair PythonIDE 2D scene scripts, SpriteKit-style games, touch demos, physics samples, and turtle graphics using scene.run or turtle. Use when the user wants continuous drawing, sprites, collisions, frame loops, or game-style interaction — not AppUI forms or widgets.

Licence
MIT
Last repository change
13.07.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
2
Scripts
1
HTML comments
0
URLs in SKILL.md
4
Deprecation

No signals detected. Repository changed on 13.07.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What to check before installing
  • 1 scripts in this package. Review them before installing, as Claude may execute them.

Scripts: examples/tap_ball/main.py

What it does and when to use it

Build or repair PythonIDE 2D scene scripts, SpriteKit-style games, touch demos, physics samples, and turtle graphics using scene.run or turtle. Use when the user wants continuous drawing, sprites, collisions, frame loops, or game-style interaction — not AppUI forms or widgets.

Original author description

Build or repair PythonIDE 2D scene scripts, SpriteKit-style games, touch demos, physics samples, and turtle graphics using scene.run or turtle. Use when the user wants continuous drawing, sprites, collisions, frame loops, or game-style interaction — not AppUI forms or widgets.

How it works

  1. Read Before Coding
  2. Use When
  3. Do Not Use When
  4. Workflow
  5. Correct Pattern
  6. Hard Stops
  7. Physics And Gameplay
  8. Turtle Runtime
  9. Repair Hints
  10. Examples
Original SKILL.md headings · 100 lines, 380 words
SKILL.md preview
---
name: pythonide-scene
description: Build or repair PythonIDE 2D scene scripts, SpriteKit-style games, touch demos, physics samples, and turtle graphics using scene.run or turtle. Use when the user wants continuous drawing, sprites, collisions, frame loops, or game-style interaction — not AppUI forms or widgets.
license: MIT
version: "1.0.0"
last_updated: "2026-06-10"
user_invocable: true
---

# PythonIDE Scene

Execution rulebook for `scene` and `turtle` runtimes.

## Read Before Coding

1. [Scene module](https://pythonide.xin/docs/pages/scene-module/)
2. [Scene API reference](https://pythonide.xin/docs/pages/scene-api-reference/)
3. [scene.pyi](https://pythonide.xin/stubs/scene.pyi)
4. [Turtle module](https://pythonide.xin/docs/pages/turtle-module/) for teaching graphics

Do not generate AppUI or widget code for a scene/game request.

## Use When

- Continuous drawing, sprite movement, collisions, physics, touch loops, or shaders
- Existing code imports `scene` and needs repair
- Turtle teaching demos

## Do Not Use When

- The UI is a form, list, settings screen, or AppUI MiniApp
- The user wants imperative UIKit controls → `pythonide-automation` (`ui`)
- Static charts or business apps → `pythonide-appui`

## Workflow

1. Subclass `scene.Scene`
2. Create retained nodes in `setup()` after `self.size` is valid
3. Per-frame logic in `update()`; immediate drawing only in `draw()`
4. Touch in `touch_began` / `touch_moved` / `touch_ended`
5. End with exactly one `scene.run(MyScene(), ...)`
6. Keep assets optional unless the user provides them

## Correct Pattern

```python
import scene


class Demo(scene.Scene):
    def setup(self):
        self.background_color = "#111827"
        self.ball = scene.SpriteNode(
            color="#2f80ed",
            size=(44, 44),
            position=(self.size.w / 2, self.size.h / 2),
            parent=self,
        )
        self.label = scene.LabelNode(
            "Tap to move",
            font=("Helvetica", 18),
            position=(self.size.w / 2, 80),
            parent=self,
        )

    def touch_began(self, touch):
        self.ball.run_action(
            scene.Action.move_to(touch.location.x, touch.location.y, 0.25)
        )
        self.label.text = f"{touch.location.x:.0f}, {touch.location.y:.0f}"


scene.run(Demo(), show_fps=True)
```

## Hard Stops

- No AppUI (`Button`, `VStack`, `NavigationStack`, etc.) inside a `Scene`
- No blocking `while True` animation loops; use `update()` or `Action`
- No `rect`, `fill`, `text`, etc. outside `draw()`
- `SpriteNode("red")` treats `"red"` as a texture name — use `SpriteNode(color="red", ...)`
- Do not omit `scene.run(...)`
- `image_quad` / `triangle_strip` are not implemented

## Physics And Gameplay

- Use physics bodies only when collisions matter
- Retain sprites, labels, and game state on `self`
- Use `node.run_action(...)` for motion; calling `Action.move_to(...)` alone does nothing

## Turtle Runtime

- Use `import turtle` only for teaching/simple vector drawing
- Do not mix turtle and scene in one deliverable unless repairing existing code

## Repair Hints

| Issue | Fix |
| --- | --- |
| Blank scene | verify `scene.run(...)` and `setup()` does not crash |
| Node at origin | set explicit `position` from `self.size` |
| No motion | `node.run_action(...)`, not bare `Action` |
| Dead touch | implement `touch_began(self, touch)` |

## Examples

- `examples/tap_ball/` — tap-to-move sprite demo
Files in this package (2)
  • SKILL.md 3 KB
  • examples/tap_ball/main.py 1 KB

Versions

The database has no other skills named pythonide-scene.

Database snapshot: 13.11.2026 · package version a83da17cf34f (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100pythonide
    Route PythonIDE tasks to the correct runtime and companion skill (AppUI MiniApp, widget, scene, native modules, automation). Use when the user asks to build, fix, or choose a PythonIDE app, script, widget, game, or iOS capability workflow.
  • 100pythonide-automation
    Build PythonIDE automation scripts with shortcuts, keyboard snippets, legacy ui views, plain Python batch tools, and extension-facing workflows. Use when the user wants Shortcut handoff, editor keyboard helpers, Pythonista-style ui, or non-AppUI scripts without a full MiniApp shell.
  • 100axiom-games
    Use when building ANY 2D or 3D game with SpriteKit, SceneKit, or RealityKit, or adding touch controls or game controller support. Covers scene graphs, ECS, physics, actions, game loops, rendering, TouchController, GCController.
  • 100axiom-games
    Use when building ANY 2D or 3D game with SpriteKit, SceneKit, or RealityKit, or adding touch controls or game controller support. Covers scene graphs, ECS, physics, actions, game loops, rendering, TouchController, GCController.
  • 90spritekit-game-workflow
    Guide SpriteKit game implementation, repair, and maintenance. Use when Codex works on SKScene, SKView, SKNode, actions, particles, cameras, constraints, 2D physics, tile maps, SpriteKit resources, .sks files, SpriteKit and GameplayKit integration, or SpriteKit validation in Apple game projects.
  • 100kaboom
    Build 2D browser games in JavaScript with Kaboom.js, whose maintained successor is KAPLAY. Offers an entity-component system, built-in physics, sprite animation, scenes and ASCII-map levels. Use when a user asks for a quick browser game, a game-jam prototype, a platformer or a…

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.