@jjlmoya/utils-games-development 1.47.0 → 1.49.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/package.json +1 -1
- package/src/category/index.ts +2 -1
- package/src/entries.ts +4 -1
- package/src/tests/locale_completeness.test.ts +1 -20
- package/src/tests/tool_validation.test.ts +2 -3
- package/src/tool/itchioGameTester/client.ts +12 -23
- package/src/tool/itchioGameTester/component.astro +0 -7
- package/src/tool/itchioGameTester/i18n/de.ts +0 -2
- package/src/tool/itchioGameTester/i18n/en.ts +0 -2
- package/src/tool/itchioGameTester/i18n/es.ts +0 -2
- package/src/tool/itchioGameTester/i18n/fr.ts +0 -2
- package/src/tool/itchioGameTester/i18n/id.ts +0 -2
- package/src/tool/itchioGameTester/i18n/it.ts +0 -2
- package/src/tool/itchioGameTester/i18n/ja.ts +0 -2
- package/src/tool/itchioGameTester/i18n/ko.ts +0 -2
- package/src/tool/itchioGameTester/i18n/nl.ts +0 -2
- package/src/tool/itchioGameTester/i18n/pl.ts +0 -2
- package/src/tool/itchioGameTester/i18n/pt.ts +0 -2
- package/src/tool/itchioGameTester/i18n/ru.ts +0 -2
- package/src/tool/itchioGameTester/i18n/sv.ts +0 -2
- package/src/tool/itchioGameTester/i18n/tr.ts +0 -2
- package/src/tool/itchioGameTester/i18n/zh.ts +0 -2
- package/src/tool/itchioGameTester/ui.ts +0 -2
- package/src/tool/spriteSheetPacker/app-client.ts +248 -0
- package/src/tool/spriteSheetPacker/bibliography.astro +6 -0
- package/src/tool/spriteSheetPacker/bibliography.ts +12 -0
- package/src/tool/spriteSheetPacker/component.astro +229 -0
- package/src/tool/spriteSheetPacker/dropzone-client.ts +55 -0
- package/src/tool/spriteSheetPacker/entry.ts +28 -0
- package/src/tool/spriteSheetPacker/exporter.ts +116 -0
- package/src/tool/spriteSheetPacker/extractor-client.ts +127 -0
- package/src/tool/spriteSheetPacker/flipbook-client.ts +60 -0
- package/src/tool/spriteSheetPacker/i18n/de.ts +270 -0
- package/src/tool/spriteSheetPacker/i18n/en.ts +275 -0
- package/src/tool/spriteSheetPacker/i18n/es.ts +275 -0
- package/src/tool/spriteSheetPacker/i18n/fr.ts +270 -0
- package/src/tool/spriteSheetPacker/i18n/id.ts +270 -0
- package/src/tool/spriteSheetPacker/i18n/it.ts +270 -0
- package/src/tool/spriteSheetPacker/i18n/ja.ts +270 -0
- package/src/tool/spriteSheetPacker/i18n/ko.ts +270 -0
- package/src/tool/spriteSheetPacker/i18n/nl.ts +270 -0
- package/src/tool/spriteSheetPacker/i18n/pl.ts +270 -0
- package/src/tool/spriteSheetPacker/i18n/pt.ts +270 -0
- package/src/tool/spriteSheetPacker/i18n/ru.ts +266 -0
- package/src/tool/spriteSheetPacker/i18n/sv.ts +270 -0
- package/src/tool/spriteSheetPacker/i18n/tr.ts +270 -0
- package/src/tool/spriteSheetPacker/i18n/zh.ts +270 -0
- package/src/tool/spriteSheetPacker/index.ts +11 -0
- package/src/tool/spriteSheetPacker/logic.test.ts +155 -0
- package/src/tool/spriteSheetPacker/logic.ts +32 -0
- package/src/tool/spriteSheetPacker/packer-core.ts +121 -0
- package/src/tool/spriteSheetPacker/packer-ui.ts +86 -0
- package/src/tool/spriteSheetPacker/seo.astro +15 -0
- package/src/tool/spriteSheetPacker/sprite-sheet-packer.css +542 -0
- package/src/tool/spriteSheetPacker/types.ts +89 -0
- package/src/tool/spriteSheetPacker/ui.ts +42 -0
- package/src/tools.ts +2 -0
|
@@ -0,0 +1,270 @@
|
|
|
1
|
+
import type { ToolLocaleContent } from '../../../types';
|
|
2
|
+
import type { SpriteSheetPackerUI } from '../ui';
|
|
3
|
+
|
|
4
|
+
export const content: ToolLocaleContent<SpriteSheetPackerUI> = {
|
|
5
|
+
slug: 'sprite-sheet-packer-und-extraktor',
|
|
6
|
+
title: 'Sprite Sheet Packer und Extraktor',
|
|
7
|
+
description:
|
|
8
|
+
'Optimieren Sie die 2D Spielperformance indem Sie einzelne Animationsframes in Texturatlanten packen oder Sprites aus bestehenden Sheets extrahieren.',
|
|
9
|
+
ui: {
|
|
10
|
+
packerTab: 'Packer Studio',
|
|
11
|
+
extractorTab: 'Sprite Extraktor',
|
|
12
|
+
dropZoneTitle: 'Frames hierher ziehen',
|
|
13
|
+
dropZoneSubtitle: 'Laden Sie PNG oder WebP Bilder hoch um Ihren optimierten Texturatlas zu erstellen',
|
|
14
|
+
selectFilesButton: 'Bilder auswählen',
|
|
15
|
+
clearAllButton: 'Arbeitsbereich leeren',
|
|
16
|
+
downloadZipButton: 'Paket herunterladen (ZIP)',
|
|
17
|
+
copyJsonButton: 'Atlas JSON kopieren',
|
|
18
|
+
downloadSheetPngButton: 'Textur PNG herunterladen',
|
|
19
|
+
paddingLabel: 'Frame Abstand (px)',
|
|
20
|
+
borderExtrusionLabel: 'Rand Extrusion (px)',
|
|
21
|
+
maxTextureSizeLabel: 'Maximale Texturgröße',
|
|
22
|
+
powerOfTwoLabel: 'Zweierpotenz erzwingen (POT)',
|
|
23
|
+
trimTransparencyLabel: 'Transparenz zuschneiden',
|
|
24
|
+
exportFormatLabel: 'Engine Zielformat',
|
|
25
|
+
presetPixelArt: 'Pixel Art 16x16 Voreinstellung',
|
|
26
|
+
presetHdUi: 'HD UI Atlas 1024 Voreinstellung',
|
|
27
|
+
presetMobile: 'Mobile WebGL 2048 Voreinstellung',
|
|
28
|
+
formatGenericHash: 'Generisches JSON (Hash)',
|
|
29
|
+
formatGenericArray: 'Generisches JSON (Array)',
|
|
30
|
+
formatUnity: 'Unity 2D Engine',
|
|
31
|
+
formatGodot: 'Godot 2D Engine',
|
|
32
|
+
formatPhaser: 'Phaser / PixiJS Engine',
|
|
33
|
+
formatCss: 'Web Frontend CSS',
|
|
34
|
+
previewTitle: 'Texturatlas Vorschau',
|
|
35
|
+
efficiencyBadge: 'Textureffizienz',
|
|
36
|
+
drawCallsBadge: 'Reduzierte Draw Calls',
|
|
37
|
+
totalFramesBadge: 'Gepackte Frames',
|
|
38
|
+
textureSizeBadge: 'Atlasabmessung',
|
|
39
|
+
flipbookTitle: 'Animations Flipbook Player',
|
|
40
|
+
flipbookFpsLabel: 'Animationsgeschwindigkeit (FPS)',
|
|
41
|
+
playAnimation: 'Sequenz abspielen',
|
|
42
|
+
pauseAnimation: 'Sequenz pausieren',
|
|
43
|
+
extractorModeGrid: 'Feste Gittertrennung',
|
|
44
|
+
extractorModeAlpha: 'Automatische Alpha Kanal Trennung',
|
|
45
|
+
frameWidthLabel: 'Frame Breite (px)',
|
|
46
|
+
frameHeightLabel: 'Frame Höhe (px)',
|
|
47
|
+
marginLabel: 'Randversatz (px)',
|
|
48
|
+
spacingLabel: 'Gitterabstand (px)',
|
|
49
|
+
extractFramesButton: 'Frames extrahieren',
|
|
50
|
+
extractedCountLabel: 'Extrahierte Sprites',
|
|
51
|
+
codeSnippetTitle: 'Engine Integrationscode',
|
|
52
|
+
copySnippetButton: 'Code Snippet kopieren',
|
|
53
|
+
copiedToast: 'In die Zwischenablage kopiert',
|
|
54
|
+
},
|
|
55
|
+
seo: [
|
|
56
|
+
{
|
|
57
|
+
type: 'title',
|
|
58
|
+
level: 2,
|
|
59
|
+
text: 'Verständnis von GPU Batching und Draw Call Optimierung in 2D Engines',
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
type: 'paragraph',
|
|
63
|
+
html: 'In modernen 2D Grafik Pipelines erfordert jedes auf dem Bildschirm gerenderte Bild einen Befehl der CPU an die Grafikkarte GPU der als Draw Call bezeichnet wird. Wenn eine Charakteranimation aus Dutzenden einzelner PNG Dateien besteht muss die Grafikkarte ständig Texturen wechseln.',
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
type: 'stats',
|
|
67
|
+
columns: 4,
|
|
68
|
+
items: [
|
|
69
|
+
{ value: '95%', label: 'Draw Call Reduzierung' },
|
|
70
|
+
{ value: '4x', label: 'Schnellere GPU Batchverarbeitung' },
|
|
71
|
+
{ value: '60 FPS', label: 'Stabiles Ziel auf Mobilgeräten' },
|
|
72
|
+
{ value: '100%', label: 'Lokale Verarbeitung im Browser' },
|
|
73
|
+
],
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
type: 'title',
|
|
77
|
+
level: 2,
|
|
78
|
+
text: 'Vergleich zwischen Einzelframes und Gepackten Texturatlanten',
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
type: 'comparative',
|
|
82
|
+
columns: 2,
|
|
83
|
+
items: [
|
|
84
|
+
{
|
|
85
|
+
title: 'Einzelne Framedateien',
|
|
86
|
+
description: 'Separat gespeicherte PNG oder WebP Dateien',
|
|
87
|
+
points: [
|
|
88
|
+
'Erzeugt für jeden einzelnen Frame auf dem Bildschirm einen eigenen Draw Call',
|
|
89
|
+
'Führt zu häufigen Kontextwechseln auf der Grafikkarte',
|
|
90
|
+
'Erhöht die Anzahl der HTTP Anfragen bei Webspielen',
|
|
91
|
+
'Langsamere Bildraten auf mobilen Endgeräten',
|
|
92
|
+
],
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
title: 'Gepackter Texturatlas',
|
|
96
|
+
description: 'Einzelne PNG Grafik kombiniert mit JSON Koordinaten',
|
|
97
|
+
points: [
|
|
98
|
+
'Bündelt hunderte Sprites in einen einzigen GPU Draw Call',
|
|
99
|
+
'Maximiert die Speicherbandbreite und den Durchsatz der Grafikkarte',
|
|
100
|
+
'Reduziert Datei Requests durch Bündelung der Textur mit Metadaten',
|
|
101
|
+
'Sichert flüssige Bildraten auf allen Systemen',
|
|
102
|
+
],
|
|
103
|
+
},
|
|
104
|
+
],
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
type: 'title',
|
|
108
|
+
level: 2,
|
|
109
|
+
text: 'Subpixel Kamerabewegung und Rand Extrusions Mathematik',
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
type: 'paragraph',
|
|
113
|
+
html: 'Beim Rendern von Pixel Art Grafiken mit Kamerasynchronisation können benachbarte Frames ineinander verlaufen.',
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
type: 'tip',
|
|
117
|
+
title: 'Strategie zur Randextrusion',
|
|
118
|
+
html: 'Wenden Sie 1 bis 2 Pixel Rand Extrusion an um visuelle Artefakte bei Kamerabewegungen zu vermeiden.',
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
type: 'title',
|
|
122
|
+
level: 2,
|
|
123
|
+
text: 'Empfohlene Texturgrößen für Mobile und Desktop Engines',
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
type: 'table',
|
|
127
|
+
headers: ['Zielplattform', 'Empfohlene Max Größe', 'Zweierpotenz Anforderung', 'Speicherprofil'],
|
|
128
|
+
rows: [
|
|
129
|
+
['Mobile Webbrowser', '2048 x 2048 px', 'Erforderlich für WebGL 1.0', 'Niedrige Bandbreite'],
|
|
130
|
+
['Desktop PC / Konsole', '4096 x 4096 px', 'Empfohlen', 'Hohe GPU Kapazität'],
|
|
131
|
+
['Retro Handhelds', '1024 x 1024 px', 'Erforderlich', 'Strikte VRAM Limits'],
|
|
132
|
+
],
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
type: 'proscons',
|
|
136
|
+
items: [
|
|
137
|
+
{
|
|
138
|
+
pro: 'Garantiert volle Kompatibilität mit älteren Grafiktreibern und WebGL 1.0',
|
|
139
|
+
con: 'Kann ungenutzten transparenten Raum hinterlassen bei wenigen Sprites',
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
pro: 'Ermöglicht automatische Mipmapping Unterstützung für Hardwarefilterung',
|
|
143
|
+
con: 'Erfordert sorgfältige Abstandsanpassungen bei unregelmäßigen Frames',
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
pro: 'Optimiert die VRAM Zuweisung innerhalb der Grafikkarte',
|
|
147
|
+
con: 'Erhöht leicht die anfängliche Texturfläche',
|
|
148
|
+
},
|
|
149
|
+
],
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
type: 'title',
|
|
153
|
+
level: 2,
|
|
154
|
+
text: 'Schlüsselbegriffe der Sprite Packing Architektur',
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
type: 'glossary',
|
|
158
|
+
items: [
|
|
159
|
+
{
|
|
160
|
+
term: 'Draw Call',
|
|
161
|
+
definition: 'Befehl der CPU an die Grafikkarte zum Rendern von Geometrie und Texturen.',
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
term: 'Bin Packing',
|
|
165
|
+
definition: 'Algorithmus zur optimalen Anordnung rechteckiger Elemente in einem Behälter.',
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
term: 'Border Extrusion',
|
|
169
|
+
definition: 'Duplizierung der äußeren Kantenpixel zur Vermeidung von Nahtstellen bei Kamerabewegungen.',
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
term: 'Flipbook Animation',
|
|
173
|
+
definition: 'Sequenzielle Wiedergabe schneller Einzelbilder zur Simulation von Bewegung in 2D Spielen.',
|
|
174
|
+
},
|
|
175
|
+
],
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
type: 'title',
|
|
179
|
+
level: 2,
|
|
180
|
+
text: 'Performance Checkliste für Spielentwickler',
|
|
181
|
+
},
|
|
182
|
+
{
|
|
183
|
+
type: 'diagnostic',
|
|
184
|
+
variant: 'info',
|
|
185
|
+
title: 'Regeln für die Spieleentwicklung',
|
|
186
|
+
html: 'Fassen Sie Charakteranimationen in gemeinsamen Texturatlanten zusammen und schneiden Sie ungenutzte Transparenz zu.',
|
|
187
|
+
},
|
|
188
|
+
],
|
|
189
|
+
faq: [
|
|
190
|
+
{
|
|
191
|
+
question: 'Was ist ein Sprite Sheet und warum ist es für 2D Spiele wichtig?',
|
|
192
|
+
answer:
|
|
193
|
+
'Ein Sprite Sheet ist eine einzelne Bilddatei die mehere kleinere Grafiken enthält.',
|
|
194
|
+
},
|
|
195
|
+
{
|
|
196
|
+
question: 'Wie funktioniert das clientseitige Packen in diesem Tool?',
|
|
197
|
+
answer:
|
|
198
|
+
'Ihre Bilder werden lokal in der HTML5 Canvas API Ihres Browsers verarbeitet.',
|
|
199
|
+
},
|
|
200
|
+
{
|
|
201
|
+
question: 'Kann ich Sprites aus einem bestehenden Sheet extrahieren?',
|
|
202
|
+
answer:
|
|
203
|
+
'Ja. Wechseln Sie in den Extraktor Modus und laden Sie Ihr Sheet hoch.',
|
|
204
|
+
},
|
|
205
|
+
],
|
|
206
|
+
howTo: [
|
|
207
|
+
{
|
|
208
|
+
name: 'Frames hochladen',
|
|
209
|
+
text: 'Ziehen Sie Ihre Einzelbilder in den Upload Bereich.',
|
|
210
|
+
},
|
|
211
|
+
{
|
|
212
|
+
name: 'Einstellungen konfigurieren',
|
|
213
|
+
text: 'Passen Sie Abstand Extrusion und maximale Texturgröße an.',
|
|
214
|
+
},
|
|
215
|
+
{
|
|
216
|
+
name: 'Vorschau und Export',
|
|
217
|
+
text: 'Prüfen Sie die Animation im Flipbook Player und laden Sie das ZIP Paket herunter.',
|
|
218
|
+
},
|
|
219
|
+
],
|
|
220
|
+
schemas: [
|
|
221
|
+
{
|
|
222
|
+
'@context': 'https://schema.org',
|
|
223
|
+
'@type': 'SoftwareApplication',
|
|
224
|
+
name: 'Sprite Sheet Packer und Extraktor',
|
|
225
|
+
applicationCategory: 'DeveloperApplication',
|
|
226
|
+
operatingSystem: 'Any',
|
|
227
|
+
offers: {
|
|
228
|
+
'@type': 'Offer',
|
|
229
|
+
price: '0',
|
|
230
|
+
priceCurrency: 'USD',
|
|
231
|
+
},
|
|
232
|
+
},
|
|
233
|
+
{
|
|
234
|
+
'@context': 'https://schema.org',
|
|
235
|
+
'@type': 'FAQPage',
|
|
236
|
+
mainEntity: [
|
|
237
|
+
{
|
|
238
|
+
'@type': 'Question',
|
|
239
|
+
name: 'Was ist ein Sprite Sheet und warum ist es für 2D Spiele wichtig?',
|
|
240
|
+
acceptedAnswer: {
|
|
241
|
+
'@type': 'Answer',
|
|
242
|
+
text: 'Ein Sprite Sheet ist eine einzelne Bilddatei die mehrere kleinere Grafiken enthält.',
|
|
243
|
+
},
|
|
244
|
+
},
|
|
245
|
+
],
|
|
246
|
+
},
|
|
247
|
+
{
|
|
248
|
+
'@context': 'https://schema.org',
|
|
249
|
+
'@type': 'HowTo',
|
|
250
|
+
name: 'Wie man Sprite Sheets packt und extrahiert',
|
|
251
|
+
step: [
|
|
252
|
+
{
|
|
253
|
+
'@type': 'HowToStep',
|
|
254
|
+
name: 'Frames hochladen',
|
|
255
|
+
text: 'Ziehen Sie Ihre Einzelbilder in den Upload Bereich.',
|
|
256
|
+
},
|
|
257
|
+
],
|
|
258
|
+
},
|
|
259
|
+
],
|
|
260
|
+
bibliography: [
|
|
261
|
+
{
|
|
262
|
+
name: 'Godot Engine 2D Sprite Sheets Documentation',
|
|
263
|
+
url: 'https://docs.godotengine.org/en/stable/tutorials/2d/2d_sprite_animation.html',
|
|
264
|
+
},
|
|
265
|
+
{
|
|
266
|
+
name: 'Unity Sprite Atlas Manual',
|
|
267
|
+
url: 'https://docs.unity3d.com/Manual/class-SpriteAtlas.html',
|
|
268
|
+
},
|
|
269
|
+
],
|
|
270
|
+
};
|
|
@@ -0,0 +1,275 @@
|
|
|
1
|
+
import type { ToolLocaleContent } from '../../../types';
|
|
2
|
+
import type { SpriteSheetPackerUI } from '../ui';
|
|
3
|
+
|
|
4
|
+
export const content: ToolLocaleContent<SpriteSheetPackerUI> = {
|
|
5
|
+
slug: 'sprite-sheet-packer',
|
|
6
|
+
title: 'Sprite Sheet Packer and Extractor',
|
|
7
|
+
description:
|
|
8
|
+
'Optimize 2D game performance by packing loose animation frames into texture atlases or extracting individual sprites from existing sheets client-side.',
|
|
9
|
+
ui: {
|
|
10
|
+
packerTab: 'Packer Studio',
|
|
11
|
+
extractorTab: 'Sprite Extractor',
|
|
12
|
+
dropZoneTitle: 'Drag and Drop Frames',
|
|
13
|
+
dropZoneSubtitle: 'Upload PNG or WebP images to generate your optimized texture atlas',
|
|
14
|
+
selectFilesButton: 'Select Frame Images',
|
|
15
|
+
clearAllButton: 'Clear Workspace',
|
|
16
|
+
downloadZipButton: 'Download Package (ZIP)',
|
|
17
|
+
copyJsonButton: 'Copy Atlas JSON',
|
|
18
|
+
downloadSheetPngButton: 'Download Texture PNG',
|
|
19
|
+
paddingLabel: 'Frame Padding (px)',
|
|
20
|
+
borderExtrusionLabel: 'Border Extrusion (px)',
|
|
21
|
+
maxTextureSizeLabel: 'Max Texture Dimension',
|
|
22
|
+
powerOfTwoLabel: 'Force Power of 2 (POT)',
|
|
23
|
+
exportFormatLabel: 'Target Engine Format',
|
|
24
|
+
presetPixelArt: 'Pixel Art 16x16 Preset',
|
|
25
|
+
presetHdUi: 'HD UI Atlas 1024 Preset',
|
|
26
|
+
presetMobile: 'Mobile WebGL 2048 Preset',
|
|
27
|
+
formatGenericHash: 'Generic JSON (Hash)',
|
|
28
|
+
formatGenericArray: 'Generic JSON (Array)',
|
|
29
|
+
formatUnity: 'Unity 2D Engine',
|
|
30
|
+
formatGodot: 'Godot 2D Engine',
|
|
31
|
+
formatPhaser: 'Phaser / PixiJS Engine',
|
|
32
|
+
formatCss: 'Web Frontend CSS',
|
|
33
|
+
previewTitle: 'Texture Atlas Preview',
|
|
34
|
+
efficiencyBadge: 'Texture Efficiency',
|
|
35
|
+
drawCallsBadge: 'Draw Calls Reduced',
|
|
36
|
+
totalFramesBadge: 'Packed Frames',
|
|
37
|
+
textureSizeBadge: 'Atlas Dimension',
|
|
38
|
+
flipbookTitle: 'Animation Flipbook Player',
|
|
39
|
+
flipbookFpsLabel: 'Animation Speed (FPS)',
|
|
40
|
+
playAnimation: 'Play Sequence',
|
|
41
|
+
pauseAnimation: 'Pause Sequence',
|
|
42
|
+
frameWidthLabel: 'Frame Width (px)',
|
|
43
|
+
frameHeightLabel: 'Frame Height (px)',
|
|
44
|
+
marginLabel: 'Margin Offset (px)',
|
|
45
|
+
spacingLabel: 'Grid Spacing (px)',
|
|
46
|
+
extractedCountLabel: 'Extracted Sprites',
|
|
47
|
+
codeSnippetTitle: 'Engine Integration Code',
|
|
48
|
+
copySnippetButton: 'Copy Code Snippet',
|
|
49
|
+
copiedToast: 'Copied to Clipboard!',
|
|
50
|
+
},
|
|
51
|
+
seo: [
|
|
52
|
+
{
|
|
53
|
+
type: 'title',
|
|
54
|
+
level: 2,
|
|
55
|
+
text: 'Understanding GPU Batching and Draw Call Optimization in 2D Engines',
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
type: 'paragraph',
|
|
59
|
+
html: 'In modern 2D graphics pipelines, every individual image file rendered on screen requires the CPU to send a instruction known as a draw call to the graphics card GPU. When a character animation consists of dozens of loose PNG files, the GPU must constantly switch texture bindings and flush its rendering pipeline for every single frame. Packing loose character frames into a unified sprite sheet or texture atlas consolidates hundreds of separate render commands into a single batch, eliminating graphics pipeline stalls and boosting framerates on mobile web browsers, desktop engines, and indie game runtimes.',
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
type: 'stats',
|
|
63
|
+
columns: 4,
|
|
64
|
+
items: [
|
|
65
|
+
{ value: '95%', label: 'Draw Call Reduction' },
|
|
66
|
+
{ value: '4x', label: 'Faster GPU Batching' },
|
|
67
|
+
{ value: '60 FPS', label: 'Stable Mobile Target' },
|
|
68
|
+
{ value: '100%', label: 'Local In-Browser Security' },
|
|
69
|
+
],
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
type: 'title',
|
|
73
|
+
level: 2,
|
|
74
|
+
text: 'Comparing Loose Frame Files vs Packed Texture Atlases',
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
type: 'comparative',
|
|
78
|
+
columns: 2,
|
|
79
|
+
items: [
|
|
80
|
+
{
|
|
81
|
+
title: 'Loose Animation Frame Files',
|
|
82
|
+
description: 'Individual PNG or WebP files stored separately on disk',
|
|
83
|
+
points: [
|
|
84
|
+
'Generates an independent GPU draw call for every single frame displayed on screen',
|
|
85
|
+
'Triggers frequent texture unit state switching and VRAM memory fragmentation',
|
|
86
|
+
'Increases HTTP network requests and loading latency for web and HTML5 games',
|
|
87
|
+
'Causes severe framerate drops on mobile GPUs during heavy particle or character scenes',
|
|
88
|
+
],
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
title: 'Packed Texture Atlas Asset',
|
|
92
|
+
description: 'Single unified PNG sheet paired with coordinate metadata JSON',
|
|
93
|
+
points: [
|
|
94
|
+
'Batches hundreds of sprite frames into a single unified GPU draw call',
|
|
95
|
+
'Maximizes graphics memory bandwidth utilization and quad rendering throughput',
|
|
96
|
+
'Bundles all animation frames into one asset download, reducing disk and network overhead',
|
|
97
|
+
'Helps maintain ultra-smooth 60 FPS performance across low-end mobile devices and browsers',
|
|
98
|
+
],
|
|
99
|
+
},
|
|
100
|
+
],
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
type: 'title',
|
|
104
|
+
level: 2,
|
|
105
|
+
text: 'Subpixel Camera Translation and Border Extrusion Mathematics',
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
type: 'paragraph',
|
|
109
|
+
html: 'When rendering pixel art or 2D characters with subpixel camera smoothing or bilinear filtering, neighboring frames on a sprite sheet can bleed into one another along texture coordinate boundaries. This visual artifact, known as pixel bleeding or edge seam bleeding, occurs because texture sampling interpolates adjacent texel colors when camera positions fall between whole pixel coordinates.',
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
type: 'tip',
|
|
113
|
+
title: 'Border Extrusion Strategy for Seamless Rendering',
|
|
114
|
+
html: 'To eliminate subpixel bleeding during camera zooming or scrolling, apply 1 to 2 pixels of border extrusion when packing sprite sheets. Extrusion duplicates outer edge pixels outwards into the padding region, ensuring that bilinear sampling interpolates identical edge colors instead of adjacent frames or transparent background space.',
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
type: 'title',
|
|
118
|
+
level: 2,
|
|
119
|
+
text: 'Texture Dimension Guidelines for Mobile WebGL and Desktop Engines',
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
type: 'paragraph',
|
|
123
|
+
html: 'Selecting appropriate maximum texture dimensions is critical for cross-platform compatibility. While modern desktop GPUs easily handle 4096x4096px or 8192x8192px textures, mobile WebGL 1.0 drivers and embedded graphics processors often enforce maximum texture limits of 2048x2048px.',
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
type: 'table',
|
|
127
|
+
headers: ['Target Game Platform', 'Recommended Maximum Size', 'Power of Two (POT)', 'Memory Profile and Usage'],
|
|
128
|
+
rows: [
|
|
129
|
+
['Mobile Web Browsers and HTML5', '2048 x 2048 px', 'Mandatory for WebGL 1.0', 'Low VRAM Bandwidth and High Efficiency'],
|
|
130
|
+
['Desktop PC and Console Engines', '4096 x 4096 px', 'Recommended', 'High GPU Capacity and Fast Mipmapping'],
|
|
131
|
+
['Retro and Handheld Consoles', '1024 x 1024 px', 'Strict Hardware Requirement', 'Strict VRAM Limits and Uncompressed Sampling'],
|
|
132
|
+
],
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
type: 'title',
|
|
136
|
+
level: 2,
|
|
137
|
+
text: 'Trade Offs of Power of Two Texture Packing Alignment',
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
type: 'proscons',
|
|
141
|
+
items: [
|
|
142
|
+
{
|
|
143
|
+
pro: 'Provides 100% rendering compatibility with legacy mobile drivers, WebGL 1.0, and WebGPU fallbacks',
|
|
144
|
+
con: 'May introduce unused transparent padding when packing small or odd-numbered frame counts',
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
pro: 'Enables automatic hardware mipmap generation for smooth downscaling without aliasing',
|
|
148
|
+
con: 'Slightly increases overall texture surface area on initial allocation',
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
pro: 'Optimizes GPU memory allocation patterns inside native graphics driver texture pools',
|
|
152
|
+
con: 'Requires precise padding configuration to balance sprite density against edge clearance',
|
|
153
|
+
},
|
|
154
|
+
],
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
type: 'title',
|
|
158
|
+
level: 2,
|
|
159
|
+
text: 'Key Architectural Terms in Sprite Sheet Optimization',
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
type: 'glossary',
|
|
163
|
+
items: [
|
|
164
|
+
{
|
|
165
|
+
term: 'Draw Call',
|
|
166
|
+
definition: 'A command dispatched by the CPU to the graphics processor instructing it to render a batch of textured geometry.',
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
term: 'Bin Packing Algorithm',
|
|
170
|
+
definition: 'A mathematical algorithm that places two-dimensional rectangles of varying sizes inside a minimal bounding container without overlap.',
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
term: 'Border Extrusion',
|
|
174
|
+
definition: 'The process of cloning outer edge pixels outwards into padding space to prevent texture filtering artifacts during subpixel camera movement.',
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
term: 'Flipbook Animation',
|
|
178
|
+
definition: 'Sequential rapid playback of discrete 2D sprite frames to simulate smooth physical motion in video games.',
|
|
179
|
+
},
|
|
180
|
+
],
|
|
181
|
+
},
|
|
182
|
+
{
|
|
183
|
+
type: 'title',
|
|
184
|
+
level: 2,
|
|
185
|
+
text: 'Production Optimization Checklist for Game Artists and Developers',
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
type: 'diagnostic',
|
|
189
|
+
variant: 'info',
|
|
190
|
+
title: 'Game Development Production Rules',
|
|
191
|
+
html: 'Group animation sequences into shared character or environment atlases, enforce power-of-two dimensions for WebGL builds, apply 1-2px border extrusion for subpixel camera motion, and trim transparent padding around frames before final export.',
|
|
192
|
+
},
|
|
193
|
+
],
|
|
194
|
+
faq: [
|
|
195
|
+
{
|
|
196
|
+
question: 'What is a sprite sheet and why is it essential for 2D game development?',
|
|
197
|
+
answer:
|
|
198
|
+
'A sprite sheet, or texture atlas, is a single composite image file containing multiple smaller graphics or animation frames. By combining images into one sheet, game engines can draw many objects in a single GPU draw call rather than issuing hundreds of individual render commands, dramatically improving game performance.',
|
|
199
|
+
},
|
|
200
|
+
{
|
|
201
|
+
question: 'How does the client-side packing process work in this utility?',
|
|
202
|
+
answer:
|
|
203
|
+
'Your images are loaded into your browser HTML5 canvas API locally. A bin-packing algorithm calculates optimal rectangular coordinates to fit all frames into a tight texture bounding box. The combined texture PNG and engine JSON metadata are generated instantly without sending any data to external servers.',
|
|
204
|
+
},
|
|
205
|
+
{
|
|
206
|
+
question: 'Can I extract frames from an existing sprite sheet?',
|
|
207
|
+
answer:
|
|
208
|
+
'Yes. Switch to Extractor mode, upload any sprite sheet graphic, and configure grid dimensions or automatic transparency detection. The utility slices individual frames and packages them into a ZIP archive for immediate download.',
|
|
209
|
+
},
|
|
210
|
+
],
|
|
211
|
+
howTo: [
|
|
212
|
+
{
|
|
213
|
+
name: 'Upload Animation Frames',
|
|
214
|
+
text: 'Drag and drop your individual PNG or WebP character frame files into the drop zone container.',
|
|
215
|
+
},
|
|
216
|
+
{
|
|
217
|
+
name: 'Configure Packing Settings',
|
|
218
|
+
text: 'Adjust padding, border extrusion, and maximum texture size. Select your target engine format such as Unity, Godot, or Phaser.',
|
|
219
|
+
},
|
|
220
|
+
{
|
|
221
|
+
name: 'Preview Animation and Export',
|
|
222
|
+
text: 'Test the flipbook animation player to verify frame alignment, then click Download Package to receive your PNG texture and metadata in a ZIP file.',
|
|
223
|
+
},
|
|
224
|
+
],
|
|
225
|
+
schemas: [
|
|
226
|
+
{
|
|
227
|
+
'@context': 'https://schema.org',
|
|
228
|
+
'@type': 'SoftwareApplication',
|
|
229
|
+
name: 'Sprite Sheet Packer and Extractor',
|
|
230
|
+
applicationCategory: 'DeveloperApplication',
|
|
231
|
+
operatingSystem: 'Any',
|
|
232
|
+
offers: {
|
|
233
|
+
'@type': 'Offer',
|
|
234
|
+
price: '0',
|
|
235
|
+
priceCurrency: 'USD',
|
|
236
|
+
},
|
|
237
|
+
},
|
|
238
|
+
{
|
|
239
|
+
'@context': 'https://schema.org',
|
|
240
|
+
'@type': 'FAQPage',
|
|
241
|
+
mainEntity: [
|
|
242
|
+
{
|
|
243
|
+
'@type': 'Question',
|
|
244
|
+
name: 'What is a sprite sheet and why is it essential for 2D game development?',
|
|
245
|
+
acceptedAnswer: {
|
|
246
|
+
'@type': 'Answer',
|
|
247
|
+
text: 'A sprite sheet is a single composite image file containing multiple smaller graphics or animation frames that allows game engines to draw many objects in a single GPU draw call.',
|
|
248
|
+
},
|
|
249
|
+
},
|
|
250
|
+
],
|
|
251
|
+
},
|
|
252
|
+
{
|
|
253
|
+
'@context': 'https://schema.org',
|
|
254
|
+
'@type': 'HowTo',
|
|
255
|
+
name: 'How to Pack and Extract Sprite Sheets',
|
|
256
|
+
step: [
|
|
257
|
+
{
|
|
258
|
+
'@type': 'HowToStep',
|
|
259
|
+
name: 'Upload Animation Frames',
|
|
260
|
+
text: 'Drag and drop your individual PNG or WebP character frame files into the drop zone container.',
|
|
261
|
+
},
|
|
262
|
+
],
|
|
263
|
+
},
|
|
264
|
+
],
|
|
265
|
+
bibliography: [
|
|
266
|
+
{
|
|
267
|
+
name: 'Godot Engine 2D Sprite Sheets Documentation',
|
|
268
|
+
url: 'https://docs.godotengine.org/en/stable/tutorials/2d/2d_sprite_animation.html',
|
|
269
|
+
},
|
|
270
|
+
{
|
|
271
|
+
name: 'Unity Sprite Atlas Manual',
|
|
272
|
+
url: 'https://docs.unity3d.com/Manual/class-SpriteAtlas.html',
|
|
273
|
+
},
|
|
274
|
+
],
|
|
275
|
+
};
|