@maccesar/titools 4.6.1 → 4.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +46 -8
- package/commands/ti-audit.md +1 -0
- package/commands/ti-check.md +3 -2
- package/lib/config.js +1 -0
- package/package.json +1 -1
- package/skills/ti-game/SKILL.md +198 -0
- package/skills/ti-game/references/api.md +408 -0
- package/skills/ti-game/references/project-setup.md +306 -0
- package/skills/ti-game/references/recipes.md +1268 -0
- package/skills/ti-game/references/roadmap.md +57 -0
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# What does not exist yet — and what to do instead
|
|
2
|
+
|
|
3
|
+
The most expensive mistake with `ti.game` is writing code against a feature that sounds like it should be there because Phaser, Godot or Cocos has it. This file is the guard rail: everything below is **absent from upstream `main` as of 2026-08-18**, with the workaround that is idiomatic today.
|
|
4
|
+
|
|
5
|
+
Planned items come from the module's `TODO.md`. Planned is not shipped — when a game needs one of these, use the workaround and keep the code isolated enough to swap later.
|
|
6
|
+
|
|
7
|
+
## Not available today
|
|
8
|
+
|
|
9
|
+
| You might reach for | Status | What to do now |
|
|
10
|
+
| --- | --- | --- |
|
|
11
|
+
| A tilemap layer, Tiled JSON import, collision layer | Planned (priority 4) | One sprite per tile. Fine at 12×15, dead at 200×200. For large ground planes use a single `tileRepeat` sprite instead of a grid, and add sparse invisible solids for collision |
|
|
12
|
+
| `sprite.parent`, attaching a turret to a tank, a hat to a hero, multi-part bosses | Planned (priority 7), the biggest structural item | Move the parts together from JS on the same coarse tick, or bake the combination into sheet frames. There is no transform inheritance |
|
|
13
|
+
| `gameView.raycast(...)`, line-of-sight, ground probes | Planned (priority 3) | Compare positions in JS on a decision timer, or place an invisible trigger sprite where the probe would land and listen for `collision` |
|
|
14
|
+
| Native virtual joystick or d-pad bound to a sprite | Planned (priority 6) | Overlaid Titanium views, one per button, writing `velocityX`/`steering`/`throttle` on `touchstart`/`touchend`. Sibling views get simultaneous pointers, so multitouch works |
|
|
15
|
+
| Gamepad support | Planned (priority 6) | Nothing native. Touch controls only |
|
|
16
|
+
| `blend: 'multiply'` or `'screen'` | Planned (priority 2) | Only `'normal'` and `'add'` exist. For darkening, use `tintColor` (multiplicative) on the sprite itself |
|
|
17
|
+
| Slopes in platformer terrain | Planned (priority 3), conditional | Build slopes as stepped rectangles, or keep terrain flat |
|
|
18
|
+
| Per-frame animation events (footstep on frame 3) | Planned (priority 9) | Use `animationcomplete` on a short non-looping animation, or a timer aligned to the animation's fps |
|
|
19
|
+
| `play('attack', { then: 'idle' })` chaining | Planned (priority 9) | Handle `animationcomplete` and call `play()` from it |
|
|
20
|
+
| `sprite.followPath([points], ...)` | Planned (priority 9) | Chain tweens: call `animate()` again from the `complete` handler, one leg per call |
|
|
21
|
+
| `playbackRate`, pitch jitter, stereo pan, `fadeTo()` on sounds | Planned (priority 8) | Only `volume`, `loop`, `play`, `pause`, `stop` exist. Ship a few pre-pitched variants of a sample and alternate between them |
|
|
22
|
+
| An fps / draw-call / sprite-count overlay | Planned (developer experience) | `debug: true` draws collision shapes only. There is no stats overlay and no `performance` event — measure with platform tooling |
|
|
23
|
+
| TypeScript definitions (`ti.game.d.ts`) | Planned (developer experience) | None yet |
|
|
24
|
+
| Aseprite JSON import | Planned (developer experience) | TexturePacker JSON (hash or array) is the only atlas format |
|
|
25
|
+
| A `stop()` for the whole scene | Not planned — already covered | `gameView.timeScale = 0` freezes everything the engine ticks while rendering and touch keep running. `gameView.pause()` stops the render loop entirely |
|
|
26
|
+
| Tweening `width`, `height`, `tintColor` | Not planned | `animate()` only handles `x`, `y`, `scale`, `scaleX`, `scaleY`, `rotation`, `opacity`, `glowOpacity`, plus `frame` at the end. Everything else is an instant write |
|
|
27
|
+
| Standard Titanium touch events on the GameView | By design | The view fires its own `press`, `tap`, `release` with scene coordinates. Sprites fire the richer set. Overlaid Titanium views keep their normal events |
|
|
28
|
+
| A per-frame event to hook your own logic into | By design, never | The whole architecture exists to keep JS out of the frame loop. Use `collision`, `land`, `complete`, `animationcomplete`, or a coarse timer for decisions |
|
|
29
|
+
|
|
30
|
+
## Deliberately out of scope
|
|
31
|
+
|
|
32
|
+
The module's own `TODO.md` rules these out, each being a project the size of everything built so far:
|
|
33
|
+
|
|
34
|
+
- **2D lighting and shadows.** If it ever comes up: a screen-dim overlay plus additive light sprites (`blend: 'add'`) gets 90% of the look for 1% of the cost.
|
|
35
|
+
- **Skeletal animation (Spine).** Frame animations from sheets only.
|
|
36
|
+
- **Full rigid-body physics (Box2D class).** What exists — velocity, gravity, solids with penetration resolution, restitution, circle and rect hitboxes, the car model, thrust — covers the target genres. Joints, torque, compound bodies and stacking do not exist.
|
|
37
|
+
- **Render-to-texture.** The only offscreen pass is the fullscreen `cameraEffect`.
|
|
38
|
+
|
|
39
|
+
## Already shipped (do not "work around" these)
|
|
40
|
+
|
|
41
|
+
Recent additions that are easy to miss and easy to reimplement badly in JS:
|
|
42
|
+
|
|
43
|
+
- Camera: horizontal and vertical dead-zone `follow`, `cameraBounds`, `smoothing`, `cameraScale` zoom, native `shake`.
|
|
44
|
+
- `tintColor`, `flash(color, duration)`, `blend: 'add'`, `tileRepeat` with `repeat: true` sheets.
|
|
45
|
+
- `hitboxShape: 'circle'` with contact-normal resolution against solids, `oneWay` platforms, moving solids that carry their riders (`carryRiders` to opt out).
|
|
46
|
+
- `createEmitter` particles, `createRope` Verlet ropes with `maxLength` tethers.
|
|
47
|
+
- `createSound` with separate low-latency effect and streaming music backends.
|
|
48
|
+
- `timeScale`, `maxFps`, `flipX`/`flipY`, `pixelSnap`, `idleAnimation`, `ySort`, `glowColor`/`glowBlur`/`glowOpacity`.
|
|
49
|
+
- `gameView.add([array])` committing a whole level in one bridge crossing.
|
|
50
|
+
- **Text is in the engine now** (2026-08-18): `createText` glyph sprites with an embedded pixel font, `createFont` for BMFont/AngelCode or monospace grid atlases, `align`/`letterSpacing`/`lineSpacing`, and `tools/genfont.py` to rasterize a TTF. Text objects are sprites — they tween, tint, flash, glow, z-sort and take taps. Do **not** fall back to `Ti.UI.Label` overlays for scores.
|
|
51
|
+
- **`screenFixed`** on any sprite: surface coordinates, camera position/zoom/shake ignored, touch mapped back. HUDs no longer need overlay views.
|
|
52
|
+
- **`swept: true`** per sprite: the frame's movement is path-tested (Minkowski + slab) for both collision events and solid blocking. Fast bullets stop tunneling; `hitboxScale` tricks along the travel axis are obsolete.
|
|
53
|
+
- **`collisionend`**: the exit half of the trigger lifecycle, including when the partner is removed, hidden or re-tagged mid-contact.
|
|
54
|
+
|
|
55
|
+
## Checking the current state
|
|
56
|
+
|
|
57
|
+
This file describes upstream `main` on 2026-08-18 — a moving target: four items on this list shipped within two days of the skill being written, and the manifest version (`0.3.0`) did not change with them. Before relying on any "planned" item being still absent — or on a workaround still being necessary — read `TODO.md` and `README.md` at https://github.com/m1ga/ti.game, the module's upstream repo. `README.md` there is the canonical API documentation; the `documentation/` folder only points at it. The priorities quoted above are the maintainer's, not a roadmap this skill decides.
|