Skip to content

Commit 87dc5ec

Browse files
committed
Fix Workspace V2 object/collision enablement and Space Invaders name - PR_26140_123-fix-workspace-v2-object-collision-and-game-name
1 parent b61a194 commit 87dc5ec

6 files changed

Lines changed: 803 additions & 14 deletions

File tree

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# PR_26140_123 Workspace V2 Object/Collision Enablement Report
2+
3+
## Summary
4+
- Fixed Workspace Manager V2 enablement so Object Vector Studio V2 and Collision Inspector V2 hydrate only when `tools.object-vector-studio-v2` contains real engine-collidable geometry.
5+
- Added valid Object Vector Studio V2 manifest payloads for Space Duel and Space Invaders from their source geometry/collision dimensions.
6+
- Renamed Space Invaders display text from `Space Invaders Next` to `Space Invaders` in the active game manifest and games metadata.
7+
- Preserved existing `input-mapping-v2` manifest data and did not touch sample JSON.
8+
9+
## Implementation Notes
10+
- `WorkspaceManagerV2ContextService` now uses `createObjectVectorCollisionGeometry()` from `src/engine/collision/objectVector.js` to determine whether object-vector payloads contain inspectable geometry.
11+
- Collision Inspector V2 no longer enables from a non-empty `objects` array alone; it requires valid object-vector collision geometry.
12+
- Object Vector Studio V2 no longer enables from an empty/default object-vector payload.
13+
- Space Duel object vectors were populated from `SHIP_SEGMENTS`, enemy segment outlines, and source collision radii.
14+
- Space Invaders object vectors were populated from source collision rectangles: player, aliens, UFO, shots, bombs, and shields.
15+
- Games without confident object-vector geometry remain without `object-vector-studio-v2` payloads and keep Object Vector Studio V2 / Collision Inspector V2 disabled.
16+
17+
## Validation
18+
- `node --check tools/workspace-manager-v2/js/services/WorkspaceManagerV2ContextService.js` passed.
19+
- `node --check tests/playwright/tools/WorkspaceManagerV2.spec.mjs` passed.
20+
- `node --input-type=module -e "await import('./tools/workspace-manager-v2/js/services/WorkspaceManagerV2ContextService.js'); console.log('WorkspaceManagerV2ContextService import OK');"` passed.
21+
- `node scripts/validate-json-contracts.mjs --mode games --details` reported `game_manifest_schema_validation: total=12 invalid=0`.
22+
- Workspace Manager service-level manifest/toolState contract validation passed for 12 game manifests.
23+
- Geometry-enabled object/collision hydration: Asteroids, SpaceDuel, SpaceInvaders, vector-arcade-sample.
24+
- Geometry-disabled object/collision hydration: _template, AITargetDummy, Bouncing-ball, Breakout, GravityWell, Pacman, Pong, SolarSystem.
25+
- Focused Playwright coverage for object/collision geometry enablement passed.
26+
- `npm run test:workspace-v2` passed on retry: 72 passed.
27+
28+
## Notes
29+
- The first full Workspace V2 run had two transient Input Mapping V2 timing failures; rerunning the affected tests narrowed this to flake behavior, and the required full suite retry passed.
30+
- Full samples smoke test was not run, per instructions.

games/SpaceDuel/game.manifest.json

Lines changed: 323 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -421,6 +421,329 @@
421421
]
422422
}
423423
]
424+
},
425+
"object-vector-studio-v2": {
426+
"version": 1,
427+
"toolId": "object-vector-studio-v2",
428+
"name": "Space Duel Object Vector Assets",
429+
"objects": [
430+
{
431+
"id": "object.space-duel.ship",
432+
"name": "Player Ship",
433+
"tags": [
434+
"player",
435+
"ship",
436+
"collision"
437+
],
438+
"objectOrigin": {
439+
"x": 0,
440+
"y": 0
441+
},
442+
"shapes": [
443+
{
444+
"tool": "polygon",
445+
"order": 0,
446+
"visible": true,
447+
"locked": false,
448+
"geometry": {
449+
"points": [
450+
{
451+
"x": 16,
452+
"y": 0
453+
},
454+
{
455+
"x": -11,
456+
"y": 9
457+
},
458+
{
459+
"x": -4,
460+
"y": 0
461+
},
462+
{
463+
"x": -11,
464+
"y": -9
465+
},
466+
{
467+
"x": 16,
468+
"y": 0
469+
}
470+
]
471+
},
472+
"style": {
473+
"fill": "#ffffff",
474+
"stroke": "#ffffff",
475+
"strokeWidth": 2,
476+
"fillOpacity": 0.08,
477+
"strokeOpacity": 1
478+
},
479+
"transform": {
480+
"x": 0,
481+
"y": 0,
482+
"rotation": 0,
483+
"scaleX": 1,
484+
"scaleY": 1
485+
}
486+
}
487+
]
488+
},
489+
{
490+
"id": "object.space-duel.heavy-enemy",
491+
"name": "Heavy Enemy",
492+
"tags": [
493+
"enemy",
494+
"heavy",
495+
"collision"
496+
],
497+
"objectOrigin": {
498+
"x": 0,
499+
"y": 0
500+
},
501+
"shapes": [
502+
{
503+
"tool": "polygon",
504+
"order": 0,
505+
"visible": true,
506+
"locked": false,
507+
"geometry": {
508+
"points": [
509+
{
510+
"x": 16,
511+
"y": 0
512+
},
513+
{
514+
"x": 9,
515+
"y": 12
516+
},
517+
{
518+
"x": -6,
519+
"y": 15
520+
},
521+
{
522+
"x": -16,
523+
"y": 6
524+
},
525+
{
526+
"x": -14,
527+
"y": -8
528+
},
529+
{
530+
"x": -2,
531+
"y": -16
532+
},
533+
{
534+
"x": 12,
535+
"y": -12
536+
},
537+
{
538+
"x": 16,
539+
"y": 0
540+
}
541+
]
542+
},
543+
"style": {
544+
"fill": "#94a3b8",
545+
"stroke": "#e2e8f0",
546+
"strokeWidth": 2,
547+
"fillOpacity": 0.1,
548+
"strokeOpacity": 1
549+
},
550+
"transform": {
551+
"x": 0,
552+
"y": 0,
553+
"rotation": 0,
554+
"scaleX": 1,
555+
"scaleY": 1
556+
}
557+
}
558+
]
559+
},
560+
{
561+
"id": "object.space-duel.light-enemy",
562+
"name": "Light Enemy",
563+
"tags": [
564+
"enemy",
565+
"light",
566+
"collision"
567+
],
568+
"objectOrigin": {
569+
"x": 0,
570+
"y": 0
571+
},
572+
"shapes": [
573+
{
574+
"tool": "polygon",
575+
"order": 0,
576+
"visible": true,
577+
"locked": false,
578+
"geometry": {
579+
"points": [
580+
{
581+
"x": 12,
582+
"y": 0
583+
},
584+
{
585+
"x": 4,
586+
"y": 11
587+
},
588+
{
589+
"x": -8,
590+
"y": 8
591+
},
592+
{
593+
"x": -12,
594+
"y": -2
595+
},
596+
{
597+
"x": -3,
598+
"y": -11
599+
},
600+
{
601+
"x": 9,
602+
"y": -8
603+
},
604+
{
605+
"x": 12,
606+
"y": 0
607+
}
608+
]
609+
},
610+
"style": {
611+
"fill": "#94a3b8",
612+
"stroke": "#e2e8f0",
613+
"strokeWidth": 2,
614+
"fillOpacity": 0.1,
615+
"strokeOpacity": 1
616+
},
617+
"transform": {
618+
"x": 0,
619+
"y": 0,
620+
"rotation": 0,
621+
"scaleX": 1,
622+
"scaleY": 1
623+
}
624+
}
625+
]
626+
},
627+
{
628+
"id": "object.space-duel.hazard",
629+
"name": "Hazard",
630+
"tags": [
631+
"hazard",
632+
"collision"
633+
],
634+
"objectOrigin": {
635+
"x": 0,
636+
"y": 0
637+
},
638+
"shapes": [
639+
{
640+
"tool": "circle",
641+
"order": 0,
642+
"visible": true,
643+
"locked": false,
644+
"geometry": {
645+
"cx": 0,
646+
"cy": 0,
647+
"r": 18
648+
},
649+
"style": {
650+
"fill": "#fecaca",
651+
"stroke": "#fca5a5",
652+
"strokeWidth": 2,
653+
"fillOpacity": 0.08,
654+
"strokeOpacity": 1
655+
},
656+
"transform": {
657+
"x": 0,
658+
"y": 0,
659+
"rotation": 0,
660+
"scaleX": 1,
661+
"scaleY": 1
662+
}
663+
}
664+
]
665+
},
666+
{
667+
"id": "object.space-duel.player-shot",
668+
"name": "Player Shot",
669+
"tags": [
670+
"projectile",
671+
"player",
672+
"collision"
673+
],
674+
"objectOrigin": {
675+
"x": 0,
676+
"y": 0
677+
},
678+
"shapes": [
679+
{
680+
"tool": "circle",
681+
"order": 0,
682+
"visible": true,
683+
"locked": false,
684+
"geometry": {
685+
"cx": 0,
686+
"cy": 0,
687+
"r": 2
688+
},
689+
"style": {
690+
"fill": "#f8fafc",
691+
"stroke": "#f8fafc",
692+
"strokeWidth": 2,
693+
"fillOpacity": 1,
694+
"strokeOpacity": 1
695+
},
696+
"transform": {
697+
"x": 0,
698+
"y": 0,
699+
"rotation": 0,
700+
"scaleX": 1,
701+
"scaleY": 1
702+
}
703+
}
704+
]
705+
},
706+
{
707+
"id": "object.space-duel.enemy-shot",
708+
"name": "Enemy Shot",
709+
"tags": [
710+
"projectile",
711+
"enemy",
712+
"collision"
713+
],
714+
"objectOrigin": {
715+
"x": 0,
716+
"y": 0
717+
},
718+
"shapes": [
719+
{
720+
"tool": "circle",
721+
"order": 0,
722+
"visible": true,
723+
"locked": false,
724+
"geometry": {
725+
"cx": 0,
726+
"cy": 0,
727+
"r": 3
728+
},
729+
"style": {
730+
"fill": "#f87171",
731+
"stroke": "#f87171",
732+
"strokeWidth": 2,
733+
"fillOpacity": 1,
734+
"strokeOpacity": 1
735+
},
736+
"transform": {
737+
"x": 0,
738+
"y": 0,
739+
"rotation": 0,
740+
"scaleX": 1,
741+
"scaleY": 1
742+
}
743+
}
744+
]
745+
}
746+
]
424747
}
425748
}
426749
}

0 commit comments

Comments
 (0)