@houtini/lm 1.0.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/CHANGELOG.md +273 -0
- package/LICENSE +21 -0
- package/README.md +203 -0
- package/dist/cache/analysis-cache.d.ts +33 -0
- package/dist/cache/analysis-cache.d.ts.map +1 -0
- package/dist/cache/analysis-cache.js +56 -0
- package/dist/cache/analysis-cache.js.map +1 -0
- package/dist/cache/cache-manager.d.ts +29 -0
- package/dist/cache/cache-manager.d.ts.map +1 -0
- package/dist/cache/cache-manager.js +85 -0
- package/dist/cache/cache-manager.js.map +1 -0
- package/dist/cache/index.d.ts +16 -0
- package/dist/cache/index.d.ts.map +1 -0
- package/dist/cache/index.js +17 -0
- package/dist/cache/index.js.map +1 -0
- package/dist/cache/prompt-cache.d.ts +33 -0
- package/dist/cache/prompt-cache.d.ts.map +1 -0
- package/dist/cache/prompt-cache.js +61 -0
- package/dist/cache/prompt-cache.js.map +1 -0
- package/dist/config.d.ts +43 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +70 -0
- package/dist/config.js.map +1 -0
- package/dist/core/ThreeStagePromptManager.d.ts +39 -0
- package/dist/core/ThreeStagePromptManager.d.ts.map +1 -0
- package/dist/core/ThreeStagePromptManager.js +176 -0
- package/dist/core/ThreeStagePromptManager.js.map +1 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +230 -0
- package/dist/index.js.map +1 -0
- package/dist/plugins/base-plugin.d.ts +47 -0
- package/dist/plugins/base-plugin.d.ts.map +1 -0
- package/dist/plugins/base-plugin.js +90 -0
- package/dist/plugins/base-plugin.js.map +1 -0
- package/dist/plugins/index.d.ts +58 -0
- package/dist/plugins/index.d.ts.map +1 -0
- package/dist/plugins/index.js +161 -0
- package/dist/plugins/index.js.map +1 -0
- package/dist/plugins/types.d.ts +5 -0
- package/dist/plugins/types.d.ts.map +1 -0
- package/dist/plugins/types.js +5 -0
- package/dist/plugins/types.js.map +1 -0
- package/dist/prompts/analyze/code-quality.d.ts +116 -0
- package/dist/prompts/analyze/code-quality.d.ts.map +1 -0
- package/dist/prompts/analyze/code-quality.js +433 -0
- package/dist/prompts/analyze/code-quality.js.map +1 -0
- package/dist/prompts/analyze/compare-integration.d.ts +130 -0
- package/dist/prompts/analyze/compare-integration.d.ts.map +1 -0
- package/dist/prompts/analyze/compare-integration.js +543 -0
- package/dist/prompts/analyze/compare-integration.js.map +1 -0
- package/dist/prompts/analyze/count-files.d.ts +109 -0
- package/dist/prompts/analyze/count-files.d.ts.map +1 -0
- package/dist/prompts/analyze/count-files.js +399 -0
- package/dist/prompts/analyze/count-files.js.map +1 -0
- package/dist/prompts/analyze/database-queries.d.ts +156 -0
- package/dist/prompts/analyze/database-queries.d.ts.map +1 -0
- package/dist/prompts/analyze/database-queries.js +759 -0
- package/dist/prompts/analyze/database-queries.js.map +1 -0
- package/dist/prompts/analyze/dependencies.d.ts +97 -0
- package/dist/prompts/analyze/dependencies.d.ts.map +1 -0
- package/dist/prompts/analyze/dependencies.js +333 -0
- package/dist/prompts/analyze/dependencies.js.map +1 -0
- package/dist/prompts/analyze/diff-signatures.d.ts +139 -0
- package/dist/prompts/analyze/diff-signatures.d.ts.map +1 -0
- package/dist/prompts/analyze/diff-signatures.js +702 -0
- package/dist/prompts/analyze/diff-signatures.js.map +1 -0
- package/dist/prompts/analyze/find-patterns.d.ts +128 -0
- package/dist/prompts/analyze/find-patterns.d.ts.map +1 -0
- package/dist/prompts/analyze/find-patterns.js +520 -0
- package/dist/prompts/analyze/find-patterns.js.map +1 -0
- package/dist/prompts/analyze/find-unused-css.d.ts +151 -0
- package/dist/prompts/analyze/find-unused-css.d.ts.map +1 -0
- package/dist/prompts/analyze/find-unused-css.js +754 -0
- package/dist/prompts/analyze/find-unused-css.js.map +1 -0
- package/dist/prompts/analyze/n8n-workflow.d.ts +137 -0
- package/dist/prompts/analyze/n8n-workflow.d.ts.map +1 -0
- package/dist/prompts/analyze/n8n-workflow.js +529 -0
- package/dist/prompts/analyze/n8n-workflow.js.map +1 -0
- package/dist/prompts/analyze/project-structure.d.ts +126 -0
- package/dist/prompts/analyze/project-structure.d.ts.map +1 -0
- package/dist/prompts/analyze/project-structure.js +569 -0
- package/dist/prompts/analyze/project-structure.js.map +1 -0
- package/dist/prompts/analyze/security-audit.d.ts +142 -0
- package/dist/prompts/analyze/security-audit.d.ts.map +1 -0
- package/dist/prompts/analyze/security-audit.js +637 -0
- package/dist/prompts/analyze/security-audit.js.map +1 -0
- package/dist/prompts/analyze/single-file.d.ts +162 -0
- package/dist/prompts/analyze/single-file.d.ts.map +1 -0
- package/dist/prompts/analyze/single-file.js +665 -0
- package/dist/prompts/analyze/single-file.js.map +1 -0
- package/dist/prompts/analyze/trace-execution.d.ts +126 -0
- package/dist/prompts/analyze/trace-execution.d.ts.map +1 -0
- package/dist/prompts/analyze/trace-execution.js +609 -0
- package/dist/prompts/analyze/trace-execution.js.map +1 -0
- package/dist/prompts/analyze/wordpress-plugin-audit.d.ts +116 -0
- package/dist/prompts/analyze/wordpress-plugin-audit.d.ts.map +1 -0
- package/dist/prompts/analyze/wordpress-plugin-audit.js +454 -0
- package/dist/prompts/analyze/wordpress-plugin-audit.js.map +1 -0
- package/dist/prompts/analyze/wordpress-security.d.ts +146 -0
- package/dist/prompts/analyze/wordpress-security.d.ts.map +1 -0
- package/dist/prompts/analyze/wordpress-security.js +698 -0
- package/dist/prompts/analyze/wordpress-security.js.map +1 -0
- package/dist/prompts/analyze/wordpress-theme-audit.d.ts +114 -0
- package/dist/prompts/analyze/wordpress-theme-audit.d.ts.map +1 -0
- package/dist/prompts/analyze/wordpress-theme-audit.js +538 -0
- package/dist/prompts/analyze/wordpress-theme-audit.js.map +1 -0
- package/dist/prompts/custom/custom-prompt.d.ts +135 -0
- package/dist/prompts/custom/custom-prompt.d.ts.map +1 -0
- package/dist/prompts/custom/custom-prompt.js +419 -0
- package/dist/prompts/custom/custom-prompt.js.map +1 -0
- package/dist/prompts/fun/arcade-game.d.ts +152 -0
- package/dist/prompts/fun/arcade-game.d.ts.map +1 -0
- package/dist/prompts/fun/arcade-game.js +653 -0
- package/dist/prompts/fun/arcade-game.js.map +1 -0
- package/dist/prompts/fun/create_text_adventure.d.ts +100 -0
- package/dist/prompts/fun/create_text_adventure.d.ts.map +1 -0
- package/dist/prompts/fun/create_text_adventure.js +397 -0
- package/dist/prompts/fun/create_text_adventure.js.map +1 -0
- package/dist/prompts/fun/css-art-generator.d.ts +168 -0
- package/dist/prompts/fun/css-art-generator.d.ts.map +1 -0
- package/dist/prompts/fun/css-art-generator.js +827 -0
- package/dist/prompts/fun/css-art-generator.js.map +1 -0
- package/dist/prompts/generate/project-documentation.d.ts +137 -0
- package/dist/prompts/generate/project-documentation.d.ts.map +1 -0
- package/dist/prompts/generate/project-documentation.js +666 -0
- package/dist/prompts/generate/project-documentation.js.map +1 -0
- package/dist/prompts/generate/refactoring.d.ts +164 -0
- package/dist/prompts/generate/refactoring.d.ts.map +1 -0
- package/dist/prompts/generate/refactoring.js +621 -0
- package/dist/prompts/generate/refactoring.js.map +1 -0
- package/dist/prompts/generate/responsive-component.d.ts +147 -0
- package/dist/prompts/generate/responsive-component.d.ts.map +1 -0
- package/dist/prompts/generate/responsive-component.js +955 -0
- package/dist/prompts/generate/responsive-component.js.map +1 -0
- package/dist/prompts/generate/typescript-conversion.d.ts +144 -0
- package/dist/prompts/generate/typescript-conversion.d.ts.map +1 -0
- package/dist/prompts/generate/typescript-conversion.js +527 -0
- package/dist/prompts/generate/typescript-conversion.js.map +1 -0
- package/dist/prompts/generate/unit-tests.d.ts +139 -0
- package/dist/prompts/generate/unit-tests.d.ts.map +1 -0
- package/dist/prompts/generate/unit-tests.js +578 -0
- package/dist/prompts/generate/unit-tests.js.map +1 -0
- package/dist/prompts/generate/wordpress-plugin.d.ts +179 -0
- package/dist/prompts/generate/wordpress-plugin.d.ts.map +1 -0
- package/dist/prompts/generate/wordpress-plugin.js +763 -0
- package/dist/prompts/generate/wordpress-plugin.js.map +1 -0
- package/dist/prompts/generate/wordpress-theme-from-static.d.ts +177 -0
- package/dist/prompts/generate/wordpress-theme-from-static.d.ts.map +1 -0
- package/dist/prompts/generate/wordpress-theme-from-static.js +695 -0
- package/dist/prompts/generate/wordpress-theme-from-static.js.map +1 -0
- package/dist/prompts/shared/cache-manager.d.ts +45 -0
- package/dist/prompts/shared/cache-manager.d.ts.map +1 -0
- package/dist/prompts/shared/cache-manager.js +129 -0
- package/dist/prompts/shared/cache-manager.js.map +1 -0
- package/dist/prompts/shared/helpers.d.ts +39 -0
- package/dist/prompts/shared/helpers.d.ts.map +1 -0
- package/dist/prompts/shared/helpers.js +151 -0
- package/dist/prompts/shared/helpers.js.map +1 -0
- package/dist/prompts/shared/templates.d.ts +35 -0
- package/dist/prompts/shared/templates.d.ts.map +1 -0
- package/dist/prompts/shared/templates.js +77 -0
- package/dist/prompts/shared/templates.js.map +1 -0
- package/dist/prompts/shared/types.d.ts +112 -0
- package/dist/prompts/shared/types.d.ts.map +1 -0
- package/dist/prompts/shared/types.js +5 -0
- package/dist/prompts/shared/types.js.map +1 -0
- package/dist/prompts/system/find-unused-files.d.ts +106 -0
- package/dist/prompts/system/find-unused-files.d.ts.map +1 -0
- package/dist/prompts/system/find-unused-files.js +353 -0
- package/dist/prompts/system/find-unused-files.js.map +1 -0
- package/dist/security/index.d.ts +39 -0
- package/dist/security/index.d.ts.map +1 -0
- package/dist/security/index.js +46 -0
- package/dist/security/index.js.map +1 -0
- package/dist/security/integration-helpers.d.ts +121 -0
- package/dist/security/integration-helpers.d.ts.map +1 -0
- package/dist/security/integration-helpers.js +190 -0
- package/dist/security/integration-helpers.js.map +1 -0
- package/dist/security/output-encoder.d.ts +94 -0
- package/dist/security/output-encoder.d.ts.map +1 -0
- package/dist/security/output-encoder.js +295 -0
- package/dist/security/output-encoder.js.map +1 -0
- package/dist/security/prompt-injection-guard.d.ts +59 -0
- package/dist/security/prompt-injection-guard.d.ts.map +1 -0
- package/dist/security/prompt-injection-guard.js +249 -0
- package/dist/security/prompt-injection-guard.js.map +1 -0
- package/dist/security/sanitisation.d.ts +67 -0
- package/dist/security/sanitisation.d.ts.map +1 -0
- package/dist/security/sanitisation.js +398 -0
- package/dist/security/sanitisation.js.map +1 -0
- package/dist/security/security-service.d.ts +103 -0
- package/dist/security/security-service.d.ts.map +1 -0
- package/dist/security/security-service.js +303 -0
- package/dist/security/security-service.js.map +1 -0
- package/dist/security-config.d.ts +45 -0
- package/dist/security-config.d.ts.map +1 -0
- package/dist/security-config.js +63 -0
- package/dist/security-config.js.map +1 -0
- package/dist/system/function-list.d.ts +61 -0
- package/dist/system/function-list.d.ts.map +1 -0
- package/dist/system/function-list.js +111 -0
- package/dist/system/function-list.js.map +1 -0
- package/dist/system/function-registry.d.ts +23 -0
- package/dist/system/function-registry.d.ts.map +1 -0
- package/dist/system/function-registry.js +136 -0
- package/dist/system/function-registry.js.map +1 -0
- package/dist/system/health-check.d.ts +33 -0
- package/dist/system/health-check.d.ts.map +1 -0
- package/dist/system/health-check.js +98 -0
- package/dist/system/health-check.js.map +1 -0
- package/dist/system/path-resolver.d.ts +55 -0
- package/dist/system/path-resolver.d.ts.map +1 -0
- package/dist/system/path-resolver.js +90 -0
- package/dist/system/path-resolver.js.map +1 -0
- package/dist/templates/plugin-template.d.ts +121 -0
- package/dist/templates/plugin-template.d.ts.map +1 -0
- package/dist/templates/plugin-template.js +450 -0
- package/dist/templates/plugin-template.js.map +1 -0
- package/dist/types/chunking-types.d.ts +88 -0
- package/dist/types/chunking-types.d.ts.map +1 -0
- package/dist/types/chunking-types.js +18 -0
- package/dist/types/chunking-types.js.map +1 -0
- package/dist/types/prompt-stages.d.ts +42 -0
- package/dist/types/prompt-stages.d.ts.map +1 -0
- package/dist/types/prompt-stages.js +6 -0
- package/dist/types/prompt-stages.js.map +1 -0
- package/dist/types.d.ts +46 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +6 -0
- package/dist/types.js.map +1 -0
- package/dist/utils/css-parser.d.ts +26 -0
- package/dist/utils/css-parser.d.ts.map +1 -0
- package/dist/utils/css-parser.js +117 -0
- package/dist/utils/css-parser.js.map +1 -0
- package/dist/utils/path-resolver.d.ts +13 -0
- package/dist/utils/path-resolver.d.ts.map +1 -0
- package/dist/utils/path-resolver.js +78 -0
- package/dist/utils/path-resolver.js.map +1 -0
- package/dist/utils/plugin-utilities.d.ts +171 -0
- package/dist/utils/plugin-utilities.d.ts.map +1 -0
- package/dist/utils/plugin-utilities.js +221 -0
- package/dist/utils/plugin-utilities.js.map +1 -0
- package/dist/utils/streamHandler.d.ts +3 -0
- package/dist/utils/streamHandler.d.ts.map +1 -0
- package/dist/utils/streamHandler.js +137 -0
- package/dist/utils/streamHandler.js.map +1 -0
- package/dist/validation/output-validator.d.ts +136 -0
- package/dist/validation/output-validator.d.ts.map +1 -0
- package/dist/validation/output-validator.js +262 -0
- package/dist/validation/output-validator.js.map +1 -0
- package/dist/validation/response-factory.d.ts +44 -0
- package/dist/validation/response-factory.d.ts.map +1 -0
- package/dist/validation/response-factory.js +202 -0
- package/dist/validation/response-factory.js.map +1 -0
- package/dist/validation/schemas.d.ts +519 -0
- package/dist/validation/schemas.d.ts.map +1 -0
- package/dist/validation/schemas.js +6 -0
- package/dist/validation/schemas.js.map +1 -0
- package/package.json +72 -0
|
@@ -0,0 +1,653 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Arcade Game Generator Plugin - Modern v4.3
|
|
3
|
+
*
|
|
4
|
+
* Generates complete playable 2D arcade games using HTML5 Canvas
|
|
5
|
+
* Automatically detects single-game or multi-game generation mode
|
|
6
|
+
*
|
|
7
|
+
* Built with the universal template for consistency and performance
|
|
8
|
+
*/
|
|
9
|
+
import { BasePlugin } from '../../plugins/base-plugin.js';
|
|
10
|
+
import { ThreeStagePromptManager } from '../../core/ThreeStagePromptManager.js';
|
|
11
|
+
import { withSecurity } from '../../security/integration-helpers.js';
|
|
12
|
+
import { readFileContent } from '../shared/helpers.js';
|
|
13
|
+
import { ModelSetup, ResponseProcessor, ParameterValidator, ErrorHandler, MultiFileAnalysis } from '../../utils/plugin-utilities.js';
|
|
14
|
+
import { getAnalysisCache } from '../../cache/index.js';
|
|
15
|
+
// Common Node.js modules - Use these instead of require()
|
|
16
|
+
import { basename, extname, relative } from 'path';
|
|
17
|
+
import { readFile, stat } from 'fs/promises';
|
|
18
|
+
export class ArcadeGameGenerator extends BasePlugin {
|
|
19
|
+
constructor() {
|
|
20
|
+
super();
|
|
21
|
+
this.name = 'arcade_game';
|
|
22
|
+
this.category = 'generate';
|
|
23
|
+
this.description = 'Generate complete playable 2D arcade games using HTML5 Canvas with player controls, enemies, and game mechanics';
|
|
24
|
+
// Universal parameter set - supports both single and multi-game scenarios
|
|
25
|
+
this.parameters = {
|
|
26
|
+
// Single-game parameters
|
|
27
|
+
code: {
|
|
28
|
+
type: 'string',
|
|
29
|
+
description: 'Existing game code to enhance (for single-game analysis)',
|
|
30
|
+
required: false
|
|
31
|
+
},
|
|
32
|
+
filePath: {
|
|
33
|
+
type: 'string',
|
|
34
|
+
description: 'Path to existing game file to enhance',
|
|
35
|
+
required: false
|
|
36
|
+
},
|
|
37
|
+
// Multi-game parameters
|
|
38
|
+
projectPath: {
|
|
39
|
+
type: 'string',
|
|
40
|
+
description: 'Path to project root (for multi-game generation)',
|
|
41
|
+
required: false
|
|
42
|
+
},
|
|
43
|
+
files: {
|
|
44
|
+
type: 'array',
|
|
45
|
+
description: 'Array of specific game files (for multi-game analysis)',
|
|
46
|
+
required: false,
|
|
47
|
+
items: { type: 'string' }
|
|
48
|
+
},
|
|
49
|
+
maxDepth: {
|
|
50
|
+
type: 'number',
|
|
51
|
+
description: 'Maximum directory depth for game file discovery (1-3)',
|
|
52
|
+
required: false,
|
|
53
|
+
default: 2
|
|
54
|
+
},
|
|
55
|
+
// Arcade game specific parameters
|
|
56
|
+
gameType: {
|
|
57
|
+
type: 'string',
|
|
58
|
+
description: 'Type of arcade game to generate',
|
|
59
|
+
enum: ['shooter', 'platformer', 'puzzle', 'snake', 'breakout', 'asteroids', 'custom'],
|
|
60
|
+
default: 'shooter',
|
|
61
|
+
required: false
|
|
62
|
+
},
|
|
63
|
+
difficulty: {
|
|
64
|
+
type: 'string',
|
|
65
|
+
description: 'Game difficulty level',
|
|
66
|
+
enum: ['easy', 'medium', 'hard', 'adaptive'],
|
|
67
|
+
default: 'medium',
|
|
68
|
+
required: false
|
|
69
|
+
},
|
|
70
|
+
features: {
|
|
71
|
+
type: 'array',
|
|
72
|
+
description: 'Game features to include',
|
|
73
|
+
items: { type: 'string' },
|
|
74
|
+
default: ['score', 'lives', 'powerups', 'sound'],
|
|
75
|
+
required: false
|
|
76
|
+
},
|
|
77
|
+
theme: {
|
|
78
|
+
type: 'string',
|
|
79
|
+
description: 'Visual theme for the game',
|
|
80
|
+
enum: ['retro', 'neon', 'pixel', 'minimal', 'space', 'nature', 'custom'],
|
|
81
|
+
default: 'retro',
|
|
82
|
+
required: false
|
|
83
|
+
},
|
|
84
|
+
controls: {
|
|
85
|
+
type: 'string',
|
|
86
|
+
description: 'Control scheme',
|
|
87
|
+
enum: ['wasd', 'arrows', 'mouse', 'touch', 'hybrid'],
|
|
88
|
+
default: 'hybrid',
|
|
89
|
+
required: false
|
|
90
|
+
},
|
|
91
|
+
// Universal parameters
|
|
92
|
+
language: {
|
|
93
|
+
type: 'string',
|
|
94
|
+
description: 'Programming language',
|
|
95
|
+
required: false,
|
|
96
|
+
default: 'javascript'
|
|
97
|
+
},
|
|
98
|
+
analysisDepth: {
|
|
99
|
+
type: 'string',
|
|
100
|
+
description: 'Level of game complexity',
|
|
101
|
+
enum: ['basic', 'detailed', 'comprehensive'],
|
|
102
|
+
default: 'detailed',
|
|
103
|
+
required: false
|
|
104
|
+
},
|
|
105
|
+
analysisType: {
|
|
106
|
+
type: 'string',
|
|
107
|
+
description: 'Type of game generation to perform',
|
|
108
|
+
enum: ['prototype', 'polished', 'comprehensive'],
|
|
109
|
+
default: 'comprehensive',
|
|
110
|
+
required: false
|
|
111
|
+
}
|
|
112
|
+
};
|
|
113
|
+
this.analysisCache = getAnalysisCache();
|
|
114
|
+
this.multiFileAnalysis = new MultiFileAnalysis();
|
|
115
|
+
// Cache and analysis utilities are initialized above
|
|
116
|
+
}
|
|
117
|
+
async execute(params, llmClient) {
|
|
118
|
+
return await withSecurity(this, params, llmClient, async (secureParams) => {
|
|
119
|
+
try {
|
|
120
|
+
// 1. Auto-detect analysis mode based on parameters
|
|
121
|
+
const analysisMode = this.detectAnalysisMode(secureParams);
|
|
122
|
+
// 2. Validate parameters based on detected mode
|
|
123
|
+
this.validateParameters(secureParams, analysisMode);
|
|
124
|
+
// 3. Setup model
|
|
125
|
+
const { model, contextLength } = await ModelSetup.getReadyModel(llmClient);
|
|
126
|
+
// 4. Route to appropriate generation method
|
|
127
|
+
if (analysisMode === 'single-file') {
|
|
128
|
+
return await this.executeSingleGameGeneration(secureParams, model, contextLength);
|
|
129
|
+
}
|
|
130
|
+
else {
|
|
131
|
+
return await this.executeMultiGameGeneration(secureParams, model, contextLength);
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
catch (error) {
|
|
135
|
+
return ErrorHandler.createExecutionError('arcade_game', error);
|
|
136
|
+
}
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
/**
|
|
140
|
+
* Auto-detect whether this is single-game or multi-game generation
|
|
141
|
+
*
|
|
142
|
+
* For arcade games, single-game is the primary use case
|
|
143
|
+
* Multi-game mode used for generating game collections or enhancing existing projects
|
|
144
|
+
*/
|
|
145
|
+
detectAnalysisMode(params) {
|
|
146
|
+
// Single-file indicators take priority (avoids default parameter issues)
|
|
147
|
+
if (params.code || params.filePath) {
|
|
148
|
+
return 'single-file';
|
|
149
|
+
}
|
|
150
|
+
// Multi-file indicators (game collections, project enhancement)
|
|
151
|
+
if (params.projectPath || params.files) {
|
|
152
|
+
return 'multi-file';
|
|
153
|
+
}
|
|
154
|
+
// Default to single-file for arcade game generation (game-focused)
|
|
155
|
+
return 'single-file';
|
|
156
|
+
}
|
|
157
|
+
/**
|
|
158
|
+
* Validate parameters based on detected analysis mode
|
|
159
|
+
*/
|
|
160
|
+
validateParameters(params, mode) {
|
|
161
|
+
if (mode === 'single-file') {
|
|
162
|
+
// Single-game generation doesn't require code/file - can generate from scratch
|
|
163
|
+
}
|
|
164
|
+
else {
|
|
165
|
+
ParameterValidator.validateProjectPath(params);
|
|
166
|
+
ParameterValidator.validateDepth(params);
|
|
167
|
+
}
|
|
168
|
+
// Universal validations
|
|
169
|
+
ParameterValidator.validateEnum(params, 'analysisType', ['prototype', 'polished', 'comprehensive']);
|
|
170
|
+
ParameterValidator.validateEnum(params, 'analysisDepth', ['basic', 'detailed', 'comprehensive']);
|
|
171
|
+
ParameterValidator.validateEnum(params, 'gameType', ['shooter', 'platformer', 'puzzle', 'snake', 'breakout', 'asteroids', 'custom']);
|
|
172
|
+
}
|
|
173
|
+
/**
|
|
174
|
+
* Execute single-game generation
|
|
175
|
+
*/
|
|
176
|
+
async executeSingleGameGeneration(params, model, contextLength) {
|
|
177
|
+
// Process existing game input (if any)
|
|
178
|
+
let existingGameCode = params.code;
|
|
179
|
+
if (params.filePath) {
|
|
180
|
+
existingGameCode = await readFileContent(params.filePath);
|
|
181
|
+
}
|
|
182
|
+
// Generate prompt stages for single game
|
|
183
|
+
const promptStages = this.getSingleGamePromptStages({
|
|
184
|
+
...params,
|
|
185
|
+
code: existingGameCode
|
|
186
|
+
});
|
|
187
|
+
// Execute with appropriate method
|
|
188
|
+
const promptManager = new ThreeStagePromptManager(contextLength);
|
|
189
|
+
const needsChunking = promptManager.needsChunking(promptStages);
|
|
190
|
+
if (needsChunking) {
|
|
191
|
+
const conversation = promptManager.createChunkedConversation(promptStages);
|
|
192
|
+
const messages = [
|
|
193
|
+
conversation.systemMessage,
|
|
194
|
+
...conversation.dataMessages,
|
|
195
|
+
conversation.analysisMessage
|
|
196
|
+
];
|
|
197
|
+
return await ResponseProcessor.executeChunked(messages, model, contextLength, 'arcade_game', 'single');
|
|
198
|
+
}
|
|
199
|
+
else {
|
|
200
|
+
return await ResponseProcessor.executeDirect(promptStages, model, contextLength, 'arcade_game');
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
/**
|
|
204
|
+
* Execute multi-game generation
|
|
205
|
+
*/
|
|
206
|
+
async executeMultiGameGeneration(params, model, contextLength) {
|
|
207
|
+
// Discover existing game files
|
|
208
|
+
let filesToAnalyze = params.files ||
|
|
209
|
+
await this.discoverRelevantFiles(params.projectPath, params.maxDepth, params.analysisType);
|
|
210
|
+
// Perform multi-game analysis with caching
|
|
211
|
+
const analysisResult = await this.performMultiGameAnalysis(filesToAnalyze, params, model, contextLength);
|
|
212
|
+
// Generate prompt stages for multi-game
|
|
213
|
+
const promptStages = this.getMultiGamePromptStages({
|
|
214
|
+
...params,
|
|
215
|
+
analysisResult,
|
|
216
|
+
gameCount: filesToAnalyze.length
|
|
217
|
+
});
|
|
218
|
+
// Always use chunking for multi-game
|
|
219
|
+
const promptManager = new ThreeStagePromptManager(contextLength);
|
|
220
|
+
const conversation = promptManager.createChunkedConversation(promptStages);
|
|
221
|
+
const messages = [
|
|
222
|
+
conversation.systemMessage,
|
|
223
|
+
...conversation.dataMessages,
|
|
224
|
+
conversation.analysisMessage
|
|
225
|
+
];
|
|
226
|
+
return await ResponseProcessor.executeChunked(messages, model, contextLength, 'arcade_game', 'multifile');
|
|
227
|
+
}
|
|
228
|
+
/**
|
|
229
|
+
* Single-game prompt stages - Generate a complete playable arcade game
|
|
230
|
+
*/
|
|
231
|
+
getSingleGamePromptStages(params) {
|
|
232
|
+
const { gameType, difficulty, features, theme, controls, analysisDepth, analysisType, code } = params;
|
|
233
|
+
const systemAndContext = `You are a legendary game developer and creative genius specializing in ${analysisDepth} ${analysisType} arcade game creation.
|
|
234
|
+
|
|
235
|
+
**Your Mission**: Create a complete, playable, and FUN ${gameType} arcade game that will immediately delight and engage players.
|
|
236
|
+
|
|
237
|
+
**Game Development Context:**
|
|
238
|
+
- Game Type: ${gameType}
|
|
239
|
+
- Difficulty: ${difficulty}
|
|
240
|
+
- Theme: ${theme}
|
|
241
|
+
- Controls: ${controls}
|
|
242
|
+
- Features: ${JSON.stringify(features)}
|
|
243
|
+
- Complexity: ${analysisDepth}
|
|
244
|
+
- Polish Level: ${analysisType}
|
|
245
|
+
|
|
246
|
+
**Your World-Class Expertise:**
|
|
247
|
+
- 20+ years creating addictive arcade games that players can't put down
|
|
248
|
+
- Master of HTML5 Canvas, game physics, and smooth 60fps gameplay
|
|
249
|
+
- Expert in player psychology - you know what makes games instantly fun
|
|
250
|
+
- Specialized in clean, readable code that's easy to understand and modify
|
|
251
|
+
- Pioneer of elegant game architectures with proper separation of concerns
|
|
252
|
+
|
|
253
|
+
**Game Development Philosophy:**
|
|
254
|
+
1. **Instant Fun** - Game should be enjoyable within 5 seconds of loading
|
|
255
|
+
2. **Progressive Challenge** - Start easy, gradually increase difficulty
|
|
256
|
+
3. **Juicy Feedback** - Visual and audio feedback for every player action
|
|
257
|
+
4. **Clean Architecture** - Organized code with clear game loop, entities, and systems
|
|
258
|
+
5. **Responsive Design** - Works perfectly on any screen size
|
|
259
|
+
6. **Educational Value** - Code should teach good game development practices
|
|
260
|
+
|
|
261
|
+
**Technical Requirements:**
|
|
262
|
+
- Pure HTML5 Canvas and JavaScript (no external dependencies)
|
|
263
|
+
- Smooth 60fps gameplay with proper game loop timing
|
|
264
|
+
- Responsive canvas that adapts to screen size
|
|
265
|
+
- Clean object-oriented design with Player, Enemy, and Game classes
|
|
266
|
+
- Collision detection system optimized for performance
|
|
267
|
+
- Particle effects for visual polish (explosions, trails, etc.)
|
|
268
|
+
- Score system with local storage persistence
|
|
269
|
+
- Professional code comments explaining game development concepts
|
|
270
|
+
|
|
271
|
+
**Creative Requirements:**
|
|
272
|
+
- Engaging visual style that matches the ${theme} theme
|
|
273
|
+
- Intuitive ${controls} controls that feel responsive
|
|
274
|
+
- Satisfying game mechanics that create flow state
|
|
275
|
+
- Progressive difficulty that keeps players engaged
|
|
276
|
+
- Polish details that make the game feel professional
|
|
277
|
+
|
|
278
|
+
Your task is to create a masterpiece arcade game that showcases both technical excellence and creative brilliance.`;
|
|
279
|
+
const dataPayload = code ? `**Existing Game Code to Enhance:**
|
|
280
|
+
|
|
281
|
+
\`\`\`javascript
|
|
282
|
+
${code}
|
|
283
|
+
\`\`\`
|
|
284
|
+
|
|
285
|
+
**Enhancement Request:**
|
|
286
|
+
Please analyze the existing game and enhance it with the requested features while maintaining the core gameplay.` :
|
|
287
|
+
`**New Game Generation Request:**
|
|
288
|
+
Create a brand new ${gameType} game from scratch with the specified parameters.
|
|
289
|
+
|
|
290
|
+
**Inspiration for ${gameType} games:**
|
|
291
|
+
${this.getGameTypeInspiration(gameType)}
|
|
292
|
+
|
|
293
|
+
**Theme Guidelines for ${theme}:**
|
|
294
|
+
${this.getThemeGuidelines(theme)}`;
|
|
295
|
+
const outputInstructions = `**Generate a complete, playable arcade game as a single HTML file:**
|
|
296
|
+
|
|
297
|
+
\`\`\`html
|
|
298
|
+
<!DOCTYPE html>
|
|
299
|
+
<html lang="en">
|
|
300
|
+
<head>
|
|
301
|
+
<meta charset="UTF-8">
|
|
302
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
303
|
+
<title>${gameType.charAt(0).toUpperCase() + gameType.slice(1)} Game</title>
|
|
304
|
+
<style>
|
|
305
|
+
/* Beautiful ${theme}-themed CSS styling */
|
|
306
|
+
/* Responsive design that works on all screen sizes */
|
|
307
|
+
/* Professional visual polish */
|
|
308
|
+
</style>
|
|
309
|
+
</head>
|
|
310
|
+
<body>
|
|
311
|
+
<canvas id="gameCanvas"></canvas>
|
|
312
|
+
<script>
|
|
313
|
+
// Complete, production-ready game code including:
|
|
314
|
+
|
|
315
|
+
// 1. GAME CONFIGURATION
|
|
316
|
+
const GAME_CONFIG = {
|
|
317
|
+
// All game constants and settings
|
|
318
|
+
};
|
|
319
|
+
|
|
320
|
+
// 2. UTILITY FUNCTIONS
|
|
321
|
+
class Vector2 {
|
|
322
|
+
// 2D vector math for positions and movement
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
class Utils {
|
|
326
|
+
// Collision detection, random generators, etc.
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
// 3. GAME ENTITIES
|
|
330
|
+
class Player {
|
|
331
|
+
// Player character with movement, animation, abilities
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
class Enemy {
|
|
335
|
+
// Enemy AI, spawning, different types
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
class Projectile {
|
|
339
|
+
// Bullets, missiles, etc. with physics
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
class Powerup {
|
|
343
|
+
// Power-ups, collectibles, bonuses
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
class Particle {
|
|
347
|
+
// Visual effects system for polish
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
// 4. GAME SYSTEMS
|
|
351
|
+
class InputManager {
|
|
352
|
+
// ${controls} input handling with smooth controls
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
class AudioManager {
|
|
356
|
+
// Sound effects using Web Audio API (optional)
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
class ScoreManager {
|
|
360
|
+
// Scoring, high scores, local storage
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
// 5. MAIN GAME CLASS
|
|
364
|
+
class Game {
|
|
365
|
+
constructor() {
|
|
366
|
+
// Initialize game systems
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
init() {
|
|
370
|
+
// Setup canvas, event listeners, initial state
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
gameLoop() {
|
|
374
|
+
// Main 60fps game loop
|
|
375
|
+
this.update();
|
|
376
|
+
this.render();
|
|
377
|
+
requestAnimationFrame(() => this.gameLoop());
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
update() {
|
|
381
|
+
// Update all game entities and systems
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
render() {
|
|
385
|
+
// Draw everything to canvas
|
|
386
|
+
}
|
|
387
|
+
|
|
388
|
+
// Additional game state methods (start, pause, gameOver, etc.)
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
// 6. GAME INITIALIZATION
|
|
392
|
+
const game = new Game();
|
|
393
|
+
game.init();
|
|
394
|
+
game.gameLoop();
|
|
395
|
+
</script>
|
|
396
|
+
</body>
|
|
397
|
+
</html>
|
|
398
|
+
\`\`\`
|
|
399
|
+
|
|
400
|
+
**Critical Requirements:**
|
|
401
|
+
✅ Complete, runnable HTML file - no external dependencies
|
|
402
|
+
✅ Smooth 60fps gameplay with proper timing
|
|
403
|
+
✅ Responsive design that works on any screen size
|
|
404
|
+
✅ Professional code organization with clear separation of concerns
|
|
405
|
+
✅ Engaging ${gameType} gameplay that's immediately fun
|
|
406
|
+
✅ Beautiful ${theme} visual style with polished UI
|
|
407
|
+
✅ Intuitive ${controls} controls that feel responsive
|
|
408
|
+
✅ All requested features: ${JSON.stringify(features)}
|
|
409
|
+
✅ Educational code comments explaining game development concepts
|
|
410
|
+
✅ Ready to copy-paste and play immediately
|
|
411
|
+
|
|
412
|
+
**Visual Polish Standards:**
|
|
413
|
+
- Smooth animations and transitions
|
|
414
|
+
- Particle effects for explosions, collection, etc.
|
|
415
|
+
- Screen shake for impact feedback
|
|
416
|
+
- Color-coded UI elements for clarity
|
|
417
|
+
- Professional typography and layout
|
|
418
|
+
- Visual feedback for all player actions
|
|
419
|
+
|
|
420
|
+
**Code Quality Standards:**
|
|
421
|
+
- Clean, readable, well-documented code
|
|
422
|
+
- Proper object-oriented design patterns
|
|
423
|
+
- Performance optimizations for smooth gameplay
|
|
424
|
+
- Error handling and edge case management
|
|
425
|
+
- Easy to understand and modify for learning
|
|
426
|
+
|
|
427
|
+
Create an arcade game that players will love and developers will learn from!`;
|
|
428
|
+
return { systemAndContext, dataPayload, outputInstructions };
|
|
429
|
+
}
|
|
430
|
+
/**
|
|
431
|
+
* Multi-game prompt stages - Generate game collections or enhance projects
|
|
432
|
+
*/
|
|
433
|
+
getMultiGamePromptStages(params) {
|
|
434
|
+
const { analysisResult, analysisType, analysisDepth, gameCount, gameType, theme } = params;
|
|
435
|
+
const systemAndContext = `You are a master game designer and technical architect specializing in ${analysisDepth} ${analysisType} game collection development.
|
|
436
|
+
|
|
437
|
+
**Your Mission**: Create a comprehensive game collection or enhance an existing game project with multiple interconnected games.
|
|
438
|
+
|
|
439
|
+
**Collection Development Context:**
|
|
440
|
+
- Collection Type: ${analysisType}
|
|
441
|
+
- Collection Depth: ${analysisDepth}
|
|
442
|
+
- Games in Collection: ${gameCount}
|
|
443
|
+
- Primary Game Type: ${gameType}
|
|
444
|
+
- Unifying Theme: ${theme}
|
|
445
|
+
- Mode: Multi-Game Collection Development
|
|
446
|
+
|
|
447
|
+
**Your Elite Expertise:**
|
|
448
|
+
- 20+ years architecting game collections and interactive experiences
|
|
449
|
+
- Expert in creating cohesive game ecosystems with shared systems
|
|
450
|
+
- Master of scalable game architectures and reusable components
|
|
451
|
+
- Specialized in player progression across multiple game experiences
|
|
452
|
+
- Pioneer of elegant multi-game frameworks with shared resources
|
|
453
|
+
|
|
454
|
+
**Collection Architecture Philosophy:**
|
|
455
|
+
1. **Shared Foundation** - Common systems across all games (input, audio, graphics)
|
|
456
|
+
2. **Progressive Complexity** - Games build on each other's mechanics
|
|
457
|
+
3. **Unified Experience** - Consistent visual style and interaction patterns
|
|
458
|
+
4. **Modular Design** - Easy to add new games to the collection
|
|
459
|
+
5. **Player Journey** - Meaningful progression and unlocks across games
|
|
460
|
+
6. **Technical Excellence** - Optimized performance and clean architecture
|
|
461
|
+
|
|
462
|
+
Your task is to create a masterful game collection that showcases both individual game brilliance and cohesive ecosystem design.`;
|
|
463
|
+
const dataPayload = `**Game Collection Analysis Results:**
|
|
464
|
+
|
|
465
|
+
${JSON.stringify(analysisResult, null, 2)}`;
|
|
466
|
+
const outputInstructions = `**Generate a comprehensive multi-game collection as multiple coordinated files:**
|
|
467
|
+
|
|
468
|
+
\`\`\`
|
|
469
|
+
// File Structure:
|
|
470
|
+
index.html // Main game collection launcher
|
|
471
|
+
shared/
|
|
472
|
+
game-engine.js // Shared game engine and utilities
|
|
473
|
+
ui-framework.js // Common UI components
|
|
474
|
+
asset-manager.js // Resource loading and management
|
|
475
|
+
audio-system.js // Unified audio management
|
|
476
|
+
games/
|
|
477
|
+
${gameType}-1.js // Individual game modules
|
|
478
|
+
${gameType}-2.js // Each game as a separate module
|
|
479
|
+
${gameType}-3.js // Following consistent architecture
|
|
480
|
+
styles/
|
|
481
|
+
collection.css // Unified ${theme} styling
|
|
482
|
+
responsive.css // Mobile-friendly design
|
|
483
|
+
\`\`\`
|
|
484
|
+
|
|
485
|
+
**Collection Features:**
|
|
486
|
+
- **Game Launcher**: Beautiful menu system for selecting games
|
|
487
|
+
- **Shared Progress**: Unified scoring and achievement system
|
|
488
|
+
- **Consistent UX**: Same controls and UI patterns across games
|
|
489
|
+
- **Progressive Unlocks**: Games unlock as players progress
|
|
490
|
+
- **Leaderboards**: Competition across the entire collection
|
|
491
|
+
- **Modular Architecture**: Easy to add new games to the collection
|
|
492
|
+
- **Professional Polish**: Cohesive ${theme} visual identity
|
|
493
|
+
|
|
494
|
+
**Technical Architecture:**
|
|
495
|
+
- Shared game engine with common systems (physics, rendering, input)
|
|
496
|
+
- Plugin-style game modules that extend the base engine
|
|
497
|
+
- Event-driven communication between games and shared systems
|
|
498
|
+
- Optimized asset loading and caching across games
|
|
499
|
+
- Responsive design that works on all devices
|
|
500
|
+
- Clean separation between engine, games, and presentation
|
|
501
|
+
|
|
502
|
+
**Individual Game Quality:**
|
|
503
|
+
Each game in the collection must be:
|
|
504
|
+
✅ Complete and immediately playable
|
|
505
|
+
✅ Built on the shared architecture
|
|
506
|
+
✅ Following the unified ${theme} visual style
|
|
507
|
+
✅ Demonstrating unique gameplay mechanics
|
|
508
|
+
✅ Connected to the collection's progression system
|
|
509
|
+
|
|
510
|
+
Create a game collection that demonstrates mastery of both individual game design and ecosystem architecture!`;
|
|
511
|
+
return { systemAndContext, dataPayload, outputInstructions };
|
|
512
|
+
}
|
|
513
|
+
/**
|
|
514
|
+
* Backwards compatibility method - routes to appropriate stages
|
|
515
|
+
*/
|
|
516
|
+
getPromptStages(params) {
|
|
517
|
+
const mode = this.detectAnalysisMode(params);
|
|
518
|
+
if (mode === 'single-file') {
|
|
519
|
+
return this.getSingleGamePromptStages(params);
|
|
520
|
+
}
|
|
521
|
+
else {
|
|
522
|
+
return this.getMultiGamePromptStages(params);
|
|
523
|
+
}
|
|
524
|
+
}
|
|
525
|
+
// Multi-game helper methods
|
|
526
|
+
async discoverRelevantFiles(projectPath, maxDepth, analysisType) {
|
|
527
|
+
const extensions = this.getFileExtensions(analysisType);
|
|
528
|
+
return await this.multiFileAnalysis.discoverFiles(projectPath, extensions, maxDepth);
|
|
529
|
+
}
|
|
530
|
+
async performMultiGameAnalysis(files, params, model, contextLength) {
|
|
531
|
+
const cacheKey = this.analysisCache.generateKey('arcade_game', params, files);
|
|
532
|
+
const cached = await this.analysisCache.get(cacheKey);
|
|
533
|
+
if (cached)
|
|
534
|
+
return cached;
|
|
535
|
+
const gameAnalysisResults = await this.multiFileAnalysis.analyzeBatch(files, (file) => this.analyzeGameFile(file, params, model), contextLength);
|
|
536
|
+
// Aggregate results into game collection analysis
|
|
537
|
+
const aggregatedResult = {
|
|
538
|
+
summary: `Game collection analysis of ${files.length} game files`,
|
|
539
|
+
findings: gameAnalysisResults,
|
|
540
|
+
data: {
|
|
541
|
+
gameCount: files.length,
|
|
542
|
+
totalGameSize: gameAnalysisResults.reduce((sum, result) => sum + (result.size || 0), 0),
|
|
543
|
+
gameTypes: this.identifyGameTypes(gameAnalysisResults),
|
|
544
|
+
sharedSystems: this.identifySharedSystems(gameAnalysisResults),
|
|
545
|
+
collectionTheme: params.theme || 'retro',
|
|
546
|
+
analysisTimestamp: new Date().toISOString()
|
|
547
|
+
}
|
|
548
|
+
};
|
|
549
|
+
await this.analysisCache.cacheAnalysis(cacheKey, aggregatedResult, {
|
|
550
|
+
modelUsed: model.identifier || 'unknown',
|
|
551
|
+
executionTime: Date.now() - Date.now(), // TODO: Track actual execution time
|
|
552
|
+
timestamp: new Date().toISOString()
|
|
553
|
+
});
|
|
554
|
+
return aggregatedResult;
|
|
555
|
+
}
|
|
556
|
+
async analyzeGameFile(file, params, model) {
|
|
557
|
+
const content = await readFile(file, 'utf-8');
|
|
558
|
+
const stats = await stat(file);
|
|
559
|
+
return {
|
|
560
|
+
filePath: file,
|
|
561
|
+
fileName: basename(file),
|
|
562
|
+
size: content.length,
|
|
563
|
+
lines: content.split('\n').length,
|
|
564
|
+
extension: extname(file),
|
|
565
|
+
relativePath: relative(params.projectPath || '', file),
|
|
566
|
+
lastModified: stats.mtime.toISOString(),
|
|
567
|
+
hasCanvas: /canvas|ctx|getContext/i.test(content),
|
|
568
|
+
hasGameLoop: /requestAnimationFrame|setInterval|gameLoop/i.test(content),
|
|
569
|
+
hasPlayer: /player|character|avatar/i.test(content),
|
|
570
|
+
hasEnemies: /enemy|enemies|monster|opponent/i.test(content),
|
|
571
|
+
gameType: this.detectGameType(content),
|
|
572
|
+
isPlayable: this.isPlayableGame(content)
|
|
573
|
+
};
|
|
574
|
+
}
|
|
575
|
+
identifyGameTypes(results) {
|
|
576
|
+
const types = new Set();
|
|
577
|
+
results.forEach(result => {
|
|
578
|
+
if (result.gameType) {
|
|
579
|
+
types.add(result.gameType);
|
|
580
|
+
}
|
|
581
|
+
});
|
|
582
|
+
return Array.from(types);
|
|
583
|
+
}
|
|
584
|
+
identifySharedSystems(results) {
|
|
585
|
+
const systems = [];
|
|
586
|
+
const hasCanvas = results.some(r => r.hasCanvas);
|
|
587
|
+
const hasGameLoop = results.some(r => r.hasGameLoop);
|
|
588
|
+
if (hasCanvas)
|
|
589
|
+
systems.push('Canvas Rendering System');
|
|
590
|
+
if (hasGameLoop)
|
|
591
|
+
systems.push('Game Loop Framework');
|
|
592
|
+
return systems;
|
|
593
|
+
}
|
|
594
|
+
detectGameType(content) {
|
|
595
|
+
if (/shoot|bullet|projectile/i.test(content))
|
|
596
|
+
return 'shooter';
|
|
597
|
+
if (/jump|platform|gravity/i.test(content))
|
|
598
|
+
return 'platformer';
|
|
599
|
+
if (/puzzle|match|tile/i.test(content))
|
|
600
|
+
return 'puzzle';
|
|
601
|
+
if (/snake|grow|segment/i.test(content))
|
|
602
|
+
return 'snake';
|
|
603
|
+
if (/brick|paddle|ball|breakout/i.test(content))
|
|
604
|
+
return 'breakout';
|
|
605
|
+
if (/asteroid|space|ship/i.test(content))
|
|
606
|
+
return 'asteroids';
|
|
607
|
+
return 'arcade';
|
|
608
|
+
}
|
|
609
|
+
isPlayableGame(content) {
|
|
610
|
+
return content.includes('canvas') &&
|
|
611
|
+
content.includes('gameLoop') &&
|
|
612
|
+
(content.includes('player') || content.includes('character'));
|
|
613
|
+
}
|
|
614
|
+
getGameTypeInspiration(gameType) {
|
|
615
|
+
const inspirations = {
|
|
616
|
+
'shooter': 'Classic space invaders, bullet hell mechanics, power-ups, wave-based enemies',
|
|
617
|
+
'platformer': 'Super Mario-style jumping, moving platforms, collectibles, level progression',
|
|
618
|
+
'puzzle': 'Tetris-like block manipulation, match-3 mechanics, spatial reasoning challenges',
|
|
619
|
+
'snake': 'Classic snake growth mechanics, food collection, increasingly difficult navigation',
|
|
620
|
+
'breakout': 'Paddle and ball physics, brick destruction, power-up variety, level design',
|
|
621
|
+
'asteroids': 'Space ship movement, rotating controls, asteroid destruction, wrap-around edges',
|
|
622
|
+
'custom': 'Unique game mechanics that combine elements from multiple genres'
|
|
623
|
+
};
|
|
624
|
+
return inspirations[gameType] || inspirations.custom;
|
|
625
|
+
}
|
|
626
|
+
getThemeGuidelines(theme) {
|
|
627
|
+
const themes = {
|
|
628
|
+
'retro': '8-bit pixel art style, classic arcade colors (neon green, bright blue, orange), chunky fonts',
|
|
629
|
+
'neon': 'Glowing effects, dark backgrounds, electric blues and magentas, cyberpunk aesthetic',
|
|
630
|
+
'pixel': 'Crisp pixel art, limited color palettes, authentic retro game feel, blocky sprites',
|
|
631
|
+
'minimal': 'Clean lines, simple shapes, monochromatic or limited colors, elegant simplicity',
|
|
632
|
+
'space': 'Stars, galaxies, metallic surfaces, deep space blues and purples, sci-fi elements',
|
|
633
|
+
'nature': 'Earth tones, organic shapes, forest greens and sky blues, natural textures',
|
|
634
|
+
'custom': 'Unique visual style that fits the specific game concept and target audience'
|
|
635
|
+
};
|
|
636
|
+
return themes[theme] || themes.custom;
|
|
637
|
+
}
|
|
638
|
+
getFileExtensions(analysisType) {
|
|
639
|
+
const extensionMap = {
|
|
640
|
+
'prototype': ['.html', '.js', '.css'],
|
|
641
|
+
'polished': ['.html', '.js', '.css', '.json', '.png', '.wav'],
|
|
642
|
+
'comprehensive': ['.html', '.js', '.css', '.json', '.png', '.jpg', '.svg', '.wav', '.mp3']
|
|
643
|
+
};
|
|
644
|
+
return extensionMap[analysisType] || extensionMap.comprehensive;
|
|
645
|
+
}
|
|
646
|
+
generateCacheKey(files, params) {
|
|
647
|
+
const fileHash = files.join('|');
|
|
648
|
+
const paramHash = JSON.stringify(params);
|
|
649
|
+
return `${fileHash}_${paramHash}`.substring(0, 64);
|
|
650
|
+
}
|
|
651
|
+
}
|
|
652
|
+
export default ArcadeGameGenerator;
|
|
653
|
+
//# sourceMappingURL=arcade-game.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"arcade-game.js","sourceRoot":"","sources":["../../../src/prompts/fun/arcade-game.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAE1D,OAAO,EAAE,uBAAuB,EAAE,MAAM,uCAAuC,CAAC;AAEhF,OAAO,EAAE,YAAY,EAAE,MAAM,uCAAuC,CAAC;AACrE,OAAO,EAAE,eAAe,EAAE,MAA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