@nice2dev/game-engine 1.3.14 → 1.3.16

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.
Files changed (434) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/dist/cjs/accessibility/Accessibility.js +152 -165
  3. package/dist/cjs/ai/AI.js +292 -294
  4. package/dist/cjs/ai/BehaviorTree.js +1029 -1113
  5. package/dist/cjs/ai/StateMachine.js +694 -756
  6. package/dist/cjs/animation/Animation.js +232 -241
  7. package/dist/cjs/audio/AudioAdvanced.js +221 -236
  8. package/dist/cjs/audio/AudioBridge.js +441 -435
  9. package/dist/cjs/audio/AudioManager.js +242 -259
  10. package/dist/cjs/build-cloud/BuildOrchestration.js +1059 -1098
  11. package/dist/cjs/build-cloud/GodotBuildCloud.js +641 -670
  12. package/dist/cjs/build-cloud/UnityBuildCloud.js +563 -610
  13. package/dist/cjs/build-cloud/UnrealBuildCloud.js +610 -635
  14. package/dist/cjs/core/EventBus.js +51 -56
  15. package/dist/cjs/core/GameClock.js +62 -66
  16. package/dist/cjs/core/GameConfig.js +72 -79
  17. package/dist/cjs/core/GameLoop.js +80 -89
  18. package/dist/cjs/core/ServiceLocator.js +61 -65
  19. package/dist/cjs/core/Validation.js +72 -82
  20. package/dist/cjs/core/math.js +108 -112
  21. package/dist/cjs/devtools/DevTools.js +542 -563
  22. package/dist/cjs/devtools/DeveloperExperience.js +521 -559
  23. package/dist/cjs/devtools/GameplayAnalytics.js +636 -646
  24. package/dist/cjs/dialogue/DialogueSystem.js +984 -986
  25. package/dist/cjs/docs/DocGenerator.js +339 -364
  26. package/dist/cjs/ecs/World.js +355 -371
  27. package/dist/cjs/editor/AchievementEditor.js +580 -636
  28. package/dist/cjs/editor/AdvancedEditor.js +184 -191
  29. package/dist/cjs/editor/AnimationRetargeting.js +696 -741
  30. package/dist/cjs/editor/AssetBrowser.js +1072 -1160
  31. package/dist/cjs/editor/AssetManager.js +187 -192
  32. package/dist/cjs/editor/ConsolePro.js +971 -1061
  33. package/dist/cjs/editor/CraftingEditor.js +680 -730
  34. package/dist/cjs/editor/DebugTools.js +187 -185
  35. package/dist/cjs/editor/DialogueSystem.js +844 -901
  36. package/dist/cjs/editor/LeaderboardSystem.js +429 -483
  37. package/dist/cjs/editor/NiceGameEditor.js +1903 -1201
  38. package/dist/cjs/editor/PrefabSystem.js +772 -838
  39. package/dist/cjs/editor/ProfilerPanel.js +649 -700
  40. package/dist/cjs/editor/QuestEditor.js +792 -839
  41. package/dist/cjs/editor/ReplaySystem.js +585 -634
  42. package/dist/cjs/editor/SceneEditor.js +176 -200
  43. package/dist/cjs/editor/ScreenshotMode.js +621 -688
  44. package/dist/cjs/editor/ShaderGraph.js +1556 -1582
  45. package/dist/cjs/editor/TimelineEditor.js +715 -778
  46. package/dist/cjs/editor/UndoRedoPro.js +830 -904
  47. package/dist/cjs/editor/VRARMode.js +582 -645
  48. package/dist/cjs/engine/NiceGameEngine.js +141 -164
  49. package/dist/cjs/engine/SaveSystem.js +441 -495
  50. package/dist/cjs/enterprise/Enterprise.js +254 -261
  51. package/dist/cjs/export/BevyExporter.js +927 -967
  52. package/dist/cjs/export/CocosExporter.js +644 -673
  53. package/dist/cjs/export/Construct3Exporter.js +783 -794
  54. package/dist/cjs/export/DefoldExporter.js +1028 -1069
  55. package/dist/cjs/export/GDevelopExporter.js +674 -708
  56. package/dist/cjs/export/GameMakerExporter.js +791 -805
  57. package/dist/cjs/export/GodotExporter.js +1003 -1045
  58. package/dist/cjs/export/MinecraftBedrockExporter.js +573 -578
  59. package/dist/cjs/export/MonoGameExporter.js +1265 -1293
  60. package/dist/cjs/export/Pico8Exporter.js +766 -812
  61. package/dist/cjs/export/PlatformExporter.js +188 -206
  62. package/dist/cjs/export/RPGMakerExporter.js +860 -879
  63. package/dist/cjs/export/RobloxExporter.js +883 -919
  64. package/dist/cjs/export/Solar2DExporter.js +1218 -1256
  65. package/dist/cjs/export/ThreeJSExporter.js +1006 -1073
  66. package/dist/cjs/export/Tic80Exporter.js +1210 -1267
  67. package/dist/cjs/export/UnityExporter.js +1116 -1131
  68. package/dist/cjs/export/UnrealExporter.js +889 -919
  69. package/dist/cjs/export/WebExporter.js +931 -970
  70. package/dist/cjs/export/index.js +42 -65
  71. package/dist/cjs/godot-integration/GodotAssetLibrary.js +659 -692
  72. package/dist/cjs/godot-integration/GodotImport.js +929 -1027
  73. package/dist/cjs/godot-integration/GodotLiveLink.js +915 -945
  74. package/dist/cjs/godot-integration/components/GodotProjectBrowser.js +911 -611
  75. package/dist/cjs/i18n/I18n.js +860 -900
  76. package/dist/cjs/i18n/useTranslation.js +84 -89
  77. package/dist/cjs/import/AsepriteImporter.js +658 -716
  78. package/dist/cjs/import/DragonBonesImporter.js +437 -461
  79. package/dist/cjs/import/GameMakerImporter.js +511 -521
  80. package/dist/cjs/import/GodotSceneImporter.js +788 -822
  81. package/dist/cjs/import/LDtkImporter.js +436 -454
  82. package/dist/cjs/import/Live2DImporter.js +497 -518
  83. package/dist/cjs/import/NdgFormat.js +424 -457
  84. package/dist/cjs/import/OgmoImporter.js +466 -493
  85. package/dist/cjs/import/RPGMakerImporter.js +451 -477
  86. package/dist/cjs/import/SceneImporter.js +378 -423
  87. package/dist/cjs/import/SpineImporter.js +511 -546
  88. package/dist/cjs/import/SpriterImporter.js +590 -613
  89. package/dist/cjs/import/TiledMapImporter.js +811 -846
  90. package/dist/cjs/import/UnitySceneImporter.js +687 -703
  91. package/dist/cjs/import/index.js +206 -251
  92. package/dist/cjs/index.js +275 -278
  93. package/dist/cjs/input/GamepadNavigation.js +185 -205
  94. package/dist/cjs/input/InputManager.js +397 -421
  95. package/dist/cjs/input/useGamepads.js +70 -81
  96. package/dist/cjs/integration/IconSprite.js +129 -256
  97. package/dist/cjs/inventory/InventorySystem.js +920 -995
  98. package/dist/cjs/kids/KidMode.js +997 -1022
  99. package/dist/cjs/kids/KidTools.js +570 -594
  100. package/dist/cjs/monetization/Monetization.js +170 -177
  101. package/dist/cjs/multiplayer/LocalMultiplayer.js +287 -287
  102. package/dist/cjs/multiplayer/MiniGameTypes.js +49 -59
  103. package/dist/cjs/native-engine/AnimationSystem.js +731 -806
  104. package/dist/cjs/native-engine/AssetPipeline.js +454 -515
  105. package/dist/cjs/native-engine/AudioEngine.js +763 -804
  106. package/dist/cjs/native-engine/InputSystem.js +1075 -1145
  107. package/dist/cjs/native-engine/NetworkingSystem.js +733 -793
  108. package/dist/cjs/native-engine/PhysicsEngine.js +583 -607
  109. package/dist/cjs/native-engine/RenderingEngine.js +302 -350
  110. package/dist/cjs/native-engine/SceneGraph.js +769 -808
  111. package/dist/cjs/network/MultiplayerTransport.js +97 -132
  112. package/dist/cjs/network/Networking.js +549 -564
  113. package/dist/cjs/node_modules/@microsoft/signalr/dist/esm/AbortController.js +21 -29
  114. package/dist/cjs/node_modules/@microsoft/signalr/dist/esm/AccessTokenHttpClient.js +40 -48
  115. package/dist/cjs/node_modules/@microsoft/signalr/dist/esm/DefaultHttpClient.js +35 -43
  116. package/dist/cjs/node_modules/@microsoft/signalr/dist/esm/DefaultReconnectPolicy.js +10 -15
  117. package/dist/cjs/node_modules/@microsoft/signalr/dist/esm/Errors.js +103 -135
  118. package/dist/cjs/node_modules/@microsoft/signalr/dist/esm/FetchHttpClient.js +131 -158
  119. package/dist/cjs/node_modules/@microsoft/signalr/dist/esm/HandshakeProtocol.js +39 -53
  120. package/dist/cjs/node_modules/@microsoft/signalr/dist/esm/HeaderNames.js +5 -8
  121. package/dist/cjs/node_modules/@microsoft/signalr/dist/esm/HttpClient.js +40 -48
  122. package/dist/cjs/node_modules/@microsoft/signalr/dist/esm/HttpConnection.js +494 -572
  123. package/dist/cjs/node_modules/@microsoft/signalr/dist/esm/HubConnection.js +826 -953
  124. package/dist/cjs/node_modules/@microsoft/signalr/dist/esm/HubConnectionBuilder.js +125 -146
  125. package/dist/cjs/node_modules/@microsoft/signalr/dist/esm/IHubProtocol.js +13 -23
  126. package/dist/cjs/node_modules/@microsoft/signalr/dist/esm/ILogger.js +11 -25
  127. package/dist/cjs/node_modules/@microsoft/signalr/dist/esm/ITransport.js +13 -24
  128. package/dist/cjs/node_modules/@microsoft/signalr/dist/esm/JsonHubProtocol.js +108 -121
  129. package/dist/cjs/node_modules/@microsoft/signalr/dist/esm/Loggers.js +10 -14
  130. package/dist/cjs/node_modules/@microsoft/signalr/dist/esm/LongPollingTransport.js +150 -185
  131. package/dist/cjs/node_modules/@microsoft/signalr/dist/esm/MessageBuffer.js +158 -196
  132. package/dist/cjs/node_modules/@microsoft/signalr/dist/esm/ServerSentEventsTransport.js +90 -105
  133. package/dist/cjs/node_modules/@microsoft/signalr/dist/esm/Subject.js +30 -35
  134. package/dist/cjs/node_modules/@microsoft/signalr/dist/esm/TextMessageFormat.js +16 -21
  135. package/dist/cjs/node_modules/@microsoft/signalr/dist/esm/Utils.js +215 -248
  136. package/dist/cjs/node_modules/@microsoft/signalr/dist/esm/WebSocketTransport.js +135 -157
  137. package/dist/cjs/node_modules/@microsoft/signalr/dist/esm/XhrHttpClient.js +76 -85
  138. package/dist/cjs/node_modules/@microsoft/signalr/dist/esm/index.js +24 -27
  139. package/dist/cjs/node_modules/@microsoft/signalr/dist/esm/pkg-version.js +3 -4
  140. package/dist/cjs/pathfinding/Pathfinding.js +245 -263
  141. package/dist/cjs/performance/AssetStreaming.js +561 -635
  142. package/dist/cjs/performance/BenchmarkSuite.js +283 -311
  143. package/dist/cjs/performance/DeltaCompression.js +467 -526
  144. package/dist/cjs/performance/DeterministicPhysics.js +450 -498
  145. package/dist/cjs/performance/ECSOptimization.js +644 -695
  146. package/dist/cjs/performance/GameSaveSystem.js +509 -556
  147. package/dist/cjs/performance/HotReload.js +447 -500
  148. package/dist/cjs/performance/InputRecording.js +511 -561
  149. package/dist/cjs/performance/InterestManagement.js +453 -500
  150. package/dist/cjs/performance/LocalizationRuntime.js +376 -423
  151. package/dist/cjs/performance/MemoryManagement.js +410 -470
  152. package/dist/cjs/performance/ModSupport.js +445 -496
  153. package/dist/cjs/performance/MultiThreadedPhysics.js +400 -443
  154. package/dist/cjs/performance/NetworkPrediction.js +424 -482
  155. package/dist/cjs/performance/ObjectPooling.js +569 -617
  156. package/dist/cjs/performance/Performance.js +174 -190
  157. package/dist/cjs/performance/PerformanceAdvanced.js +614 -637
  158. package/dist/cjs/performance/WebGPURenderer.js +656 -683
  159. package/dist/cjs/physics/PhysicsAdvanced.js +345 -379
  160. package/dist/cjs/physics/PhysicsEngine2D.js +391 -427
  161. package/dist/cjs/plugins/PluginSDK.js +432 -466
  162. package/dist/cjs/plugins/PluginTestKit.js +307 -330
  163. package/dist/cjs/procedural/Procedural.js +243 -254
  164. package/dist/cjs/procedural/WorldBuilding.js +297 -314
  165. package/dist/cjs/quest/QuestSystem.js +975 -932
  166. package/dist/cjs/release/MobileExport.js +157 -163
  167. package/dist/cjs/release/Release.js +225 -238
  168. package/dist/cjs/rendering/Camera2D.js +121 -124
  169. package/dist/cjs/rendering/Renderer2D.js +321 -335
  170. package/dist/cjs/rendering/WebGPURenderPipeline.js +632 -651
  171. package/dist/cjs/runtime3d/Runtime3D.js +359 -378
  172. package/dist/cjs/runtime3d/SceneEditor3D.js +252 -263
  173. package/dist/cjs/scene/SceneManager.js +177 -193
  174. package/dist/cjs/scripting/GraphToAST.js +574 -547
  175. package/dist/cjs/scripting/LanguageExporter.js +254 -279
  176. package/dist/cjs/scripting/NodeGraph.js +546 -570
  177. package/dist/cjs/scripting/ScriptAST.js +31 -39
  178. package/dist/cjs/scripting/VisualScripting2.js +1016 -1065
  179. package/dist/cjs/scripting/exporters/CSharpExporter.js +464 -496
  180. package/dist/cjs/scripting/exporters/GDScriptExporter.js +390 -442
  181. package/dist/cjs/scripting/exporters/LuaExporter.js +406 -447
  182. package/dist/cjs/scripting/exporters/PythonExporter.js +484 -549
  183. package/dist/cjs/scripting/exporters/RustExporter.js +459 -512
  184. package/dist/cjs/scripting/exporters/TypeScriptExporter.js +505 -556
  185. package/dist/cjs/social/Social.js +72 -80
  186. package/dist/cjs/systems/LightingSystem.js +844 -931
  187. package/dist/cjs/systems/ParticleSystem2.js +1447 -1451
  188. package/dist/cjs/systems/PhysicsDebugSystem.js +1070 -1141
  189. package/dist/cjs/systems/TerrainSystem.js +985 -1098
  190. package/dist/cjs/templates/ActionTemplates.js +296 -309
  191. package/dist/cjs/templates/FightingTemplate.js +417 -463
  192. package/dist/cjs/templates/MetroidvaniaTemplate.js +353 -405
  193. package/dist/cjs/templates/PartyTemplates.js +190 -202
  194. package/dist/cjs/templates/PuzzleTemplates.js +245 -261
  195. package/dist/cjs/templates/RPGTemplates.js +160 -178
  196. package/dist/cjs/templates/SportsTemplates.js +237 -250
  197. package/dist/cjs/templates/StrategyTemplates.js +143 -153
  198. package/dist/cjs/templates/SurvivalTemplate.js +336 -380
  199. package/dist/cjs/templates/WaveDefense.js +499 -526
  200. package/dist/cjs/tilemap/Tilemap.js +207 -214
  201. package/dist/cjs/tutorials/TutorialBranching.js +396 -417
  202. package/dist/cjs/tutorials/TutorialEngine.js +888 -931
  203. package/dist/cjs/tutorials/TutorialOverlay.js +602 -640
  204. package/dist/cjs/tutorials/content/Tutorials_T05_T08.js +787 -809
  205. package/dist/cjs/tutorials/content/Tutorials_T09_T11.js +736 -756
  206. package/dist/cjs/tutorials/content/Tutorials_T12_T15.js +754 -778
  207. package/dist/cjs/ui/GameUI.js +295 -312
  208. package/dist/cjs/unity-integration/UnityAssetStore.js +700 -741
  209. package/dist/cjs/unity-integration/UnityImport.js +1066 -1176
  210. package/dist/cjs/unity-integration/UnityLiveLink.js +934 -981
  211. package/dist/cjs/unity-integration/components/UnityAssetStoreBrowser.js +1233 -757
  212. package/dist/cjs/unity-integration/components/UnityProjectBrowser.js +1240 -768
  213. package/dist/cjs/unreal-integration/UnrealImport.js +391 -412
  214. package/dist/cjs/unreal-integration/UnrealLiveLink.js +1102 -1137
  215. package/dist/cjs/unreal-integration/UnrealMarketplace.js +436 -473
  216. package/dist/cjs/unreal-integration/components/UnrealProjectBrowser.js +1150 -767
  217. package/dist/cjs/xr/ARVR.js +167 -175
  218. package/dist/esm/accessibility/Accessibility.js +160 -164
  219. package/dist/esm/ai/AI.js +310 -293
  220. package/dist/esm/ai/BehaviorTree.js +1057 -1112
  221. package/dist/esm/ai/StateMachine.js +709 -755
  222. package/dist/esm/animation/Animation.js +237 -240
  223. package/dist/esm/audio/AudioAdvanced.js +239 -235
  224. package/dist/esm/audio/AudioBridge.js +448 -434
  225. package/dist/esm/audio/AudioManager.js +243 -258
  226. package/dist/esm/build-cloud/BuildOrchestration.js +1071 -1097
  227. package/dist/esm/build-cloud/GodotBuildCloud.js +647 -669
  228. package/dist/esm/build-cloud/UnityBuildCloud.js +571 -609
  229. package/dist/esm/build-cloud/UnrealBuildCloud.js +615 -634
  230. package/dist/esm/core/EventBus.js +52 -55
  231. package/dist/esm/core/GameClock.js +63 -65
  232. package/dist/esm/core/GameConfig.js +77 -78
  233. package/dist/esm/core/GameLoop.js +81 -88
  234. package/dist/esm/core/ServiceLocator.js +63 -64
  235. package/dist/esm/core/Validation.js +82 -81
  236. package/dist/esm/core/math.js +109 -111
  237. package/dist/esm/devtools/DevTools.js +546 -562
  238. package/dist/esm/devtools/DeveloperExperience.js +535 -558
  239. package/dist/esm/devtools/GameplayAnalytics.js +647 -645
  240. package/dist/esm/dialogue/DialogueSystem.js +998 -985
  241. package/dist/esm/docs/DocGenerator.js +342 -363
  242. package/dist/esm/ecs/World.js +358 -370
  243. package/dist/esm/editor/AchievementEditor.js +584 -635
  244. package/dist/esm/editor/AdvancedEditor.js +191 -190
  245. package/dist/esm/editor/AnimationRetargeting.js +700 -740
  246. package/dist/esm/editor/AssetBrowser.js +1078 -1159
  247. package/dist/esm/editor/AssetManager.js +188 -191
  248. package/dist/esm/editor/ConsolePro.js +977 -1060
  249. package/dist/esm/editor/CraftingEditor.js +684 -729
  250. package/dist/esm/editor/DebugTools.js +194 -184
  251. package/dist/esm/editor/DialogueSystem.js +849 -900
  252. package/dist/esm/editor/LeaderboardSystem.js +433 -482
  253. package/dist/esm/editor/NiceGameEditor.js +1908 -1200
  254. package/dist/esm/editor/PrefabSystem.js +777 -837
  255. package/dist/esm/editor/ProfilerPanel.js +654 -699
  256. package/dist/esm/editor/QuestEditor.js +795 -838
  257. package/dist/esm/editor/ReplaySystem.js +591 -633
  258. package/dist/esm/editor/SceneEditor.js +189 -199
  259. package/dist/esm/editor/ScreenshotMode.js +628 -687
  260. package/dist/esm/editor/ShaderGraph.js +1565 -1581
  261. package/dist/esm/editor/TimelineEditor.js +733 -777
  262. package/dist/esm/editor/UndoRedoPro.js +835 -903
  263. package/dist/esm/editor/VRARMode.js +586 -644
  264. package/dist/esm/engine/NiceGameEngine.js +142 -163
  265. package/dist/esm/engine/SaveSystem.js +447 -494
  266. package/dist/esm/enterprise/Enterprise.js +265 -260
  267. package/dist/esm/export/BevyExporter.js +929 -966
  268. package/dist/esm/export/CocosExporter.js +646 -672
  269. package/dist/esm/export/Construct3Exporter.js +785 -793
  270. package/dist/esm/export/DefoldExporter.js +1030 -1068
  271. package/dist/esm/export/GDevelopExporter.js +676 -707
  272. package/dist/esm/export/GameMakerExporter.js +793 -804
  273. package/dist/esm/export/GodotExporter.js +1004 -1044
  274. package/dist/esm/export/MinecraftBedrockExporter.js +575 -577
  275. package/dist/esm/export/MonoGameExporter.js +1267 -1292
  276. package/dist/esm/export/Pico8Exporter.js +768 -811
  277. package/dist/esm/export/PlatformExporter.js +193 -205
  278. package/dist/esm/export/RPGMakerExporter.js +862 -878
  279. package/dist/esm/export/RobloxExporter.js +885 -918
  280. package/dist/esm/export/Solar2DExporter.js +1220 -1255
  281. package/dist/esm/export/ThreeJSExporter.js +1007 -1072
  282. package/dist/esm/export/Tic80Exporter.js +1212 -1266
  283. package/dist/esm/export/UnityExporter.js +1117 -1130
  284. package/dist/esm/export/UnrealExporter.js +891 -918
  285. package/dist/esm/export/WebExporter.js +933 -969
  286. package/dist/esm/export/index.js +86 -71
  287. package/dist/esm/godot-integration/GodotAssetLibrary.js +663 -691
  288. package/dist/esm/godot-integration/GodotImport.js +935 -1026
  289. package/dist/esm/godot-integration/GodotLiveLink.js +918 -944
  290. package/dist/esm/godot-integration/components/GodotProjectBrowser.js +912 -610
  291. package/dist/esm/i18n/I18n.js +871 -899
  292. package/dist/esm/i18n/useTranslation.js +88 -88
  293. package/dist/esm/import/AsepriteImporter.js +637 -715
  294. package/dist/esm/import/DragonBonesImporter.js +417 -460
  295. package/dist/esm/import/GameMakerImporter.js +491 -520
  296. package/dist/esm/import/GodotSceneImporter.js +767 -821
  297. package/dist/esm/import/LDtkImporter.js +415 -453
  298. package/dist/esm/import/Live2DImporter.js +477 -517
  299. package/dist/esm/import/NdgFormat.js +410 -456
  300. package/dist/esm/import/OgmoImporter.js +446 -492
  301. package/dist/esm/import/RPGMakerImporter.js +431 -476
  302. package/dist/esm/import/SceneImporter.js +385 -422
  303. package/dist/esm/import/SpineImporter.js +491 -545
  304. package/dist/esm/import/SpriterImporter.js +570 -612
  305. package/dist/esm/import/TiledMapImporter.js +790 -845
  306. package/dist/esm/import/UnitySceneImporter.js +666 -702
  307. package/dist/esm/import/index.js +247 -258
  308. package/dist/esm/index.js +1332 -188
  309. package/dist/esm/input/GamepadNavigation.js +187 -204
  310. package/dist/esm/input/InputManager.js +401 -420
  311. package/dist/esm/input/useGamepads.js +72 -80
  312. package/dist/esm/integration/IconSprite.js +143 -255
  313. package/dist/esm/inventory/InventorySystem.js +925 -994
  314. package/dist/esm/kids/KidMode.js +1003 -1021
  315. package/dist/esm/kids/KidTools.js +573 -593
  316. package/dist/esm/monetization/Monetization.js +180 -176
  317. package/dist/esm/multiplayer/LocalMultiplayer.js +290 -286
  318. package/dist/esm/multiplayer/MiniGameTypes.js +58 -58
  319. package/dist/esm/native-engine/AnimationSystem.js +735 -805
  320. package/dist/esm/native-engine/AssetPipeline.js +456 -514
  321. package/dist/esm/native-engine/AudioEngine.js +765 -803
  322. package/dist/esm/native-engine/InputSystem.js +1079 -1144
  323. package/dist/esm/native-engine/NetworkingSystem.js +740 -792
  324. package/dist/esm/native-engine/PhysicsEngine.js +585 -606
  325. package/dist/esm/native-engine/RenderingEngine.js +304 -349
  326. package/dist/esm/native-engine/SceneGraph.js +773 -807
  327. package/dist/esm/network/MultiplayerTransport.js +99 -131
  328. package/dist/esm/network/Networking.js +556 -563
  329. package/dist/esm/node_modules/@microsoft/signalr/dist/esm/AbortController.js +22 -28
  330. package/dist/esm/node_modules/@microsoft/signalr/dist/esm/AccessTokenHttpClient.js +41 -47
  331. package/dist/esm/node_modules/@microsoft/signalr/dist/esm/DefaultHttpClient.js +36 -42
  332. package/dist/esm/node_modules/@microsoft/signalr/dist/esm/DefaultReconnectPolicy.js +11 -14
  333. package/dist/esm/node_modules/@microsoft/signalr/dist/esm/Errors.js +111 -134
  334. package/dist/esm/node_modules/@microsoft/signalr/dist/esm/FetchHttpClient.js +132 -157
  335. package/dist/esm/node_modules/@microsoft/signalr/dist/esm/HandshakeProtocol.js +40 -52
  336. package/dist/esm/node_modules/@microsoft/signalr/dist/esm/HeaderNames.js +6 -7
  337. package/dist/esm/node_modules/@microsoft/signalr/dist/esm/HttpClient.js +42 -47
  338. package/dist/esm/node_modules/@microsoft/signalr/dist/esm/HttpConnection.js +496 -571
  339. package/dist/esm/node_modules/@microsoft/signalr/dist/esm/HubConnection.js +828 -952
  340. package/dist/esm/node_modules/@microsoft/signalr/dist/esm/HubConnectionBuilder.js +126 -145
  341. package/dist/esm/node_modules/@microsoft/signalr/dist/esm/IHubProtocol.js +14 -23
  342. package/dist/esm/node_modules/@microsoft/signalr/dist/esm/ILogger.js +12 -25
  343. package/dist/esm/node_modules/@microsoft/signalr/dist/esm/ITransport.js +15 -24
  344. package/dist/esm/node_modules/@microsoft/signalr/dist/esm/JsonHubProtocol.js +109 -120
  345. package/dist/esm/node_modules/@microsoft/signalr/dist/esm/Loggers.js +11 -13
  346. package/dist/esm/node_modules/@microsoft/signalr/dist/esm/LongPollingTransport.js +151 -184
  347. package/dist/esm/node_modules/@microsoft/signalr/dist/esm/MessageBuffer.js +159 -195
  348. package/dist/esm/node_modules/@microsoft/signalr/dist/esm/ServerSentEventsTransport.js +91 -104
  349. package/dist/esm/node_modules/@microsoft/signalr/dist/esm/Subject.js +31 -34
  350. package/dist/esm/node_modules/@microsoft/signalr/dist/esm/TextMessageFormat.js +17 -20
  351. package/dist/esm/node_modules/@microsoft/signalr/dist/esm/Utils.js +230 -248
  352. package/dist/esm/node_modules/@microsoft/signalr/dist/esm/WebSocketTransport.js +136 -156
  353. package/dist/esm/node_modules/@microsoft/signalr/dist/esm/XhrHttpClient.js +77 -84
  354. package/dist/esm/node_modules/@microsoft/signalr/dist/esm/index.js +31 -12
  355. package/dist/esm/node_modules/@microsoft/signalr/dist/esm/pkg-version.js +4 -3
  356. package/dist/esm/pathfinding/Pathfinding.js +249 -262
  357. package/dist/esm/performance/AssetStreaming.js +567 -634
  358. package/dist/esm/performance/BenchmarkSuite.js +285 -310
  359. package/dist/esm/performance/DeltaCompression.js +478 -525
  360. package/dist/esm/performance/DeterministicPhysics.js +479 -497
  361. package/dist/esm/performance/ECSOptimization.js +653 -694
  362. package/dist/esm/performance/GameSaveSystem.js +515 -555
  363. package/dist/esm/performance/HotReload.js +454 -499
  364. package/dist/esm/performance/InputRecording.js +520 -560
  365. package/dist/esm/performance/InterestManagement.js +460 -499
  366. package/dist/esm/performance/LocalizationRuntime.js +382 -422
  367. package/dist/esm/performance/MemoryManagement.js +415 -469
  368. package/dist/esm/performance/ModSupport.js +455 -495
  369. package/dist/esm/performance/MultiThreadedPhysics.js +408 -442
  370. package/dist/esm/performance/NetworkPrediction.js +436 -481
  371. package/dist/esm/performance/ObjectPooling.js +582 -616
  372. package/dist/esm/performance/Performance.js +182 -189
  373. package/dist/esm/performance/PerformanceAdvanced.js +621 -636
  374. package/dist/esm/performance/WebGPURenderer.js +660 -682
  375. package/dist/esm/physics/PhysicsAdvanced.js +359 -378
  376. package/dist/esm/physics/PhysicsEngine2D.js +393 -426
  377. package/dist/esm/plugins/PluginSDK.js +435 -465
  378. package/dist/esm/plugins/PluginTestKit.js +315 -329
  379. package/dist/esm/procedural/Procedural.js +248 -253
  380. package/dist/esm/procedural/WorldBuilding.js +316 -313
  381. package/dist/esm/quest/QuestSystem.js +982 -931
  382. package/dist/esm/release/MobileExport.js +163 -162
  383. package/dist/esm/release/Release.js +234 -237
  384. package/dist/esm/rendering/Camera2D.js +122 -123
  385. package/dist/esm/rendering/Renderer2D.js +323 -334
  386. package/dist/esm/rendering/WebGPURenderPipeline.js +647 -650
  387. package/dist/esm/runtime3d/Runtime3D.js +368 -377
  388. package/dist/esm/runtime3d/SceneEditor3D.js +268 -262
  389. package/dist/esm/scene/SceneManager.js +178 -192
  390. package/dist/esm/scripting/GraphToAST.js +576 -546
  391. package/dist/esm/scripting/LanguageExporter.js +263 -278
  392. package/dist/esm/scripting/NodeGraph.js +550 -569
  393. package/dist/esm/scripting/ScriptAST.js +45 -38
  394. package/dist/esm/scripting/VisualScripting2.js +1025 -1064
  395. package/dist/esm/scripting/exporters/CSharpExporter.js +465 -495
  396. package/dist/esm/scripting/exporters/GDScriptExporter.js +391 -441
  397. package/dist/esm/scripting/exporters/LuaExporter.js +407 -446
  398. package/dist/esm/scripting/exporters/PythonExporter.js +485 -548
  399. package/dist/esm/scripting/exporters/RustExporter.js +460 -511
  400. package/dist/esm/scripting/exporters/TypeScriptExporter.js +506 -555
  401. package/dist/esm/social/Social.js +77 -79
  402. package/dist/esm/systems/LightingSystem.js +855 -930
  403. package/dist/esm/systems/ParticleSystem2.js +1453 -1450
  404. package/dist/esm/systems/PhysicsDebugSystem.js +1078 -1140
  405. package/dist/esm/systems/TerrainSystem.js +996 -1097
  406. package/dist/esm/templates/ActionTemplates.js +307 -308
  407. package/dist/esm/templates/FightingTemplate.js +439 -462
  408. package/dist/esm/templates/MetroidvaniaTemplate.js +391 -404
  409. package/dist/esm/templates/PartyTemplates.js +206 -201
  410. package/dist/esm/templates/PuzzleTemplates.js +260 -260
  411. package/dist/esm/templates/RPGTemplates.js +172 -177
  412. package/dist/esm/templates/SportsTemplates.js +251 -249
  413. package/dist/esm/templates/StrategyTemplates.js +158 -152
  414. package/dist/esm/templates/SurvivalTemplate.js +367 -379
  415. package/dist/esm/templates/WaveDefense.js +501 -525
  416. package/dist/esm/tilemap/Tilemap.js +209 -213
  417. package/dist/esm/tutorials/TutorialBranching.js +399 -416
  418. package/dist/esm/tutorials/TutorialEngine.js +893 -930
  419. package/dist/esm/tutorials/TutorialOverlay.js +603 -639
  420. package/dist/esm/tutorials/content/Tutorials_T05_T08.js +792 -808
  421. package/dist/esm/tutorials/content/Tutorials_T09_T11.js +740 -755
  422. package/dist/esm/tutorials/content/Tutorials_T12_T15.js +759 -777
  423. package/dist/esm/ui/GameUI.js +296 -311
  424. package/dist/esm/unity-integration/UnityAssetStore.js +704 -740
  425. package/dist/esm/unity-integration/UnityImport.js +1071 -1175
  426. package/dist/esm/unity-integration/UnityLiveLink.js +938 -980
  427. package/dist/esm/unity-integration/components/UnityAssetStoreBrowser.js +1234 -756
  428. package/dist/esm/unity-integration/components/UnityProjectBrowser.js +1241 -767
  429. package/dist/esm/unreal-integration/UnrealImport.js +395 -411
  430. package/dist/esm/unreal-integration/UnrealLiveLink.js +1105 -1136
  431. package/dist/esm/unreal-integration/UnrealMarketplace.js +442 -472
  432. package/dist/esm/unreal-integration/components/UnrealProjectBrowser.js +1151 -766
  433. package/dist/esm/xr/ARVR.js +181 -174
  434. package/package.json +7 -12
@@ -1,802 +1,784 @@
1
- /* ────────────────────────────────────────────────────────────────
2
- Tutorials T12–T15 — Complete Game & Publishing Tutorials
3
-
4
- T12: Zrób RPG (top-down RPG game tutorial)
5
- T13: Zrób tower defense (tower defense game tutorial)
6
- T14: Zrób grę 3D (3D template tutorial)
7
- T15: Publikacja gry (export PWA, Electron, Capacitor)
8
- ──────────────────────────────────────────────────────────────── */
9
- /* ══════════════════════════════════════════════════════════════
10
- T12 — Zrób RPG
11
- ══════════════════════════════════════════════════════════════ */
12
1
  const TUTORIAL_RPG = {
13
- id: 'build-an-rpg',
14
- title: {
15
- en: 'Build a Top-Down RPG',
16
- pl: 'Zrób RPG z widokiem z góry',
17
- de: 'Baue ein Top-Down-RPG',
2
+ id: "build-an-rpg",
3
+ title: {
4
+ en: "Build a Top-Down RPG",
5
+ pl: "Zrób RPG z widokiem z góry",
6
+ de: "Baue ein Top-Down-RPG"
7
+ },
8
+ description: {
9
+ en: "Create a complete top-down RPG with stats, XP progression, inventory, NPCs, dialogue, and turn-based battles.",
10
+ pl: "Stwórz kompletne RPG z widokiem z góry: statystyki, progresja XP, ekwipunek, NPC, dialogi i walki turowe.",
11
+ de: "Erstelle ein komplettes Top-Down-RPG mit Werten, XP-Fortschritt, Inventar, NPCs, Dialogen und rundenbasierten Kämpfen."
12
+ },
13
+ category: "game-advanced",
14
+ difficulty: "advanced",
15
+ estimatedMinutes: 45,
16
+ prerequisites: ["build-a-platformer", "tilemaps-and-worlds"],
17
+ kidFriendly: true,
18
+ ageRange: { min: 12, max: 99 },
19
+ tags: ["rpg", "stats", "inventory", "npc", "dialogue", "turn-based", "complete-game"],
20
+ steps: [
21
+ // S1: Intro
22
+ {
23
+ id: "rpg-intro",
24
+ type: "text",
25
+ title: {
26
+ en: "Build Your Own RPG!",
27
+ pl: "Zbuduj swoje RPG!",
28
+ de: "Baue dein eigenes RPG!"
29
+ },
30
+ content: {
31
+ en: "In this tutorial you'll build a classic top-down RPG!\n\n• Character stats (HP, MP, ATK, DEF, SPD)\n• XP and leveling system\n• Inventory and items\n• NPCs with dialogue\n• Turn-based battle system\n• Tilemap world with warps\n\nReady for an adventure?",
32
+ pl: "W tym tutorialu zbudujesz klasyczne RPG z widokiem z góry!\n\n• Statystyki postaci (HP, MP, ATK, DEF, SPD)\n• System XP i poziomów\n• Ekwipunek i przedmioty\n• NPC z dialogami\n• System walki turowej\n• Świat z tilemapy z przejściami\n\nGotowy na przygodę?",
33
+ de: "In diesem Tutorial baust du ein klassisches Top-Down-RPG!\n\n• Charakterwerte (HP, MP, ATK, DEF, SPD)\n• XP- und Levelsystem\n• Inventar und Items\n• NPCs mit Dialogen\n• Rundenbasiertes Kampfsystem\n• Tilemap-Welt mit Warps\n\nBereit für ein Abenteuer?"
34
+ },
35
+ skippable: true,
36
+ tooltipPosition: "center"
18
37
  },
19
- description: {
20
- en: 'Create a complete top-down RPG with stats, XP progression, inventory, NPCs, dialogue, and turn-based battles.',
21
- pl: 'Stwórz kompletne RPG z widokiem z góry: statystyki, progresja XP, ekwipunek, NPC, dialogi i walki turowe.',
22
- de: 'Erstelle ein komplettes Top-Down-RPG mit Werten, XP-Fortschritt, Inventar, NPCs, Dialogen und rundenbasierten Kämpfen.',
38
+ // S2: Character Stats
39
+ {
40
+ id: "rpg-stats",
41
+ type: "code",
42
+ title: {
43
+ en: "Character Stats & Leveling",
44
+ pl: "Statystyki postaci i poziomy",
45
+ de: "Charakterwerte & Leveling"
46
+ },
47
+ content: {
48
+ en: "Define your hero's stats. Use the RPG template config for stat growth curves and XP requirements.",
49
+ pl: "Zdefiniuj statystyki bohatera. Użyj konfiguracji szablonu RPG dla krzywych wzrostu statystyk i wymogów XP.",
50
+ de: "Definiere die Werte deines Helden. Verwende die RPG-Template-Konfiguration für Wachstumskurven und XP-Anforderungen."
51
+ },
52
+ codeTemplate: '// Define hero stats\nconst hero = {\n name: "Hero",\n level: 1,\n xp: 0,\n',
53
+ codeSolution: "const hero = {\n name: 'Hero',\n level: 1,\n xp: 0,\n stats: {\n hp: 100, maxHp: 100,\n mp: 30, maxMp: 30,\n atk: 12, def: 8,\n mag: 5, spd: 10,\n lck: 3,\n },\n xpToNextLevel: 100,\n};\n\n// Level up function\nfunction levelUp(hero: typeof hero) {\n hero.level++;\n hero.stats.maxHp += 15;\n hero.stats.hp = hero.stats.maxHp;\n hero.stats.maxMp += 5;\n hero.stats.mp = hero.stats.maxMp;\n hero.stats.atk += 3;\n hero.stats.def += 2;\n hero.xpToNextLevel = Math.floor(hero.xpToNextLevel * 1.5);\n}",
54
+ codeValidation: {
55
+ containsAll: ["stats", "level", "xp", "hp", "atk", "def"]
56
+ },
57
+ hint: {
58
+ en: "Define stats object with hp, mp, atk, def. Create a levelUp function.",
59
+ pl: "Zdefiniuj obiekt stats z hp, mp, atk, def. Stwórz funkcję levelUp.",
60
+ de: "Definiere stats-Objekt mit hp, mp, atk, def. Erstelle eine levelUp-Funktion."
61
+ }
23
62
  },
24
- category: 'game-advanced',
25
- difficulty: 'advanced',
26
- estimatedMinutes: 45,
27
- prerequisites: ['build-a-platformer', 'tilemaps-and-worlds'],
28
- kidFriendly: true,
29
- ageRange: { min: 12, max: 99 },
30
- tags: ['rpg', 'stats', 'inventory', 'npc', 'dialogue', 'turn-based', 'complete-game'],
31
- steps: [
32
- // S1: Intro
33
- {
34
- id: 'rpg-intro',
35
- type: 'text',
36
- title: {
37
- en: 'Build Your Own RPG!',
38
- pl: 'Zbuduj swoje RPG!',
39
- de: 'Baue dein eigenes RPG!',
40
- },
41
- content: {
42
- en: "In this tutorial you'll build a classic top-down RPG!\n\n• Character stats (HP, MP, ATK, DEF, SPD)\n• XP and leveling system\n• Inventory and items\n• NPCs with dialogue\n• Turn-based battle system\n• Tilemap world with warps\n\nReady for an adventure?",
43
- pl: 'W tym tutorialu zbudujesz klasyczne RPG z widokiem z góry!\n\n• Statystyki postaci (HP, MP, ATK, DEF, SPD)\n• System XP i poziomów\n• Ekwipunek i przedmioty\n• NPC z dialogami\n• System walki turowej\n• Świat z tilemapy z przejściami\n\nGotowy na przygodę?',
44
- de: 'In diesem Tutorial baust du ein klassisches Top-Down-RPG!\n\n• Charakterwerte (HP, MP, ATK, DEF, SPD)\n• XP- und Levelsystem\n• Inventar und Items\n• NPCs mit Dialogen\n• Rundenbasiertes Kampfsystem\n• Tilemap-Welt mit Warps\n\nBereit für ein Abenteuer?',
45
- },
46
- skippable: true,
47
- tooltipPosition: 'center',
48
- },
49
- // S2: Character Stats
50
- {
51
- id: 'rpg-stats',
52
- type: 'code',
53
- title: {
54
- en: 'Character Stats & Leveling',
55
- pl: 'Statystyki postaci i poziomy',
56
- de: 'Charakterwerte & Leveling',
57
- },
58
- content: {
59
- en: "Define your hero's stats. Use the RPG template config for stat growth curves and XP requirements.",
60
- pl: 'Zdefiniuj statystyki bohatera. Użyj konfiguracji szablonu RPG dla krzywych wzrostu statystyk i wymogów XP.',
61
- de: 'Definiere die Werte deines Helden. Verwende die RPG-Template-Konfiguration für Wachstumskurven und XP-Anforderungen.',
62
- },
63
- codeTemplate: '// Define hero stats\nconst hero = {\n name: "Hero",\n level: 1,\n xp: 0,\n',
64
- codeSolution: "const hero = {\n name: 'Hero',\n level: 1,\n xp: 0,\n stats: {\n hp: 100, maxHp: 100,\n mp: 30, maxMp: 30,\n atk: 12, def: 8,\n mag: 5, spd: 10,\n lck: 3,\n },\n xpToNextLevel: 100,\n};\n\n// Level up function\nfunction levelUp(hero: typeof hero) {\n hero.level++;\n hero.stats.maxHp += 15;\n hero.stats.hp = hero.stats.maxHp;\n hero.stats.maxMp += 5;\n hero.stats.mp = hero.stats.maxMp;\n hero.stats.atk += 3;\n hero.stats.def += 2;\n hero.xpToNextLevel = Math.floor(hero.xpToNextLevel * 1.5);\n}",
65
- codeValidation: {
66
- containsAll: ['stats', 'level', 'xp', 'hp', 'atk', 'def'],
67
- },
68
- hint: {
69
- en: 'Define stats object with hp, mp, atk, def. Create a levelUp function.',
70
- pl: 'Zdefiniuj obiekt stats z hp, mp, atk, def. Stwórz funkcję levelUp.',
71
- de: 'Definiere stats-Objekt mit hp, mp, atk, def. Erstelle eine levelUp-Funktion.',
72
- },
73
- },
74
- // S3: Inventory System
75
- {
76
- id: 'rpg-inventory',
77
- type: 'code',
78
- title: {
79
- en: 'Inventory System',
80
- pl: 'System ekwipunku',
81
- de: 'Inventarsystem',
82
- },
83
- content: {
84
- en: 'Build an inventory with item stacking, equipment slots, and consumables. Items have types, stats, and rarity.',
85
- pl: 'Zbuduj ekwipunek ze stackowaniem przedmiotów, slotami wyposażenia i przedmiotami zużywalnymi.',
86
- de: 'Baue ein Inventar mit Item-Stacking, Ausrüstungsslots und Verbrauchsgegenständen.',
87
- },
88
- codeTemplate: "// Item types\ntype ItemType = 'weapon' | 'armor' | 'consumable' | 'key';\n",
89
- codeSolution: "type ItemType = 'weapon' | 'armor' | 'consumable' | 'key';\ntype Rarity = 'common' | 'uncommon' | 'rare' | 'legendary';\n\ninterface Item {\n id: string;\n name: string;\n type: ItemType;\n rarity: Rarity;\n stats?: { atk?: number; def?: number; mag?: number };\n healAmount?: number;\n stackable: boolean;\n}\n\nclass Inventory {\n private items: Map<string, { item: Item; count: number }> = new Map();\n readonly maxSlots: number;\n\n constructor(maxSlots = 20) { this.maxSlots = maxSlots; }\n\n add(item: Item, count = 1): boolean {\n const existing = this.items.get(item.id);\n if (existing && item.stackable) {\n existing.count += count;\n return true;\n }\n if (this.items.size >= this.maxSlots) return false;\n this.items.set(item.id, { item, count });\n return true;\n }\n\n remove(itemId: string, count = 1): boolean {\n const slot = this.items.get(itemId);\n if (!slot || slot.count < count) return false;\n slot.count -= count;\n if (slot.count <= 0) this.items.delete(itemId);\n return true;\n }\n}",
90
- codeValidation: {
91
- containsAll: ['Inventory', 'Item', 'add', 'remove'],
92
- },
93
- hint: {
94
- en: 'Use a Map for inventory slots. Check stackable before adding.',
95
- pl: 'Użyj Map dla slotów ekwipunku. Sprawdź stackable przed dodaniem.',
96
- de: 'Verwende eine Map für Inventarslots. Prüfe stackable vor dem Hinzufügen.',
97
- },
98
- },
99
- // S4: NPC & Dialogue
100
- {
101
- id: 'rpg-dialogue',
102
- type: 'code',
103
- title: {
104
- en: 'NPCs & Dialogue System',
105
- pl: 'NPC i system dialogów',
106
- de: 'NPCs & Dialogsystem',
107
- },
108
- content: {
109
- en: 'Create NPCs with dialogue trees. Players can choose responses that branch the conversation.',
110
- pl: 'Stwórz NPC z drzewami dialogów. Gracz może wybierać odpowiedzi, które rozgałęziają rozmowę.',
111
- de: 'Erstelle NPCs mit Dialogbäumen. Spieler können Antworten wählen, die das Gespräch verzweigen.',
112
- },
113
- codeTemplate: '// Dialogue system\ninterface DialogNode {\n id: string;\n text: string;\n',
114
- codeSolution: "interface DialogNode {\n id: string;\n text: string;\n speaker: string;\n choices?: { text: string; next: string; condition?: string }[];\n next?: string; // auto-advance to next node\n}\n\nconst innkeeperDialog: DialogNode[] = [\n {\n id: 'greet',\n speaker: 'Innkeeper',\n text: 'Welcome, traveler! Would you like to rest?',\n choices: [\n { text: 'Yes, I need rest. (10 gold)', next: 'rest' },\n { text: 'No thanks.', next: 'bye' },\n { text: 'Any rumors?', next: 'rumors' },\n ],\n },\n {\n id: 'rest',\n speaker: 'Innkeeper',\n text: 'Sleep well! *HP and MP fully restored*',\n next: 'greet',\n },\n {\n id: 'rumors',\n speaker: 'Innkeeper',\n text: 'I heard monsters in the eastern cave grew stronger...',\n next: 'greet',\n },\n {\n id: 'bye',\n speaker: 'Innkeeper',\n text: 'Safe travels!',\n },\n];",
115
- codeValidation: {
116
- containsAll: ['DialogNode', 'speaker', 'choices', 'next'],
117
- },
118
- hint: {
119
- en: 'Each node has text + optional choices array. Each choice points to a next node ID.',
120
- pl: 'Każdy węzeł ma tekst + opcjonalną tablicę wyborów. Każdy wybór wskazuje na ID następnego węzła.',
121
- de: 'Jeder Knoten hat Text + optionales choices-Array. Jede Wahl zeigt auf eine nächste Knoten-ID.',
122
- },
123
- },
124
- // S5: Turn-Based Battle
125
- {
126
- id: 'rpg-battle',
127
- type: 'code',
128
- title: {
129
- en: 'Turn-Based Battle System',
130
- pl: 'Turowy system walk',
131
- de: 'Rundenbasiertes Kampfsystem',
132
- },
133
- content: {
134
- en: 'Build a turn-based battle system where heroes and monsters take turns attacking. Speed determines turn order.',
135
- pl: 'Zbuduj turowy system walk, gdzie bohaterowie i potwory atakują po kolei. Szybkość określa kolejność tur.',
136
- de: 'Baue ein rundenbasiertes Kampfsystem, in dem Helden und Monster abwechselnd angreifen. Geschwindigkeit bestimmt die Reihenfolge.',
137
- },
138
- codeTemplate: "// Battle system\ntype BattleAction = 'attack' | 'magic' | 'defend' | 'item' | 'flee';\n",
139
- codeSolution: "type BattleAction = 'attack' | 'magic' | 'defend' | 'item' | 'flee';\n\nfunction calculateDamage(attacker: { atk: number }, defender: { def: number }): number {\n const base = attacker.atk - defender.def * 0.5;\n const variance = 0.9 + Math.random() * 0.2; // ±10%\n return Math.max(1, Math.floor(base * variance));\n}\n\nfunction determineTurnOrder(combatants: { name: string; spd: number }[]) {\n return combatants.slice().sort((a, b) => b.spd - a.spd);\n}\n\nfunction executeTurn(action: BattleAction, actor: any, target: any): string {\n switch (action) {\n case 'attack': {\n const dmg = calculateDamage(actor.stats, target.stats);\n target.stats.hp = Math.max(0, target.stats.hp - dmg);\n return `${actor.name} attacks ${target.name} for ${dmg} damage!`;\n }\n case 'defend':\n actor.defending = true;\n return `${actor.name} defends!`;\n case 'flee':\n return Math.random() > 0.5 ? 'Escaped!' : 'Cannot escape!';\n default:\n return '';\n }\n}",
140
- codeValidation: {
141
- containsAll: ['calculateDamage', 'determineTurnOrder', 'BattleAction'],
142
- },
143
- hint: {
144
- en: 'Damage = ATK - DEF/2 (with variance). Sort combatants by SPD for turn order.',
145
- pl: 'Obrażenia = ATK - DEF/2 (z wariancją). Posortuj walczących po SPD dla kolejności tur.',
146
- de: 'Schaden = ATK - DEF/2 (mit Varianz). Sortiere nach SPD für Reihenfolge.',
147
- },
148
- },
149
- // S6: World Map
150
- {
151
- id: 'rpg-world',
152
- type: 'interactive',
153
- title: {
154
- en: 'Build the RPG World Map',
155
- pl: 'Zbuduj mapę świata RPG',
156
- de: 'RPG-Weltkarte bauen',
157
- },
158
- content: {
159
- en: 'Create multiple rooms connected by warps. Use tilemaps for each area (town, forest, cave, castle).',
160
- pl: 'Stwórz wiele pomieszczeń połączonych przejściami. Użyj tilemap dla każdego obszaru (miasteczko, las, jaskinia, zamek).',
161
- de: 'Erstelle mehrere Räume verbunden durch Warps. Verwende Tilemaps für jeden Bereich (Stadt, Wald, Höhle, Burg).',
162
- },
163
- requiredAction: 'create-world-map',
164
- codeTemplate: '// Define world areas\nconst areas = [\n',
165
- codeSolution: "const areas = [\n { id: 'town', name: 'Starter Town', tilemap: 'town-map', npcs: ['innkeeper', 'shopkeeper'] },\n { id: 'forest', name: 'Dark Forest', tilemap: 'forest-map', enemies: ['wolf', 'slime'] },\n { id: 'cave', name: 'Crystal Cave', tilemap: 'cave-map', enemies: ['bat', 'golem'] },\n { id: 'castle', name: 'Demon Castle', tilemap: 'castle-map', enemies: ['skeleton', 'demon-lord'] },\n];\n\nconst warps = [\n { from: 'town', to: 'forest', x: 19, y: 7 },\n { from: 'forest', to: 'cave', x: 15, y: 2 },\n { from: 'forest', to: 'town', x: 0, y: 7 },\n { from: 'cave', to: 'castle', x: 10, y: 0 },\n];",
166
- codeValidation: {
167
- containsAll: ['areas', 'warps', 'tilemap'],
168
- },
169
- },
170
- // S7: Quiz
171
- {
172
- id: 'rpg-quiz',
173
- type: 'quiz',
174
- title: {
175
- en: 'RPG Quiz',
176
- pl: 'Quiz RPG',
177
- de: 'RPG-Quiz',
178
- },
179
- content: {
180
- en: 'In a turn-based RPG, what stat typically determines the order of actions?',
181
- pl: 'W turowym RPG, jaka statystyka typowo decyduje o kolejności akcji?',
182
- de: 'In einem rundenbasierten RPG, welcher Wert bestimmt typischerweise die Aktionsreihenfolge?',
183
- },
184
- quizOptions: [
185
- { id: 'a', text: { en: 'Attack (ATK)', pl: 'Atak (ATK)', de: 'Angriff (ATK)' } },
186
- { id: 'b', text: { en: 'Defense (DEF)', pl: 'Obrona (DEF)', de: 'Verteidigung (DEF)' } },
187
- { id: 'c', text: { en: 'Speed (SPD)', pl: 'Szybkość (SPD)', de: 'Geschwindigkeit (SPD)' } },
188
- { id: 'd', text: { en: 'Luck (LCK)', pl: 'Szczęście (LCK)', de: 'Glück (LCK)' } },
189
- ],
190
- quizCorrectId: 'c',
191
- },
192
- // S8: Checkpoint
193
- {
194
- id: 'rpg-complete',
195
- type: 'checkpoint',
196
- title: {
197
- en: 'RPG Complete!',
198
- pl: 'RPG gotowe!',
199
- de: 'RPG fertig!',
200
- },
201
- content: {
202
- en: "Amazing! You've built a full RPG with:\n• Character stats & leveling\n• Inventory with rarity system\n• NPCs with branching dialogue\n• Turn-based combat\n• Multi-area world map with warps\n\nChallenge: Add a party system with 4 heroes!",
203
- pl: 'Niesamowite! Zbudowałeś pełne RPG z:\n• Statystyki i poziomy postaci\n• Ekwipunek z systemem rzadkości\n• NPC z rozgałęzionymi dialogami\n• Walki turowe\n• Mapa świata z wieloma obszarami\n\nWyzwanie: Dodaj system drużyny z 4 bohaterami!',
204
- de: 'Fantastisch! Du hast ein vollständiges RPG gebaut mit:\n• Charakterwerte & Leveling\n• Inventar mit Seltenheitssystem\n• NPCs mit verzweigten Dialogen\n• Rundenbasierter Kampf\n• Weltkarte mit mehreren Bereichen\n\nHerausforderung: Füge ein Gruppensystem mit 4 Helden hinzu!',
205
- },
206
- },
207
- ],
63
+ // S3: Inventory System
64
+ {
65
+ id: "rpg-inventory",
66
+ type: "code",
67
+ title: {
68
+ en: "Inventory System",
69
+ pl: "System ekwipunku",
70
+ de: "Inventarsystem"
71
+ },
72
+ content: {
73
+ en: "Build an inventory with item stacking, equipment slots, and consumables. Items have types, stats, and rarity.",
74
+ pl: "Zbuduj ekwipunek ze stackowaniem przedmiotów, slotami wyposażenia i przedmiotami zużywalnymi.",
75
+ de: "Baue ein Inventar mit Item-Stacking, Ausrüstungsslots und Verbrauchsgegenständen."
76
+ },
77
+ codeTemplate: "// Item types\ntype ItemType = 'weapon' | 'armor' | 'consumable' | 'key';\n",
78
+ codeSolution: "type ItemType = 'weapon' | 'armor' | 'consumable' | 'key';\ntype Rarity = 'common' | 'uncommon' | 'rare' | 'legendary';\n\ninterface Item {\n id: string;\n name: string;\n type: ItemType;\n rarity: Rarity;\n stats?: { atk?: number; def?: number; mag?: number };\n healAmount?: number;\n stackable: boolean;\n}\n\nclass Inventory {\n private items: Map<string, { item: Item; count: number }> = new Map();\n readonly maxSlots: number;\n\n constructor(maxSlots = 20) { this.maxSlots = maxSlots; }\n\n add(item: Item, count = 1): boolean {\n const existing = this.items.get(item.id);\n if (existing && item.stackable) {\n existing.count += count;\n return true;\n }\n if (this.items.size >= this.maxSlots) return false;\n this.items.set(item.id, { item, count });\n return true;\n }\n\n remove(itemId: string, count = 1): boolean {\n const slot = this.items.get(itemId);\n if (!slot || slot.count < count) return false;\n slot.count -= count;\n if (slot.count <= 0) this.items.delete(itemId);\n return true;\n }\n}",
79
+ codeValidation: {
80
+ containsAll: ["Inventory", "Item", "add", "remove"]
81
+ },
82
+ hint: {
83
+ en: "Use a Map for inventory slots. Check stackable before adding.",
84
+ pl: "Użyj Map dla slotów ekwipunku. Sprawdź stackable przed dodaniem.",
85
+ de: "Verwende eine Map für Inventarslots. Prüfe stackable vor dem Hinzufügen."
86
+ }
87
+ },
88
+ // S4: NPC & Dialogue
89
+ {
90
+ id: "rpg-dialogue",
91
+ type: "code",
92
+ title: {
93
+ en: "NPCs & Dialogue System",
94
+ pl: "NPC i system dialogów",
95
+ de: "NPCs & Dialogsystem"
96
+ },
97
+ content: {
98
+ en: "Create NPCs with dialogue trees. Players can choose responses that branch the conversation.",
99
+ pl: "Stwórz NPC z drzewami dialogów. Gracz może wybierać odpowiedzi, które rozgałęziają rozmowę.",
100
+ de: "Erstelle NPCs mit Dialogbäumen. Spieler können Antworten wählen, die das Gespräch verzweigen."
101
+ },
102
+ codeTemplate: "// Dialogue system\ninterface DialogNode {\n id: string;\n text: string;\n",
103
+ codeSolution: "interface DialogNode {\n id: string;\n text: string;\n speaker: string;\n choices?: { text: string; next: string; condition?: string }[];\n next?: string; // auto-advance to next node\n}\n\nconst innkeeperDialog: DialogNode[] = [\n {\n id: 'greet',\n speaker: 'Innkeeper',\n text: 'Welcome, traveler! Would you like to rest?',\n choices: [\n { text: 'Yes, I need rest. (10 gold)', next: 'rest' },\n { text: 'No thanks.', next: 'bye' },\n { text: 'Any rumors?', next: 'rumors' },\n ],\n },\n {\n id: 'rest',\n speaker: 'Innkeeper',\n text: 'Sleep well! *HP and MP fully restored*',\n next: 'greet',\n },\n {\n id: 'rumors',\n speaker: 'Innkeeper',\n text: 'I heard monsters in the eastern cave grew stronger...',\n next: 'greet',\n },\n {\n id: 'bye',\n speaker: 'Innkeeper',\n text: 'Safe travels!',\n },\n];",
104
+ codeValidation: {
105
+ containsAll: ["DialogNode", "speaker", "choices", "next"]
106
+ },
107
+ hint: {
108
+ en: "Each node has text + optional choices array. Each choice points to a next node ID.",
109
+ pl: "Każdy węzeł ma tekst + opcjonalną tablicę wyborów. Każdy wybór wskazuje na ID następnego węzła.",
110
+ de: "Jeder Knoten hat Text + optionales choices-Array. Jede Wahl zeigt auf eine nächste Knoten-ID."
111
+ }
112
+ },
113
+ // S5: Turn-Based Battle
114
+ {
115
+ id: "rpg-battle",
116
+ type: "code",
117
+ title: {
118
+ en: "Turn-Based Battle System",
119
+ pl: "Turowy system walk",
120
+ de: "Rundenbasiertes Kampfsystem"
121
+ },
122
+ content: {
123
+ en: "Build a turn-based battle system where heroes and monsters take turns attacking. Speed determines turn order.",
124
+ pl: "Zbuduj turowy system walk, gdzie bohaterowie i potwory atakują po kolei. Szybkość określa kolejność tur.",
125
+ de: "Baue ein rundenbasiertes Kampfsystem, in dem Helden und Monster abwechselnd angreifen. Geschwindigkeit bestimmt die Reihenfolge."
126
+ },
127
+ codeTemplate: "// Battle system\ntype BattleAction = 'attack' | 'magic' | 'defend' | 'item' | 'flee';\n",
128
+ codeSolution: "type BattleAction = 'attack' | 'magic' | 'defend' | 'item' | 'flee';\n\nfunction calculateDamage(attacker: { atk: number }, defender: { def: number }): number {\n const base = attacker.atk - defender.def * 0.5;\n const variance = 0.9 + Math.random() * 0.2; // ±10%\n return Math.max(1, Math.floor(base * variance));\n}\n\nfunction determineTurnOrder(combatants: { name: string; spd: number }[]) {\n return combatants.slice().sort((a, b) => b.spd - a.spd);\n}\n\nfunction executeTurn(action: BattleAction, actor: any, target: any): string {\n switch (action) {\n case 'attack': {\n const dmg = calculateDamage(actor.stats, target.stats);\n target.stats.hp = Math.max(0, target.stats.hp - dmg);\n return `${actor.name} attacks ${target.name} for ${dmg} damage!`;\n }\n case 'defend':\n actor.defending = true;\n return `${actor.name} defends!`;\n case 'flee':\n return Math.random() > 0.5 ? 'Escaped!' : 'Cannot escape!';\n default:\n return '';\n }\n}",
129
+ codeValidation: {
130
+ containsAll: ["calculateDamage", "determineTurnOrder", "BattleAction"]
131
+ },
132
+ hint: {
133
+ en: "Damage = ATK - DEF/2 (with variance). Sort combatants by SPD for turn order.",
134
+ pl: "Obrażenia = ATK - DEF/2 (z wariancją). Posortuj walczących po SPD dla kolejności tur.",
135
+ de: "Schaden = ATK - DEF/2 (mit Varianz). Sortiere nach SPD für Reihenfolge."
136
+ }
137
+ },
138
+ // S6: World Map
139
+ {
140
+ id: "rpg-world",
141
+ type: "interactive",
142
+ title: {
143
+ en: "Build the RPG World Map",
144
+ pl: "Zbuduj mapę świata RPG",
145
+ de: "RPG-Weltkarte bauen"
146
+ },
147
+ content: {
148
+ en: "Create multiple rooms connected by warps. Use tilemaps for each area (town, forest, cave, castle).",
149
+ pl: "Stwórz wiele pomieszczeń połączonych przejściami. Użyj tilemap dla każdego obszaru (miasteczko, las, jaskinia, zamek).",
150
+ de: "Erstelle mehrere Räume verbunden durch Warps. Verwende Tilemaps für jeden Bereich (Stadt, Wald, Höhle, Burg)."
151
+ },
152
+ requiredAction: "create-world-map",
153
+ codeTemplate: "// Define world areas\nconst areas = [\n",
154
+ codeSolution: "const areas = [\n { id: 'town', name: 'Starter Town', tilemap: 'town-map', npcs: ['innkeeper', 'shopkeeper'] },\n { id: 'forest', name: 'Dark Forest', tilemap: 'forest-map', enemies: ['wolf', 'slime'] },\n { id: 'cave', name: 'Crystal Cave', tilemap: 'cave-map', enemies: ['bat', 'golem'] },\n { id: 'castle', name: 'Demon Castle', tilemap: 'castle-map', enemies: ['skeleton', 'demon-lord'] },\n];\n\nconst warps = [\n { from: 'town', to: 'forest', x: 19, y: 7 },\n { from: 'forest', to: 'cave', x: 15, y: 2 },\n { from: 'forest', to: 'town', x: 0, y: 7 },\n { from: 'cave', to: 'castle', x: 10, y: 0 },\n];",
155
+ codeValidation: {
156
+ containsAll: ["areas", "warps", "tilemap"]
157
+ }
158
+ },
159
+ // S7: Quiz
160
+ {
161
+ id: "rpg-quiz",
162
+ type: "quiz",
163
+ title: {
164
+ en: "RPG Quiz",
165
+ pl: "Quiz RPG",
166
+ de: "RPG-Quiz"
167
+ },
168
+ content: {
169
+ en: "In a turn-based RPG, what stat typically determines the order of actions?",
170
+ pl: "W turowym RPG, jaka statystyka typowo decyduje o kolejności akcji?",
171
+ de: "In einem rundenbasierten RPG, welcher Wert bestimmt typischerweise die Aktionsreihenfolge?"
172
+ },
173
+ quizOptions: [
174
+ { id: "a", text: { en: "Attack (ATK)", pl: "Atak (ATK)", de: "Angriff (ATK)" } },
175
+ { id: "b", text: { en: "Defense (DEF)", pl: "Obrona (DEF)", de: "Verteidigung (DEF)" } },
176
+ { id: "c", text: { en: "Speed (SPD)", pl: "Szybkość (SPD)", de: "Geschwindigkeit (SPD)" } },
177
+ { id: "d", text: { en: "Luck (LCK)", pl: "Szczęście (LCK)", de: "Glück (LCK)" } }
178
+ ],
179
+ quizCorrectId: "c"
180
+ },
181
+ // S8: Checkpoint
182
+ {
183
+ id: "rpg-complete",
184
+ type: "checkpoint",
185
+ title: {
186
+ en: "RPG Complete!",
187
+ pl: "RPG gotowe!",
188
+ de: "RPG fertig!"
189
+ },
190
+ content: {
191
+ en: "Amazing! You've built a full RPG with:\n• Character stats & leveling\n• Inventory with rarity system\n• NPCs with branching dialogue\n• Turn-based combat\n• Multi-area world map with warps\n\nChallenge: Add a party system with 4 heroes!",
192
+ pl: "Niesamowite! Zbudowałeś pełne RPG z:\n• Statystyki i poziomy postaci\n• Ekwipunek z systemem rzadkości\n• NPC z rozgałęzionymi dialogami\n• Walki turowe\n• Mapa świata z wieloma obszarami\n\nWyzwanie: Dodaj system drużyny z 4 bohaterami!",
193
+ de: "Fantastisch! Du hast ein vollständiges RPG gebaut mit:\n• Charakterwerte & Leveling\n• Inventar mit Seltenheitssystem\n• NPCs mit verzweigten Dialogen\n• Rundenbasierter Kampf\n• Weltkarte mit mehreren Bereichen\n\nHerausforderung: Füge ein Gruppensystem mit 4 Helden hinzu!"
194
+ }
195
+ }
196
+ ]
208
197
  };
209
- /* ══════════════════════════════════════════════════════════════
210
- T13 — Zrób Tower Defense
211
- ══════════════════════════════════════════════════════════════ */
212
198
  const TUTORIAL_TOWER_DEFENSE = {
213
- id: 'build-tower-defense',
214
- title: {
215
- en: 'Build a Tower Defense Game',
216
- pl: 'Zrób tower defense',
217
- de: 'Baue ein Tower-Defense-Spiel',
199
+ id: "build-tower-defense",
200
+ title: {
201
+ en: "Build a Tower Defense Game",
202
+ pl: "Zrób tower defense",
203
+ de: "Baue ein Tower-Defense-Spiel"
204
+ },
205
+ description: {
206
+ en: "Build a complete tower defense game with waves, tower types, targeting modes, upgrades, and enemy pathfinding.",
207
+ pl: "Zbuduj kompletną grę tower defense z falami, typami wież, trybami celowania, ulepszeniami i pathfindingiem wrogów.",
208
+ de: "Baue ein komplettes Tower-Defense-Spiel mit Wellen, Turmtypen, Zielmodi, Upgrades und Feind-Pathfinding."
209
+ },
210
+ category: "game-advanced",
211
+ difficulty: "intermediate",
212
+ estimatedMinutes: 35,
213
+ prerequisites: ["first-game-bouncing-ball", "tilemaps-and-worlds"],
214
+ kidFriendly: true,
215
+ ageRange: { min: 10, max: 99 },
216
+ tags: ["tower-defense", "strategy", "waves", "upgrades", "pathfinding"],
217
+ steps: [
218
+ // S1: Intro
219
+ {
220
+ id: "td-intro",
221
+ type: "text",
222
+ title: {
223
+ en: "Build Tower Defense!",
224
+ pl: "Zbuduj Tower Defense!",
225
+ de: "Baue Tower Defense!"
226
+ },
227
+ content: {
228
+ en: "In this tutorial you'll build a tower defense game!\n\n• Map with path for enemies\n• Tower types (arrow, cannon, ice, laser)\n• Enemy waves with scaling difficulty\n• Tower targeting modes\n• Upgrade system\n• Gold & economy\n\nDefend your base!",
229
+ pl: "W tym tutorialu zbudujesz grę tower defense!\n\n• Mapa ze ścieżką dla wrogów\n• Typy wież (strzały, armata, lód, laser)\n• Fale wrogów ze skalującą się trudnością\n• Tryby celowania wież\n• System ulepszeń\n• Złoto i ekonomia\n\nBroń swojej bazy!",
230
+ de: "In diesem Tutorial baust du ein Tower-Defense-Spiel!\n\n• Karte mit Feindpfad\n• Turmtypen (Pfeil, Kanone, Eis, Laser)\n• Feindwellen mit steigender Schwierigkeit\n• Turm-Zielmodi\n• Upgrade-System\n• Gold & Wirtschaft\n\nVerteidige deine Basis!"
231
+ },
232
+ skippable: true,
233
+ tooltipPosition: "center"
218
234
  },
219
- description: {
220
- en: 'Build a complete tower defense game with waves, tower types, targeting modes, upgrades, and enemy pathfinding.',
221
- pl: 'Zbuduj kompletną grę tower defense z falami, typami wież, trybami celowania, ulepszeniami i pathfindingiem wrogów.',
222
- de: 'Baue ein komplettes Tower-Defense-Spiel mit Wellen, Turmtypen, Zielmodi, Upgrades und Feind-Pathfinding.',
235
+ // S2: Tower Types
236
+ {
237
+ id: "td-towers",
238
+ type: "code",
239
+ title: {
240
+ en: "Define Tower Types",
241
+ pl: "Zdefiniuj typy wież",
242
+ de: "Turmtypen definieren"
243
+ },
244
+ content: {
245
+ en: "Define different tower types with damage, range, fire rate, and cost. Each tower targets enemies differently.",
246
+ pl: "Zdefiniuj różne typy wież z obrażeniami, zasięgiem, szybkostrzelnością i kosztem. Każda wieża celuje inaczej.",
247
+ de: "Definiere verschiedene Turmtypen mit Schaden, Reichweite, Feuerrate und Kosten. Jeder Turm zielt anders."
248
+ },
249
+ codeTemplate: "// Tower definitions\ntype TargetMode = 'first' | 'last' | 'closest' | 'strongest';\n",
250
+ codeSolution: "type TargetMode = 'first' | 'last' | 'closest' | 'strongest';\n\ninterface TowerDef {\n type: string;\n name: string;\n damage: number;\n range: number;\n fireRate: number; // shots per second\n cost: number;\n targetMode: TargetMode;\n projectileSpeed: number;\n splash?: number;\n slow?: number;\n}\n\nconst TOWERS: TowerDef[] = [\n { type: 'arrow', name: 'Arrow Tower', damage: 10, range: 150, fireRate: 2, cost: 50, targetMode: 'first', projectileSpeed: 400 },\n { type: 'cannon', name: 'Cannon Tower', damage: 40, range: 120, fireRate: 0.5, cost: 100, targetMode: 'closest', projectileSpeed: 200, splash: 50 },\n { type: 'ice', name: 'Ice Tower', damage: 5, range: 130, fireRate: 1.5, cost: 75, targetMode: 'first', projectileSpeed: 300, slow: 0.5 },\n { type: 'laser', name: 'Laser Tower', damage: 25, range: 200, fireRate: 3, cost: 150, targetMode: 'strongest', projectileSpeed: 9999 },\n];",
251
+ codeValidation: {
252
+ containsAll: ["TowerDef", "damage", "range", "fireRate", "TargetMode"]
253
+ },
254
+ hint: {
255
+ en: "Define cost, damage, range, fireRate per tower. Add splash/slow for special towers.",
256
+ pl: "Zdefiniuj koszt, obrażenia, zasięg, fireRate na wieżę. Dodaj splash/slow dla specjalnych.",
257
+ de: "Definiere cost, damage, range, fireRate pro Turm. Füge splash/slow für Spezialttürme hinzu."
258
+ }
223
259
  },
224
- category: 'game-advanced',
225
- difficulty: 'intermediate',
226
- estimatedMinutes: 35,
227
- prerequisites: ['first-game-bouncing-ball', 'tilemaps-and-worlds'],
228
- kidFriendly: true,
229
- ageRange: { min: 10, max: 99 },
230
- tags: ['tower-defense', 'strategy', 'waves', 'upgrades', 'pathfinding'],
231
- steps: [
232
- // S1: Intro
233
- {
234
- id: 'td-intro',
235
- type: 'text',
236
- title: {
237
- en: 'Build Tower Defense!',
238
- pl: 'Zbuduj Tower Defense!',
239
- de: 'Baue Tower Defense!',
240
- },
241
- content: {
242
- en: "In this tutorial you'll build a tower defense game!\n\n• Map with path for enemies\n• Tower types (arrow, cannon, ice, laser)\n• Enemy waves with scaling difficulty\n• Tower targeting modes\n• Upgrade system\n• Gold & economy\n\nDefend your base!",
243
- pl: 'W tym tutorialu zbudujesz grę tower defense!\n\n• Mapa ze ścieżką dla wrogów\n• Typy wież (strzały, armata, lód, laser)\n• Fale wrogów ze skalującą się trudnością\n• Tryby celowania wież\n• System ulepszeń\n• Złoto i ekonomia\n\nBroń swojej bazy!',
244
- de: 'In diesem Tutorial baust du ein Tower-Defense-Spiel!\n\n• Karte mit Feindpfad\n• Turmtypen (Pfeil, Kanone, Eis, Laser)\n• Feindwellen mit steigender Schwierigkeit\n• Turm-Zielmodi\n• Upgrade-System\n• Gold & Wirtschaft\n\nVerteidige deine Basis!',
245
- },
246
- skippable: true,
247
- tooltipPosition: 'center',
248
- },
249
- // S2: Tower Types
250
- {
251
- id: 'td-towers',
252
- type: 'code',
253
- title: {
254
- en: 'Define Tower Types',
255
- pl: 'Zdefiniuj typy wież',
256
- de: 'Turmtypen definieren',
257
- },
258
- content: {
259
- en: 'Define different tower types with damage, range, fire rate, and cost. Each tower targets enemies differently.',
260
- pl: 'Zdefiniuj różne typy wież z obrażeniami, zasięgiem, szybkostrzelnością i kosztem. Każda wieża celuje inaczej.',
261
- de: 'Definiere verschiedene Turmtypen mit Schaden, Reichweite, Feuerrate und Kosten. Jeder Turm zielt anders.',
262
- },
263
- codeTemplate: "// Tower definitions\ntype TargetMode = 'first' | 'last' | 'closest' | 'strongest';\n",
264
- codeSolution: "type TargetMode = 'first' | 'last' | 'closest' | 'strongest';\n\ninterface TowerDef {\n type: string;\n name: string;\n damage: number;\n range: number;\n fireRate: number; // shots per second\n cost: number;\n targetMode: TargetMode;\n projectileSpeed: number;\n splash?: number;\n slow?: number;\n}\n\nconst TOWERS: TowerDef[] = [\n { type: 'arrow', name: 'Arrow Tower', damage: 10, range: 150, fireRate: 2, cost: 50, targetMode: 'first', projectileSpeed: 400 },\n { type: 'cannon', name: 'Cannon Tower', damage: 40, range: 120, fireRate: 0.5, cost: 100, targetMode: 'closest', projectileSpeed: 200, splash: 50 },\n { type: 'ice', name: 'Ice Tower', damage: 5, range: 130, fireRate: 1.5, cost: 75, targetMode: 'first', projectileSpeed: 300, slow: 0.5 },\n { type: 'laser', name: 'Laser Tower', damage: 25, range: 200, fireRate: 3, cost: 150, targetMode: 'strongest', projectileSpeed: 9999 },\n];",
265
- codeValidation: {
266
- containsAll: ['TowerDef', 'damage', 'range', 'fireRate', 'TargetMode'],
267
- },
268
- hint: {
269
- en: 'Define cost, damage, range, fireRate per tower. Add splash/slow for special towers.',
270
- pl: 'Zdefiniuj koszt, obrażenia, zasięg, fireRate na wieżę. Dodaj splash/slow dla specjalnych.',
271
- de: 'Definiere cost, damage, range, fireRate pro Turm. Füge splash/slow für Spezialttürme hinzu.',
272
- },
273
- },
274
- // S3: Enemy Path
275
- {
276
- id: 'td-path',
277
- type: 'code',
278
- title: {
279
- en: 'Define the Enemy Path',
280
- pl: 'Zdefiniuj ścieżkę wrogów',
281
- de: 'Feindpfad definieren',
282
- },
283
- content: {
284
- en: 'Enemies follow a predefined path from start to end. Define waypoints that enemies walk between.',
285
- pl: 'Wrogowie podążają predefiniowaną ścieżką od startu do końca. Zdefiniuj waypoints, między którymi chodzą wrogowie.',
286
- de: 'Feinde folgen einem vordefinierten Pfad vom Start zum Ende. Definiere Wegpunkte, zwischen denen Feinde laufen.',
287
- },
288
- codeTemplate: '// Enemy path waypoints\nconst path = [\n',
289
- codeSolution: 'const path = [\n { x: 0, y: 200 }, // start (left edge)\n { x: 200, y: 200 }, // turn down\n { x: 200, y: 400 },\n { x: 400, y: 400 }, // turn up\n { x: 400, y: 100 },\n { x: 600, y: 100 }, // final stretch\n { x: 600, y: 300 },\n { x: 800, y: 300 }, // end (base)\n];\n\nfunction moveAlongPath(enemy: any, dt: number) {\n const target = path[enemy.waypointIndex];\n const dx = target.x - enemy.x;\n const dy = target.y - enemy.y;\n const dist = Math.sqrt(dx * dx + dy * dy);\n\n if (dist < 5) {\n enemy.waypointIndex++;\n if (enemy.waypointIndex >= path.length) {\n // Enemy reached the base!\n enemy.reachedEnd = true;\n }\n } else {\n enemy.x += (dx / dist) * enemy.speed * dt;\n enemy.y += (dy / dist) * enemy.speed * dt;\n }\n}',
290
- codeValidation: {
291
- containsAll: ['path', 'waypointIndex', 'moveAlongPath'],
292
- },
293
- hint: {
294
- en: 'Array of {x,y} waypoints. Move toward current waypoint, advance index when close.',
295
- pl: 'Tablica waypointów {x,y}. Ruszaj się w stronę bieżącego, przesuwaj indeks gdy blisko.',
296
- de: 'Array von {x,y}-Wegpunkten. Bewege zum aktuellen, erhöhe Index wenn nah.',
297
- },
298
- },
299
- // S4: Wave System
300
- {
301
- id: 'td-waves',
302
- type: 'code',
303
- title: {
304
- en: 'Enemy Wave System',
305
- pl: 'System fal wrogów',
306
- de: 'Feindwellen-System',
307
- },
308
- content: {
309
- en: 'Use the `WaveGenerator` to create escalating enemy waves. Each wave has more enemies and tougher types.',
310
- pl: 'Użyj `WaveGenerator` do tworzenia eskalujących fal wrogów. Każda fala ma więcej wrogów i trudniejsze typy.',
311
- de: 'Verwende den `WaveGenerator` für eskalierende Feindwellen. Jede Welle hat mehr Feinde und härtere Typen.',
312
- },
313
- codeTemplate: '// Set up enemy waves\nconst waves = ',
314
- codeSolution: "const waves = new WaveGenerator({\n baseEnemyCount: 5,\n countGrowth: 1.4,\n typeProbabilities: [\n { type: 'goblin', weight: 5, minWave: 1 },\n { type: 'orc', weight: 3, minWave: 3 },\n { type: 'troll', weight: 1, minWave: 5 },\n { type: 'dragon', weight: 0.3, minWave: 8 },\n ],\n groupSize: [1, 4],\n groupDelay: [0.5, 1.5],\n});\n\n// Start wave 1\nlet currentWave = 1;\nconst waveData = waves.generateWave(currentWave);\n// waveData contains groups with enemy types, counts, and delays",
315
- codeValidation: {
316
- containsAll: ['WaveGenerator', 'generateWave', 'typeProbabilities'],
317
- },
318
- hint: {
319
- en: 'new WaveGenerator(config) → generateWave(waveNumber)',
320
- pl: 'new WaveGenerator(config) → generateWave(numerFali)',
321
- de: 'new WaveGenerator(config) → generateWave(wellenNummer)',
322
- },
323
- },
324
- // S5: Targeting & Shooting
325
- {
326
- id: 'td-targeting',
327
- type: 'code',
328
- title: {
329
- en: 'Tower Targeting & Shooting',
330
- pl: 'Celowanie i strzelanie wież',
331
- de: 'Turm-Zielen & Schießen',
332
- },
333
- content: {
334
- en: 'Each tower selects a target based on its targeting mode, then fires projectiles at the fire rate interval.',
335
- pl: 'Każda wieża wybiera cel na podstawie trybu celowania, potem strzela pociskami w odstępach fire rate.',
336
- de: 'Jeder Turm wählt ein Ziel basierend auf dem Zielmodus und feuert Projektile im Feuerraten-Intervall.',
337
- },
338
- codeTemplate: '// Tower targeting system\nfunction findTarget(tower: any, enemies: any[], mode: TargetMode) {\n',
339
- codeSolution: "function findTarget(tower: any, enemies: any[], mode: TargetMode) {\n const inRange = enemies.filter(e => {\n const dx = e.x - tower.x;\n const dy = e.y - tower.y;\n return Math.sqrt(dx * dx + dy * dy) <= tower.range;\n });\n\n if (inRange.length === 0) return null;\n\n switch (mode) {\n case 'first': return inRange.reduce((a, b) => a.waypointIndex > b.waypointIndex ? a : b);\n case 'last': return inRange.reduce((a, b) => a.waypointIndex < b.waypointIndex ? a : b);\n case 'closest': {\n let best = inRange[0], bestDist = Infinity;\n for (const e of inRange) {\n const d = Math.sqrt((e.x - tower.x) ** 2 + (e.y - tower.y) ** 2);\n if (d < bestDist) { best = e; bestDist = d; }\n }\n return best;\n }\n case 'strongest': return inRange.reduce((a, b) => a.hp > b.hp ? a : b);\n }\n}",
340
- codeValidation: {
341
- containsAll: ['findTarget', 'inRange', 'TargetMode'],
342
- },
343
- hint: {
344
- en: 'Filter enemies in range, then pick based on targeting mode.',
345
- pl: 'Filtruj wrogów w zasięgu, potem wybierz na podstawie trybu celowania.',
346
- de: 'Filtere Feinde in Reichweite, dann wähle basierend auf Zielmodus.',
347
- },
348
- },
349
- // S6: Upgrades & Economy
350
- {
351
- id: 'td-upgrades',
352
- type: 'code',
353
- title: {
354
- en: 'Upgrades & Gold Economy',
355
- pl: 'Ulepszenia i ekonomia złota',
356
- de: 'Upgrades & Gold-Wirtschaft',
357
- },
358
- content: {
359
- en: 'Towers can be upgraded to increase damage and range. Earn gold from killing enemies. Sell towers for a refund.',
360
- pl: 'Wieże mogą być ulepszane, zwiększając obrażenia i zasięg. Zarabiaj złoto z zabijania wrogów. Sprzedawaj wieże z częściowym zwrotem.',
361
- de: 'Türme können aufgewertet werden für mehr Schaden und Reichweite. Verdiene Gold durch Feind-Kills. Verkaufe Türme für Rückerstattung.',
362
- },
363
- codeTemplate: '// Upgrade system\nlet gold = 200;\n',
364
- codeSolution: 'let gold = 200;\n\nfunction upgradeTower(tower: any): boolean {\n const upgradeCost = Math.floor(tower.cost * 0.75 * tower.level);\n if (gold < upgradeCost) return false;\n\n gold -= upgradeCost;\n tower.level++;\n tower.damage = Math.floor(tower.damage * 1.3);\n tower.range += 10;\n tower.fireRate *= 1.1;\n return true;\n}\n\nfunction sellTower(tower: any): number {\n const refund = Math.floor(tower.cost * 0.6);\n gold += refund;\n return refund;\n}\n\nfunction onEnemyKilled(enemy: any) {\n gold += enemy.goldReward;\n}',
365
- codeValidation: {
366
- containsAll: ['upgradeTower', 'sellTower', 'gold'],
367
- },
368
- hint: {
369
- en: 'Upgrade cost scales with level. Sell returns ~60% of original cost.',
370
- pl: 'Koszt ulepszenia skaluje się z poziomem. Sprzedaż zwraca ~60% oryginalnego kosztu.',
371
- de: 'Upgrade-Kosten skalieren mit Level. Verkauf erstattet ~60% des Originalpreises.',
372
- },
373
- },
374
- // S7: Checkpoint
375
- {
376
- id: 'td-complete',
377
- type: 'checkpoint',
378
- title: {
379
- en: 'Tower Defense Complete!',
380
- pl: 'Tower Defense gotowy!',
381
- de: 'Tower Defense fertig!',
382
- },
383
- content: {
384
- en: "You've built a full tower defense game!\n• 4 tower types with different targeting\n• Enemy pathfinding along waypoints\n• Escalating wave system\n• Upgrade & sell mechanics\n• Gold economy\n\nChallenge: Add flying enemies that ignore the path!",
385
- pl: 'Zbudowałeś kompletną grę tower defense!\n• 4 typy wież z różnym celowaniem\n• Pathfinding wrogów po waypointach\n• Eskalujący system fal\n• Mechaniki ulepszania i sprzedaży\n• Ekonomia złota\n\nWyzwanie: Dodaj latających wrogów ignorujących ścieżkę!',
386
- de: 'Du hast ein komplettes Tower-Defense-Spiel gebaut!\n• 4 Turmtypen mit verschiedenem Zielen\n• Feind-Pathfinding entlang Wegpunkten\n• Eskalierendes Wellensystem\n• Upgrade- & Verkaufsmechaniken\n• Gold-Wirtschaft\n\nHerausforderung: Füge fliegende Feinde hinzu, die den Pfad ignorieren!',
387
- },
388
- },
389
- ],
260
+ // S3: Enemy Path
261
+ {
262
+ id: "td-path",
263
+ type: "code",
264
+ title: {
265
+ en: "Define the Enemy Path",
266
+ pl: "Zdefiniuj ścieżkę wrogów",
267
+ de: "Feindpfad definieren"
268
+ },
269
+ content: {
270
+ en: "Enemies follow a predefined path from start to end. Define waypoints that enemies walk between.",
271
+ pl: "Wrogowie podążają predefiniowaną ścieżką od startu do końca. Zdefiniuj waypoints, między którymi chodzą wrogowie.",
272
+ de: "Feinde folgen einem vordefinierten Pfad vom Start zum Ende. Definiere Wegpunkte, zwischen denen Feinde laufen."
273
+ },
274
+ codeTemplate: "// Enemy path waypoints\nconst path = [\n",
275
+ codeSolution: "const path = [\n { x: 0, y: 200 }, // start (left edge)\n { x: 200, y: 200 }, // turn down\n { x: 200, y: 400 },\n { x: 400, y: 400 }, // turn up\n { x: 400, y: 100 },\n { x: 600, y: 100 }, // final stretch\n { x: 600, y: 300 },\n { x: 800, y: 300 }, // end (base)\n];\n\nfunction moveAlongPath(enemy: any, dt: number) {\n const target = path[enemy.waypointIndex];\n const dx = target.x - enemy.x;\n const dy = target.y - enemy.y;\n const dist = Math.sqrt(dx * dx + dy * dy);\n\n if (dist < 5) {\n enemy.waypointIndex++;\n if (enemy.waypointIndex >= path.length) {\n // Enemy reached the base!\n enemy.reachedEnd = true;\n }\n } else {\n enemy.x += (dx / dist) * enemy.speed * dt;\n enemy.y += (dy / dist) * enemy.speed * dt;\n }\n}",
276
+ codeValidation: {
277
+ containsAll: ["path", "waypointIndex", "moveAlongPath"]
278
+ },
279
+ hint: {
280
+ en: "Array of {x,y} waypoints. Move toward current waypoint, advance index when close.",
281
+ pl: "Tablica waypointów {x,y}. Ruszaj się w stronę bieżącego, przesuwaj indeks gdy blisko.",
282
+ de: "Array von {x,y}-Wegpunkten. Bewege zum aktuellen, erhöhe Index wenn nah."
283
+ }
284
+ },
285
+ // S4: Wave System
286
+ {
287
+ id: "td-waves",
288
+ type: "code",
289
+ title: {
290
+ en: "Enemy Wave System",
291
+ pl: "System fal wrogów",
292
+ de: "Feindwellen-System"
293
+ },
294
+ content: {
295
+ en: "Use the `WaveGenerator` to create escalating enemy waves. Each wave has more enemies and tougher types.",
296
+ pl: "Użyj `WaveGenerator` do tworzenia eskalujących fal wrogów. Każda fala ma więcej wrogów i trudniejsze typy.",
297
+ de: "Verwende den `WaveGenerator` für eskalierende Feindwellen. Jede Welle hat mehr Feinde und härtere Typen."
298
+ },
299
+ codeTemplate: "// Set up enemy waves\nconst waves = ",
300
+ codeSolution: "const waves = new WaveGenerator({\n baseEnemyCount: 5,\n countGrowth: 1.4,\n typeProbabilities: [\n { type: 'goblin', weight: 5, minWave: 1 },\n { type: 'orc', weight: 3, minWave: 3 },\n { type: 'troll', weight: 1, minWave: 5 },\n { type: 'dragon', weight: 0.3, minWave: 8 },\n ],\n groupSize: [1, 4],\n groupDelay: [0.5, 1.5],\n});\n\n// Start wave 1\nlet currentWave = 1;\nconst waveData = waves.generateWave(currentWave);\n// waveData contains groups with enemy types, counts, and delays",
301
+ codeValidation: {
302
+ containsAll: ["WaveGenerator", "generateWave", "typeProbabilities"]
303
+ },
304
+ hint: {
305
+ en: "new WaveGenerator(config) → generateWave(waveNumber)",
306
+ pl: "new WaveGenerator(config) → generateWave(numerFali)",
307
+ de: "new WaveGenerator(config) → generateWave(wellenNummer)"
308
+ }
309
+ },
310
+ // S5: Targeting & Shooting
311
+ {
312
+ id: "td-targeting",
313
+ type: "code",
314
+ title: {
315
+ en: "Tower Targeting & Shooting",
316
+ pl: "Celowanie i strzelanie wież",
317
+ de: "Turm-Zielen & Schießen"
318
+ },
319
+ content: {
320
+ en: "Each tower selects a target based on its targeting mode, then fires projectiles at the fire rate interval.",
321
+ pl: "Każda wieża wybiera cel na podstawie trybu celowania, potem strzela pociskami w odstępach fire rate.",
322
+ de: "Jeder Turm wählt ein Ziel basierend auf dem Zielmodus und feuert Projektile im Feuerraten-Intervall."
323
+ },
324
+ codeTemplate: "// Tower targeting system\nfunction findTarget(tower: any, enemies: any[], mode: TargetMode) {\n",
325
+ codeSolution: "function findTarget(tower: any, enemies: any[], mode: TargetMode) {\n const inRange = enemies.filter(e => {\n const dx = e.x - tower.x;\n const dy = e.y - tower.y;\n return Math.sqrt(dx * dx + dy * dy) <= tower.range;\n });\n\n if (inRange.length === 0) return null;\n\n switch (mode) {\n case 'first': return inRange.reduce((a, b) => a.waypointIndex > b.waypointIndex ? a : b);\n case 'last': return inRange.reduce((a, b) => a.waypointIndex < b.waypointIndex ? a : b);\n case 'closest': {\n let best = inRange[0], bestDist = Infinity;\n for (const e of inRange) {\n const d = Math.sqrt((e.x - tower.x) ** 2 + (e.y - tower.y) ** 2);\n if (d < bestDist) { best = e; bestDist = d; }\n }\n return best;\n }\n case 'strongest': return inRange.reduce((a, b) => a.hp > b.hp ? a : b);\n }\n}",
326
+ codeValidation: {
327
+ containsAll: ["findTarget", "inRange", "TargetMode"]
328
+ },
329
+ hint: {
330
+ en: "Filter enemies in range, then pick based on targeting mode.",
331
+ pl: "Filtruj wrogów w zasięgu, potem wybierz na podstawie trybu celowania.",
332
+ de: "Filtere Feinde in Reichweite, dann wähle basierend auf Zielmodus."
333
+ }
334
+ },
335
+ // S6: Upgrades & Economy
336
+ {
337
+ id: "td-upgrades",
338
+ type: "code",
339
+ title: {
340
+ en: "Upgrades & Gold Economy",
341
+ pl: "Ulepszenia i ekonomia złota",
342
+ de: "Upgrades & Gold-Wirtschaft"
343
+ },
344
+ content: {
345
+ en: "Towers can be upgraded to increase damage and range. Earn gold from killing enemies. Sell towers for a refund.",
346
+ pl: "Wieże mogą być ulepszane, zwiększając obrażenia i zasięg. Zarabiaj złoto z zabijania wrogów. Sprzedawaj wieże z częściowym zwrotem.",
347
+ de: "Türme können aufgewertet werden für mehr Schaden und Reichweite. Verdiene Gold durch Feind-Kills. Verkaufe Türme für Rückerstattung."
348
+ },
349
+ codeTemplate: "// Upgrade system\nlet gold = 200;\n",
350
+ codeSolution: "let gold = 200;\n\nfunction upgradeTower(tower: any): boolean {\n const upgradeCost = Math.floor(tower.cost * 0.75 * tower.level);\n if (gold < upgradeCost) return false;\n\n gold -= upgradeCost;\n tower.level++;\n tower.damage = Math.floor(tower.damage * 1.3);\n tower.range += 10;\n tower.fireRate *= 1.1;\n return true;\n}\n\nfunction sellTower(tower: any): number {\n const refund = Math.floor(tower.cost * 0.6);\n gold += refund;\n return refund;\n}\n\nfunction onEnemyKilled(enemy: any) {\n gold += enemy.goldReward;\n}",
351
+ codeValidation: {
352
+ containsAll: ["upgradeTower", "sellTower", "gold"]
353
+ },
354
+ hint: {
355
+ en: "Upgrade cost scales with level. Sell returns ~60% of original cost.",
356
+ pl: "Koszt ulepszenia skaluje się z poziomem. Sprzedaż zwraca ~60% oryginalnego kosztu.",
357
+ de: "Upgrade-Kosten skalieren mit Level. Verkauf erstattet ~60% des Originalpreises."
358
+ }
359
+ },
360
+ // S7: Checkpoint
361
+ {
362
+ id: "td-complete",
363
+ type: "checkpoint",
364
+ title: {
365
+ en: "Tower Defense Complete!",
366
+ pl: "Tower Defense gotowy!",
367
+ de: "Tower Defense fertig!"
368
+ },
369
+ content: {
370
+ en: "You've built a full tower defense game!\n• 4 tower types with different targeting\n• Enemy pathfinding along waypoints\n• Escalating wave system\n• Upgrade & sell mechanics\n• Gold economy\n\nChallenge: Add flying enemies that ignore the path!",
371
+ pl: "Zbudowałeś kompletną grę tower defense!\n• 4 typy wież z różnym celowaniem\n• Pathfinding wrogów po waypointach\n• Eskalujący system fal\n• Mechaniki ulepszania i sprzedaży\n• Ekonomia złota\n\nWyzwanie: Dodaj latających wrogów ignorujących ścieżkę!",
372
+ de: "Du hast ein komplettes Tower-Defense-Spiel gebaut!\n• 4 Turmtypen mit verschiedenem Zielen\n• Feind-Pathfinding entlang Wegpunkten\n• Eskalierendes Wellensystem\n• Upgrade- & Verkaufsmechaniken\n• Gold-Wirtschaft\n\nHerausforderung: Füge fliegende Feinde hinzu, die den Pfad ignorieren!"
373
+ }
374
+ }
375
+ ]
390
376
  };
391
- /* ══════════════════════════════════════════════════════════════
392
- T14 — Zrób grę 3D
393
- ══════════════════════════════════════════════════════════════ */
394
377
  const TUTORIAL_3D_GAME = {
395
- id: 'build-a-3d-game',
396
- title: {
397
- en: 'Build a 3D Game',
398
- pl: 'Zrób grę 3D',
399
- de: 'Baue ein 3D-Spiel',
378
+ id: "build-a-3d-game",
379
+ title: {
380
+ en: "Build a 3D Game",
381
+ pl: "Zrób grę 3D",
382
+ de: "Baue ein 3D-Spiel"
383
+ },
384
+ description: {
385
+ en: "Create your first 3D game: set up a 3D world, add meshes, lights, cameras, physics, and a character controller.",
386
+ pl: "Stwórz swoją pierwszą grę 3D: skonfiguruj świat 3D, dodaj meshe, światła, kamery, fizykę i kontroler postaci.",
387
+ de: "Erstelle dein erstes 3D-Spiel: richte eine 3D-Welt ein, füge Meshes, Lichter, Kameras, Physik und einen Character-Controller hinzu."
388
+ },
389
+ category: "game-advanced",
390
+ difficulty: "intermediate",
391
+ estimatedMinutes: 35,
392
+ prerequisites: ["first-game-bouncing-ball"],
393
+ kidFriendly: false,
394
+ ageRange: { min: 14, max: 99 },
395
+ tags: ["3d", "world3d", "mesh", "camera", "physics3d", "character-controller"],
396
+ steps: [
397
+ // S1: Intro
398
+ {
399
+ id: "3d-intro",
400
+ type: "text",
401
+ title: {
402
+ en: "Welcome to 3D!",
403
+ pl: "Witaj w 3D!",
404
+ de: "Willkommen in 3D!"
405
+ },
406
+ content: {
407
+ en: "In this tutorial you'll enter the third dimension!\n\n• Set up a 3D world (World3D)\n• Add meshes (cube, sphere, plane)\n• Lighting (directional, point, spot)\n• Camera controllers (FPS, orbit)\n• 3D physics (rigid bodies, colliders)\n• Character controller (walking, jumping)\n\nLet's go 3D!",
408
+ pl: "W tym tutorialu wejdziesz w trzeci wymiar!\n\n• Skonfiguruj świat 3D (World3D)\n• Dodaj meshe (sześcian, sfera, płaszczyzna)\n• Oświetlenie (kierunkowe, punktowe, spot)\n• Kontrolery kamery (FPS, orbita)\n• Fizyka 3D (rigid body, kolidery)\n• Kontroler postaci (chodzenie, skakanie)\n\nWejdźmy w 3D!",
409
+ de: "In diesem Tutorial betrittst du die dritte Dimension!\n\n• 3D-Welt einrichten (World3D)\n• Meshes hinzufügen (Würfel, Kugel, Ebene)\n• Beleuchtung (Richtung, Punkt, Spot)\n• Kamera-Controller (FPS, Orbit)\n• 3D-Physik (Starrkörper, Kollider)\n• Character-Controller (Laufen, Springen)\n\nAb in die 3. Dimension!"
410
+ },
411
+ skippable: true,
412
+ tooltipPosition: "center"
400
413
  },
401
- description: {
402
- en: 'Create your first 3D game: set up a 3D world, add meshes, lights, cameras, physics, and a character controller.',
403
- pl: 'Stwórz swoją pierwszą grę 3D: skonfiguruj świat 3D, dodaj meshe, światła, kamery, fizykę i kontroler postaci.',
404
- de: 'Erstelle dein erstes 3D-Spiel: richte eine 3D-Welt ein, füge Meshes, Lichter, Kameras, Physik und einen Character-Controller hinzu.',
414
+ // S2: World3D Setup
415
+ {
416
+ id: "3d-world-setup",
417
+ type: "code",
418
+ title: {
419
+ en: "Create a 3D World",
420
+ pl: "Utwórz świat 3D",
421
+ de: "3D-Welt erstellen"
422
+ },
423
+ content: {
424
+ en: "Use `World3D` to create the 3D scene. It manages transforms, meshes, lights, and cameras.",
425
+ pl: "Użyj `World3D` do stworzenia sceny 3D. Zarządza transformacjami, meshami, światłami i kamerami.",
426
+ de: "Verwende `World3D` zum Erstellen der 3D-Szene. Es verwaltet Transforms, Meshes, Lichter und Kameras."
427
+ },
428
+ codeTemplate: "// Create the 3D world\nconst world3d = ",
429
+ codeSolution: "const world3d = new World3D();\n\n// Add a ground plane\nconst ground = world3d.addEntity();\nworld3d.setTransform(ground, { position: { x: 0, y: 0, z: 0 }, scale: { x: 50, y: 1, z: 50 } });\nworld3d.setMesh(ground, { type: 'plane', color: { r: 0.3, g: 0.7, b: 0.3, a: 1 } });\n\n// Add ambient light\nworld3d.setAmbientLight({ r: 0.2, g: 0.2, b: 0.2, a: 1 });",
430
+ codeValidation: {
431
+ containsAll: ["World3D", "addEntity", "setTransform"]
432
+ },
433
+ hint: {
434
+ en: "new World3D() → addEntity() → setTransform() → setMesh()",
435
+ pl: "new World3D() → addEntity() → setTransform() → setMesh()",
436
+ de: "new World3D() → addEntity() → setTransform() → setMesh()"
437
+ }
405
438
  },
406
- category: 'game-advanced',
407
- difficulty: 'intermediate',
408
- estimatedMinutes: 35,
409
- prerequisites: ['first-game-bouncing-ball'],
410
- kidFriendly: false,
411
- ageRange: { min: 14, max: 99 },
412
- tags: ['3d', 'world3d', 'mesh', 'camera', 'physics3d', 'character-controller'],
413
- steps: [
414
- // S1: Intro
415
- {
416
- id: '3d-intro',
417
- type: 'text',
418
- title: {
419
- en: 'Welcome to 3D!',
420
- pl: 'Witaj w 3D!',
421
- de: 'Willkommen in 3D!',
422
- },
423
- content: {
424
- en: "In this tutorial you'll enter the third dimension!\n\n• Set up a 3D world (World3D)\n• Add meshes (cube, sphere, plane)\n• Lighting (directional, point, spot)\n• Camera controllers (FPS, orbit)\n• 3D physics (rigid bodies, colliders)\n• Character controller (walking, jumping)\n\nLet's go 3D!",
425
- pl: 'W tym tutorialu wejdziesz w trzeci wymiar!\n\n• Skonfiguruj świat 3D (World3D)\n• Dodaj meshe (sześcian, sfera, płaszczyzna)\n• Oświetlenie (kierunkowe, punktowe, spot)\n• Kontrolery kamery (FPS, orbita)\n• Fizyka 3D (rigid body, kolidery)\n• Kontroler postaci (chodzenie, skakanie)\n\nWejdźmy w 3D!',
426
- de: 'In diesem Tutorial betrittst du die dritte Dimension!\n\n• 3D-Welt einrichten (World3D)\n• Meshes hinzufügen (Würfel, Kugel, Ebene)\n• Beleuchtung (Richtung, Punkt, Spot)\n• Kamera-Controller (FPS, Orbit)\n• 3D-Physik (Starrkörper, Kollider)\n• Character-Controller (Laufen, Springen)\n\nAb in die 3. Dimension!',
427
- },
428
- skippable: true,
429
- tooltipPosition: 'center',
430
- },
431
- // S2: World3D Setup
432
- {
433
- id: '3d-world-setup',
434
- type: 'code',
435
- title: {
436
- en: 'Create a 3D World',
437
- pl: 'Utwórz świat 3D',
438
- de: '3D-Welt erstellen',
439
- },
440
- content: {
441
- en: 'Use `World3D` to create the 3D scene. It manages transforms, meshes, lights, and cameras.',
442
- pl: 'Użyj `World3D` do stworzenia sceny 3D. Zarządza transformacjami, meshami, światłami i kamerami.',
443
- de: 'Verwende `World3D` zum Erstellen der 3D-Szene. Es verwaltet Transforms, Meshes, Lichter und Kameras.',
444
- },
445
- codeTemplate: '// Create the 3D world\nconst world3d = ',
446
- codeSolution: "const world3d = new World3D();\n\n// Add a ground plane\nconst ground = world3d.addEntity();\nworld3d.setTransform(ground, { position: { x: 0, y: 0, z: 0 }, scale: { x: 50, y: 1, z: 50 } });\nworld3d.setMesh(ground, { type: 'plane', color: { r: 0.3, g: 0.7, b: 0.3, a: 1 } });\n\n// Add ambient light\nworld3d.setAmbientLight({ r: 0.2, g: 0.2, b: 0.2, a: 1 });",
447
- codeValidation: {
448
- containsAll: ['World3D', 'addEntity', 'setTransform'],
449
- },
450
- hint: {
451
- en: 'new World3D() → addEntity() → setTransform() → setMesh()',
452
- pl: 'new World3D() → addEntity() → setTransform() → setMesh()',
453
- de: 'new World3D() → addEntity() → setTransform() → setMesh()',
454
- },
455
- },
456
- // S3: Meshes
457
- {
458
- id: '3d-meshes',
459
- type: 'code',
460
- title: {
461
- en: 'Add 3D Meshes',
462
- pl: 'Dodaj meshe 3D',
463
- de: '3D-Meshes hinzufügen',
464
- },
465
- content: {
466
- en: 'Add primitive meshes to the scene: cubes, spheres, cylinders. Each mesh has position, rotation, and scale.',
467
- pl: 'Dodaj prymitywne meshe do sceny: sześciany, sfery, cylindry. Każdy mesh ma pozycję, rotację i skalę.',
468
- de: 'Füge primitive Meshes zur Szene hinzu: Würfel, Kugeln, Zylinder. Jedes Mesh hat Position, Rotation und Skalierung.',
469
- },
470
- codeTemplate: '// Add scene objects\nconst cube = world3d.addEntity();\n',
471
- codeSolution: "const cube = world3d.addEntity();\nworld3d.setTransform(cube, { position: { x: 0, y: 2, z: 0 } });\nworld3d.setMesh(cube, { type: 'cube', color: { r: 0.8, g: 0.2, b: 0.2, a: 1 } });\n\nconst sphere = world3d.addEntity();\nworld3d.setTransform(sphere, { position: { x: 3, y: 1.5, z: 0 } });\nworld3d.setMesh(sphere, { type: 'sphere', color: { r: 0.2, g: 0.5, b: 1, a: 1 } });\n\nconst cylinder = world3d.addEntity();\nworld3d.setTransform(cylinder, { position: { x: -3, y: 1, z: 2 } });\nworld3d.setMesh(cylinder, { type: 'cylinder', color: { r: 0.9, g: 0.8, b: 0.1, a: 1 } });",
472
- codeValidation: {
473
- containsAll: ['cube', 'sphere', 'setMesh'],
474
- },
475
- hint: {
476
- en: "Set mesh type to 'cube', 'sphere', 'cylinder', or 'plane'",
477
- pl: "Ustaw typ mesha na 'cube', 'sphere', 'cylinder' lub 'plane'",
478
- de: "Setze Mesh-Typ auf 'cube', 'sphere', 'cylinder' oder 'plane'",
479
- },
480
- },
481
- // S4: Lighting
482
- {
483
- id: '3d-lighting',
484
- type: 'code',
485
- title: {
486
- en: 'Add Lights to Your Scene',
487
- pl: 'Dodaj oświetlenie do sceny',
488
- de: 'Lichter zur Szene hinzufügen',
489
- },
490
- content: {
491
- en: 'Add directional, point, and spot lights to illuminate the scene. Lights have color, intensity, and range.',
492
- pl: 'Dodaj światła kierunkowe, punktowe i spot do oświetlenia sceny. Światła mają kolor, intensywność i zasięg.',
493
- de: 'Füge Richtungs-, Punkt- und Spotlichter hinzu. Lichter haben Farbe, Intensität und Reichweite.',
494
- },
495
- codeTemplate: '// Add lights\nconst sunLight = world3d.addEntity();\n',
496
- codeSolution: "const sunLight = world3d.addEntity();\nworld3d.setTransform(sunLight, { rotation: { x: -0.5, y: 0.3, z: 0, w: 1 } });\nworld3d.setLight(sunLight, {\n type: 'directional',\n color: { r: 1, g: 0.95, b: 0.8, a: 1 },\n intensity: 1.2,\n});\n\nconst torch = world3d.addEntity();\nworld3d.setTransform(torch, { position: { x: 5, y: 3, z: 0 } });\nworld3d.setLight(torch, {\n type: 'point',\n color: { r: 1, g: 0.6, b: 0.2, a: 1 },\n intensity: 2,\n range: 15,\n});",
497
- codeValidation: {
498
- containsAll: ['setLight', 'directional', 'intensity'],
499
- },
500
- hint: {
501
- en: "Light types: 'directional', 'point', 'spot', 'hemisphere'",
502
- pl: "Typy świateł: 'directional', 'point', 'spot', 'hemisphere'",
503
- de: "Lichttypen: 'directional', 'point', 'spot', 'hemisphere'",
504
- },
505
- },
506
- // S5: Camera Controller
507
- {
508
- id: '3d-camera',
509
- type: 'code',
510
- title: {
511
- en: 'Camera Controllers',
512
- pl: 'Kontrolery kamery',
513
- de: 'Kamera-Controller',
514
- },
515
- content: {
516
- en: 'Set up a camera with an orbit controller. The player can rotate around and zoom into the scene.',
517
- pl: 'Skonfiguruj kamerę z kontrolerem orbity. Gracz może obracać się wokół i przybliżać scenę.',
518
- de: 'Richte eine Kamera mit Orbit-Controller ein. Der Spieler kann sich drehen und in die Szene zoomen.',
519
- },
520
- codeTemplate: '// Set up orbit camera\nconst camEntity = world3d.addEntity();\n',
521
- codeSolution: "const camEntity = world3d.addEntity();\nworld3d.setTransform(camEntity, { position: { x: 0, y: 5, z: 10 } });\nworld3d.setCamera(camEntity, {\n fov: 60,\n near: 0.1,\n far: 1000,\n controller: 'orbit', // 'fps', 'third-person', 'orbit', 'fly'\n active: true,\n});\n\n// The orbit controller auto-rotates around target\n// with mouse drag and scroll zoom",
522
- codeValidation: {
523
- containsAll: ['setCamera', 'fov', 'controller'],
524
- },
525
- hint: {
526
- en: "Camera controllers: 'fps', 'third-person', 'orbit', 'fly'",
527
- pl: "Kontrolery kamery: 'fps', 'third-person', 'orbit', 'fly'",
528
- de: "Kamera-Controller: 'fps', 'third-person', 'orbit', 'fly'",
529
- },
530
- },
531
- // S6: 3D Physics
532
- {
533
- id: '3d-physics',
534
- type: 'code',
535
- title: {
536
- en: '3D Physics & Collisions',
537
- pl: 'Fizyka i kolizje 3D',
538
- de: '3D-Physik & Kollisionen',
539
- },
540
- content: {
541
- en: 'Add rigid bodies and colliders for 3D physics. Objects fall with gravity and bounce off each other.',
542
- pl: 'Dodaj ciała sztywne i kolidery dla fizyki 3D. Obiekty spadają z grawitacją i odbijają się od siebie.',
543
- de: 'Füge Starrkörper und Kollider für 3D-Physik hinzu. Objekte fallen mit Schwerkraft und prallen voneinander ab.',
544
- },
545
- codeTemplate: '// Add physics to cube\n',
546
- codeSolution: "// Make cube a dynamic physics body\nworld3d.setRigidBody(cube, {\n bodyType: 'dynamic',\n mass: 1,\n restitution: 0.5, // bounce\n friction: 0.3,\n});\nworld3d.setCollider(cube, {\n shape: 'box',\n size: { x: 1, y: 1, z: 1 },\n});\n\n// Make ground static\nworld3d.setRigidBody(ground, { bodyType: 'static' });\nworld3d.setCollider(ground, {\n shape: 'box',\n size: { x: 50, y: 0.5, z: 50 },\n});\n\n// Apply an impulse to launch the cube!\nworld3d.applyImpulse(cube, { x: 0, y: 10, z: 5 });",
547
- codeValidation: {
548
- containsAll: ['setRigidBody', 'setCollider', 'dynamic'],
549
- },
550
- hint: {
551
- en: "bodyType: 'dynamic' (movable), 'static' (fixed), 'kinematic' (scripted)",
552
- pl: "bodyType: 'dynamic' (ruchomy), 'static' (stały), 'kinematic' (skryptowy)",
553
- de: "bodyType: 'dynamic' (beweglich), 'static' (fest), 'kinematic' (geskriptet)",
554
- },
555
- },
556
- // S7: Character Controller
557
- {
558
- id: '3d-character',
559
- type: 'code',
560
- title: {
561
- en: '3D Character Controller',
562
- pl: 'Kontroler postaci 3D',
563
- de: '3D-Character-Controller',
564
- },
565
- content: {
566
- en: 'Use the `CharacterController3D` for a player that walks, jumps, and interacts with the physics world.',
567
- pl: 'Użyj `CharacterController3D` dla gracza, który chodzi, skacze i wchodzi w interakcję ze światem fizyki.',
568
- de: 'Verwende den `CharacterController3D` für einen Spieler, der läuft, springt und mit der Physikwelt interagiert.',
569
- },
570
- codeTemplate: '// 3D character controller\nconst charCtrl = ',
571
- codeSolution: "const charCtrl = {\n moveSpeed: 5,\n jumpForce: 8,\n gravity: -20,\n isGrounded: false,\n velocityY: 0,\n position: { x: 0, y: 1, z: 0 },\n};\n\nfunction updateCharacter(input: any, dt: number) {\n // Movement on XZ plane\n let moveX = 0, moveZ = 0;\n if (input.getAction('moveForward')) moveZ -= 1;\n if (input.getAction('moveBack')) moveZ += 1;\n if (input.getAction('moveLeft')) moveX -= 1;\n if (input.getAction('moveRight')) moveX += 1;\n\n charCtrl.position.x += moveX * charCtrl.moveSpeed * dt;\n charCtrl.position.z += moveZ * charCtrl.moveSpeed * dt;\n\n // Gravity + jump\n if (input.getAction('jump') && charCtrl.isGrounded) {\n charCtrl.velocityY = charCtrl.jumpForce;\n }\n charCtrl.velocityY += charCtrl.gravity * dt;\n charCtrl.position.y += charCtrl.velocityY * dt;\n\n // Ground check\n if (charCtrl.position.y <= 1) {\n charCtrl.position.y = 1;\n charCtrl.velocityY = 0;\n charCtrl.isGrounded = true;\n } else {\n charCtrl.isGrounded = false;\n }\n}",
572
- codeValidation: {
573
- containsAll: ['moveSpeed', 'jumpForce', 'gravity', 'isGrounded'],
574
- },
575
- hint: {
576
- en: 'Move on XZ plane, apply gravity on Y axis, ground check when y <= ground level.',
577
- pl: 'Ruszaj się na płaszczyźnie XZ, stosuj grawitację na osi Y, sprawdź podłoże gdy y <= poziom.',
578
- de: 'Bewegung auf XZ-Ebene, Gravitation auf Y-Achse, Bodenprüfung wenn y <= Bodenhöhe.',
579
- },
580
- },
581
- // S8: Checkpoint
582
- {
583
- id: '3d-complete',
584
- type: 'checkpoint',
585
- title: {
586
- en: '3D Game Complete!',
587
- pl: 'Gra 3D gotowa!',
588
- de: '3D-Spiel fertig!',
589
- },
590
- content: {
591
- en: "You've built your first 3D game!\n• World3D scene with multiple objects\n• Primitive meshes (cube, sphere, plane)\n• Directional and point lighting\n• Orbit camera controller\n• 3D physics with rigid bodies\n• Character controller with jumping\n\nChallenge: Add a skybox and third-person camera!",
592
- pl: 'Zbudowałeś swoją pierwszą grę 3D!\n• Scena World3D z wieloma obiektami\n• Prymitywne meshe (sześcian, sfera, płaszczyzna)\n• Oświetlenie kierunkowe i punktowe\n• Kontroler kamery orbitalnej\n• Fizyka 3D z ciałami sztywnymi\n• Kontroler postaci ze skakaniem\n\nWyzwanie: Dodaj skybox i kamerę trzeciej osoby!',
593
- de: 'Du hast dein erstes 3D-Spiel gebaut!\n• World3D-Szene mit mehreren Objekten\n• Primitive Meshes (Würfel, Kugel, Ebene)\n• Richtungs- und Punktbeleuchtung\n• Orbit-Kamera-Controller\n• 3D-Physik mit Starrkörpern\n• Character-Controller mit Springen\n\nHerausforderung: Füge eine Skybox und Third-Person-Kamera hinzu!',
594
- },
595
- },
596
- ],
439
+ // S3: Meshes
440
+ {
441
+ id: "3d-meshes",
442
+ type: "code",
443
+ title: {
444
+ en: "Add 3D Meshes",
445
+ pl: "Dodaj meshe 3D",
446
+ de: "3D-Meshes hinzufügen"
447
+ },
448
+ content: {
449
+ en: "Add primitive meshes to the scene: cubes, spheres, cylinders. Each mesh has position, rotation, and scale.",
450
+ pl: "Dodaj prymitywne meshe do sceny: sześciany, sfery, cylindry. Każdy mesh ma pozycję, rotację i skalę.",
451
+ de: "Füge primitive Meshes zur Szene hinzu: Würfel, Kugeln, Zylinder. Jedes Mesh hat Position, Rotation und Skalierung."
452
+ },
453
+ codeTemplate: "// Add scene objects\nconst cube = world3d.addEntity();\n",
454
+ codeSolution: "const cube = world3d.addEntity();\nworld3d.setTransform(cube, { position: { x: 0, y: 2, z: 0 } });\nworld3d.setMesh(cube, { type: 'cube', color: { r: 0.8, g: 0.2, b: 0.2, a: 1 } });\n\nconst sphere = world3d.addEntity();\nworld3d.setTransform(sphere, { position: { x: 3, y: 1.5, z: 0 } });\nworld3d.setMesh(sphere, { type: 'sphere', color: { r: 0.2, g: 0.5, b: 1, a: 1 } });\n\nconst cylinder = world3d.addEntity();\nworld3d.setTransform(cylinder, { position: { x: -3, y: 1, z: 2 } });\nworld3d.setMesh(cylinder, { type: 'cylinder', color: { r: 0.9, g: 0.8, b: 0.1, a: 1 } });",
455
+ codeValidation: {
456
+ containsAll: ["cube", "sphere", "setMesh"]
457
+ },
458
+ hint: {
459
+ en: "Set mesh type to 'cube', 'sphere', 'cylinder', or 'plane'",
460
+ pl: "Ustaw typ mesha na 'cube', 'sphere', 'cylinder' lub 'plane'",
461
+ de: "Setze Mesh-Typ auf 'cube', 'sphere', 'cylinder' oder 'plane'"
462
+ }
463
+ },
464
+ // S4: Lighting
465
+ {
466
+ id: "3d-lighting",
467
+ type: "code",
468
+ title: {
469
+ en: "Add Lights to Your Scene",
470
+ pl: "Dodaj oświetlenie do sceny",
471
+ de: "Lichter zur Szene hinzufügen"
472
+ },
473
+ content: {
474
+ en: "Add directional, point, and spot lights to illuminate the scene. Lights have color, intensity, and range.",
475
+ pl: "Dodaj światła kierunkowe, punktowe i spot do oświetlenia sceny. Światła mają kolor, intensywność i zasięg.",
476
+ de: "Füge Richtungs-, Punkt- und Spotlichter hinzu. Lichter haben Farbe, Intensität und Reichweite."
477
+ },
478
+ codeTemplate: "// Add lights\nconst sunLight = world3d.addEntity();\n",
479
+ codeSolution: "const sunLight = world3d.addEntity();\nworld3d.setTransform(sunLight, { rotation: { x: -0.5, y: 0.3, z: 0, w: 1 } });\nworld3d.setLight(sunLight, {\n type: 'directional',\n color: { r: 1, g: 0.95, b: 0.8, a: 1 },\n intensity: 1.2,\n});\n\nconst torch = world3d.addEntity();\nworld3d.setTransform(torch, { position: { x: 5, y: 3, z: 0 } });\nworld3d.setLight(torch, {\n type: 'point',\n color: { r: 1, g: 0.6, b: 0.2, a: 1 },\n intensity: 2,\n range: 15,\n});",
480
+ codeValidation: {
481
+ containsAll: ["setLight", "directional", "intensity"]
482
+ },
483
+ hint: {
484
+ en: "Light types: 'directional', 'point', 'spot', 'hemisphere'",
485
+ pl: "Typy świateł: 'directional', 'point', 'spot', 'hemisphere'",
486
+ de: "Lichttypen: 'directional', 'point', 'spot', 'hemisphere'"
487
+ }
488
+ },
489
+ // S5: Camera Controller
490
+ {
491
+ id: "3d-camera",
492
+ type: "code",
493
+ title: {
494
+ en: "Camera Controllers",
495
+ pl: "Kontrolery kamery",
496
+ de: "Kamera-Controller"
497
+ },
498
+ content: {
499
+ en: "Set up a camera with an orbit controller. The player can rotate around and zoom into the scene.",
500
+ pl: "Skonfiguruj kamerę z kontrolerem orbity. Gracz może obracać się wokół i przybliżać scenę.",
501
+ de: "Richte eine Kamera mit Orbit-Controller ein. Der Spieler kann sich drehen und in die Szene zoomen."
502
+ },
503
+ codeTemplate: "// Set up orbit camera\nconst camEntity = world3d.addEntity();\n",
504
+ codeSolution: "const camEntity = world3d.addEntity();\nworld3d.setTransform(camEntity, { position: { x: 0, y: 5, z: 10 } });\nworld3d.setCamera(camEntity, {\n fov: 60,\n near: 0.1,\n far: 1000,\n controller: 'orbit', // 'fps', 'third-person', 'orbit', 'fly'\n active: true,\n});\n\n// The orbit controller auto-rotates around target\n// with mouse drag and scroll zoom",
505
+ codeValidation: {
506
+ containsAll: ["setCamera", "fov", "controller"]
507
+ },
508
+ hint: {
509
+ en: "Camera controllers: 'fps', 'third-person', 'orbit', 'fly'",
510
+ pl: "Kontrolery kamery: 'fps', 'third-person', 'orbit', 'fly'",
511
+ de: "Kamera-Controller: 'fps', 'third-person', 'orbit', 'fly'"
512
+ }
513
+ },
514
+ // S6: 3D Physics
515
+ {
516
+ id: "3d-physics",
517
+ type: "code",
518
+ title: {
519
+ en: "3D Physics & Collisions",
520
+ pl: "Fizyka i kolizje 3D",
521
+ de: "3D-Physik & Kollisionen"
522
+ },
523
+ content: {
524
+ en: "Add rigid bodies and colliders for 3D physics. Objects fall with gravity and bounce off each other.",
525
+ pl: "Dodaj ciała sztywne i kolidery dla fizyki 3D. Obiekty spadają z grawitacją i odbijają się od siebie.",
526
+ de: "Füge Starrkörper und Kollider für 3D-Physik hinzu. Objekte fallen mit Schwerkraft und prallen voneinander ab."
527
+ },
528
+ codeTemplate: "// Add physics to cube\n",
529
+ codeSolution: "// Make cube a dynamic physics body\nworld3d.setRigidBody(cube, {\n bodyType: 'dynamic',\n mass: 1,\n restitution: 0.5, // bounce\n friction: 0.3,\n});\nworld3d.setCollider(cube, {\n shape: 'box',\n size: { x: 1, y: 1, z: 1 },\n});\n\n// Make ground static\nworld3d.setRigidBody(ground, { bodyType: 'static' });\nworld3d.setCollider(ground, {\n shape: 'box',\n size: { x: 50, y: 0.5, z: 50 },\n});\n\n// Apply an impulse to launch the cube!\nworld3d.applyImpulse(cube, { x: 0, y: 10, z: 5 });",
530
+ codeValidation: {
531
+ containsAll: ["setRigidBody", "setCollider", "dynamic"]
532
+ },
533
+ hint: {
534
+ en: "bodyType: 'dynamic' (movable), 'static' (fixed), 'kinematic' (scripted)",
535
+ pl: "bodyType: 'dynamic' (ruchomy), 'static' (stały), 'kinematic' (skryptowy)",
536
+ de: "bodyType: 'dynamic' (beweglich), 'static' (fest), 'kinematic' (geskriptet)"
537
+ }
538
+ },
539
+ // S7: Character Controller
540
+ {
541
+ id: "3d-character",
542
+ type: "code",
543
+ title: {
544
+ en: "3D Character Controller",
545
+ pl: "Kontroler postaci 3D",
546
+ de: "3D-Character-Controller"
547
+ },
548
+ content: {
549
+ en: "Use the `CharacterController3D` for a player that walks, jumps, and interacts with the physics world.",
550
+ pl: "Użyj `CharacterController3D` dla gracza, który chodzi, skacze i wchodzi w interakcję ze światem fizyki.",
551
+ de: "Verwende den `CharacterController3D` für einen Spieler, der läuft, springt und mit der Physikwelt interagiert."
552
+ },
553
+ codeTemplate: "// 3D character controller\nconst charCtrl = ",
554
+ codeSolution: "const charCtrl = {\n moveSpeed: 5,\n jumpForce: 8,\n gravity: -20,\n isGrounded: false,\n velocityY: 0,\n position: { x: 0, y: 1, z: 0 },\n};\n\nfunction updateCharacter(input: any, dt: number) {\n // Movement on XZ plane\n let moveX = 0, moveZ = 0;\n if (input.getAction('moveForward')) moveZ -= 1;\n if (input.getAction('moveBack')) moveZ += 1;\n if (input.getAction('moveLeft')) moveX -= 1;\n if (input.getAction('moveRight')) moveX += 1;\n\n charCtrl.position.x += moveX * charCtrl.moveSpeed * dt;\n charCtrl.position.z += moveZ * charCtrl.moveSpeed * dt;\n\n // Gravity + jump\n if (input.getAction('jump') && charCtrl.isGrounded) {\n charCtrl.velocityY = charCtrl.jumpForce;\n }\n charCtrl.velocityY += charCtrl.gravity * dt;\n charCtrl.position.y += charCtrl.velocityY * dt;\n\n // Ground check\n if (charCtrl.position.y <= 1) {\n charCtrl.position.y = 1;\n charCtrl.velocityY = 0;\n charCtrl.isGrounded = true;\n } else {\n charCtrl.isGrounded = false;\n }\n}",
555
+ codeValidation: {
556
+ containsAll: ["moveSpeed", "jumpForce", "gravity", "isGrounded"]
557
+ },
558
+ hint: {
559
+ en: "Move on XZ plane, apply gravity on Y axis, ground check when y <= ground level.",
560
+ pl: "Ruszaj się na płaszczyźnie XZ, stosuj grawitację na osi Y, sprawdź podłoże gdy y <= poziom.",
561
+ de: "Bewegung auf XZ-Ebene, Gravitation auf Y-Achse, Bodenprüfung wenn y <= Bodenhöhe."
562
+ }
563
+ },
564
+ // S8: Checkpoint
565
+ {
566
+ id: "3d-complete",
567
+ type: "checkpoint",
568
+ title: {
569
+ en: "3D Game Complete!",
570
+ pl: "Gra 3D gotowa!",
571
+ de: "3D-Spiel fertig!"
572
+ },
573
+ content: {
574
+ en: "You've built your first 3D game!\n• World3D scene with multiple objects\n• Primitive meshes (cube, sphere, plane)\n• Directional and point lighting\n• Orbit camera controller\n• 3D physics with rigid bodies\n• Character controller with jumping\n\nChallenge: Add a skybox and third-person camera!",
575
+ pl: "Zbudowałeś swoją pierwszą grę 3D!\n• Scena World3D z wieloma obiektami\n• Prymitywne meshe (sześcian, sfera, płaszczyzna)\n• Oświetlenie kierunkowe i punktowe\n• Kontroler kamery orbitalnej\n• Fizyka 3D z ciałami sztywnymi\n• Kontroler postaci ze skakaniem\n\nWyzwanie: Dodaj skybox i kamerę trzeciej osoby!",
576
+ de: "Du hast dein erstes 3D-Spiel gebaut!\n• World3D-Szene mit mehreren Objekten\n• Primitive Meshes (Würfel, Kugel, Ebene)\n• Richtungs- und Punktbeleuchtung\n• Orbit-Kamera-Controller\n• 3D-Physik mit Starrkörpern\n• Character-Controller mit Springen\n\nHerausforderung: Füge eine Skybox und Third-Person-Kamera hinzu!"
577
+ }
578
+ }
579
+ ]
597
580
  };
598
- /* ══════════════════════════════════════════════════════════════
599
- T15 — Publikacja gry
600
- ══════════════════════════════════════════════════════════════ */
601
581
  const TUTORIAL_PUBLISHING = {
602
- id: 'publish-your-game',
603
- title: {
604
- en: 'Publish Your Game',
605
- pl: 'Publikacja gry',
606
- de: 'Dein Spiel veröffentlichen',
582
+ id: "publish-your-game",
583
+ title: {
584
+ en: "Publish Your Game",
585
+ pl: "Publikacja gry",
586
+ de: "Dein Spiel veröffentlichen"
587
+ },
588
+ description: {
589
+ en: "Export your game as a PWA (web app), Electron desktop app, or Capacitor mobile app. Optimize, bundle, and deploy!",
590
+ pl: "Wyeksportuj swoją grę jako PWA (web app), aplikację Electron lub Capacitor. Zoptymalizuj, zbundluj i wdróż!",
591
+ de: "Exportiere dein Spiel als PWA (Web-App), Electron-Desktop-App oder Capacitor-Mobile-App. Optimiere, bundle und deploye!"
592
+ },
593
+ category: "game-advanced",
594
+ difficulty: "intermediate",
595
+ estimatedMinutes: 25,
596
+ prerequisites: ["first-game-bouncing-ball"],
597
+ kidFriendly: false,
598
+ ageRange: { min: 14, max: 99 },
599
+ tags: ["publish", "export", "pwa", "electron", "capacitor", "deploy", "build"],
600
+ steps: [
601
+ // S1: Intro
602
+ {
603
+ id: "pub-intro",
604
+ type: "text",
605
+ title: {
606
+ en: "Publish Your Game!",
607
+ pl: "Opublikuj swoją grę!",
608
+ de: "Veröffentliche dein Spiel!"
609
+ },
610
+ content: {
611
+ en: "Your game is ready — now let's share it with the world!\n\n• Feature detection (check browser support)\n• Build optimization (minify, tree-shake)\n• PWA export (installable web app)\n• Electron export (Windows/Mac/Linux)\n• Capacitor export (iOS/Android)\n• Performance benchmarking\n\nLet's deploy!",
612
+ pl: "Twoja gra jest gotowa — czas podzielić się nią ze światem!\n\n• Wykrywanie funkcji (sprawdź wsparcie przeglądarki)\n• Optymalizacja buildu (minifikacja, tree-shaking)\n• Eksport PWA (instalowalna web app)\n• Eksport Electron (Windows/Mac/Linux)\n• Eksport Capacitor (iOS/Android)\n• Benchmarkowanie wydajności\n\nWdrażamy!",
613
+ de: "Dein Spiel ist bereit — teile es mit der Welt!\n\n• Feature-Erkennung (Browser-Support)\n• Build-Optimierung (Minifizierung, Tree-Shaking)\n• PWA-Export (installierbare Web-App)\n• Electron-Export (Windows/Mac/Linux)\n• Capacitor-Export (iOS/Android)\n• Performance-Benchmarking\n\nLos geht's!"
614
+ },
615
+ skippable: true,
616
+ tooltipPosition: "center"
607
617
  },
608
- description: {
609
- en: 'Export your game as a PWA (web app), Electron desktop app, or Capacitor mobile app. Optimize, bundle, and deploy!',
610
- pl: 'Wyeksportuj swoją grę jako PWA (web app), aplikację Electron lub Capacitor. Zoptymalizuj, zbundluj i wdróż!',
611
- de: 'Exportiere dein Spiel als PWA (Web-App), Electron-Desktop-App oder Capacitor-Mobile-App. Optimiere, bundle und deploye!',
618
+ // S2: Feature Detection
619
+ {
620
+ id: "pub-features",
621
+ type: "code",
622
+ title: {
623
+ en: "Detect Browser Capabilities",
624
+ pl: "Wykryj możliwości przeglądarki",
625
+ de: "Browser-Fähigkeiten erkennen"
626
+ },
627
+ content: {
628
+ en: "Use `detectFeatures()` to check what the current browser supports before running your game.",
629
+ pl: "Użyj `detectFeatures()` aby sprawdzić, co obsługuje bieżąca przeglądarka przed uruchomieniem gry.",
630
+ de: "Verwende `detectFeatures()` um die Browser-Unterstützung vor dem Spielstart zu prüfen."
631
+ },
632
+ codeTemplate: "// Check browser capabilities\nconst features = ",
633
+ codeSolution: "const features = detectFeatures();\n\nconsole.log('WebGL:', features.webgl);\nconsole.log('WebGPU:', features.webgpu);\nconsole.log('WebAudio:', features.webAudio);\nconsole.log('Gamepad:', features.gamepad);\nconsole.log('Touch:', features.touch);\nconsole.log('WebRTC:', features.webrtc);\n\nif (!features.webgl) {\n alert('Your browser does not support WebGL. Please use a modern browser.');\n}",
634
+ codeValidation: {
635
+ containsAll: ["detectFeatures", "webgl"]
636
+ },
637
+ hint: {
638
+ en: "detectFeatures() returns an object with boolean capabilities",
639
+ pl: "detectFeatures() zwraca obiekt z boolowskimi możliwościami",
640
+ de: "detectFeatures() gibt ein Objekt mit booleschen Fähigkeiten zurück"
641
+ }
612
642
  },
613
- category: 'game-advanced',
614
- difficulty: 'intermediate',
615
- estimatedMinutes: 25,
616
- prerequisites: ['first-game-bouncing-ball'],
617
- kidFriendly: false,
618
- ageRange: { min: 14, max: 99 },
619
- tags: ['publish', 'export', 'pwa', 'electron', 'capacitor', 'deploy', 'build'],
620
- steps: [
621
- // S1: Intro
622
- {
623
- id: 'pub-intro',
624
- type: 'text',
625
- title: {
626
- en: 'Publish Your Game!',
627
- pl: 'Opublikuj swoją grę!',
628
- de: 'Veröffentliche dein Spiel!',
629
- },
630
- content: {
631
- en: "Your game is ready — now let's share it with the world!\n\n• Feature detection (check browser support)\n• Build optimization (minify, tree-shake)\n• PWA export (installable web app)\n• Electron export (Windows/Mac/Linux)\n• Capacitor export (iOS/Android)\n• Performance benchmarking\n\nLet's deploy!",
632
- pl: 'Twoja gra jest gotowa — czas podzielić się nią ze światem!\n\n• Wykrywanie funkcji (sprawdź wsparcie przeglądarki)\n• Optymalizacja buildu (minifikacja, tree-shaking)\n• Eksport PWA (instalowalna web app)\n• Eksport Electron (Windows/Mac/Linux)\n• Eksport Capacitor (iOS/Android)\n• Benchmarkowanie wydajności\n\nWdrażamy!',
633
- de: "Dein Spiel ist bereit — teile es mit der Welt!\n\n• Feature-Erkennung (Browser-Support)\n• Build-Optimierung (Minifizierung, Tree-Shaking)\n• PWA-Export (installierbare Web-App)\n• Electron-Export (Windows/Mac/Linux)\n• Capacitor-Export (iOS/Android)\n• Performance-Benchmarking\n\nLos geht's!",
634
- },
635
- skippable: true,
636
- tooltipPosition: 'center',
637
- },
638
- // S2: Feature Detection
639
- {
640
- id: 'pub-features',
641
- type: 'code',
642
- title: {
643
- en: 'Detect Browser Capabilities',
644
- pl: 'Wykryj możliwości przeglądarki',
645
- de: 'Browser-Fähigkeiten erkennen',
646
- },
647
- content: {
648
- en: 'Use `detectFeatures()` to check what the current browser supports before running your game.',
649
- pl: 'Użyj `detectFeatures()` aby sprawdzić, co obsługuje bieżąca przeglądarka przed uruchomieniem gry.',
650
- de: 'Verwende `detectFeatures()` um die Browser-Unterstützung vor dem Spielstart zu prüfen.',
651
- },
652
- codeTemplate: '// Check browser capabilities\nconst features = ',
653
- codeSolution: "const features = detectFeatures();\n\nconsole.log('WebGL:', features.webgl);\nconsole.log('WebGPU:', features.webgpu);\nconsole.log('WebAudio:', features.webAudio);\nconsole.log('Gamepad:', features.gamepad);\nconsole.log('Touch:', features.touch);\nconsole.log('WebRTC:', features.webrtc);\n\nif (!features.webgl) {\n alert('Your browser does not support WebGL. Please use a modern browser.');\n}",
654
- codeValidation: {
655
- containsAll: ['detectFeatures', 'webgl'],
656
- },
657
- hint: {
658
- en: 'detectFeatures() returns an object with boolean capabilities',
659
- pl: 'detectFeatures() zwraca obiekt z boolowskimi możliwościami',
660
- de: 'detectFeatures() gibt ein Objekt mit booleschen Fähigkeiten zurück',
661
- },
662
- },
663
- // S3: Build Config
664
- {
665
- id: 'pub-build-config',
666
- type: 'code',
667
- title: {
668
- en: 'Configure Export Build',
669
- pl: 'Skonfiguruj build eksportu',
670
- de: 'Export-Build konfigurieren',
671
- },
672
- content: {
673
- en: 'Set up the export configuration for your target platform. Choose between web, PWA, Electron, or Capacitor.',
674
- pl: 'Skonfiguruj eksport dla docelowej platformy. Wybierz między web, PWA, Electron lub Capacitor.',
675
- de: 'Richte die Export-Konfiguration für deine Zielplattform ein. Wähle zwischen Web, PWA, Electron oder Capacitor.',
676
- },
677
- codeTemplate: '// Export configuration\nconst exportConfig = {\n',
678
- codeSolution: "const exportConfig = {\n target: 'pwa', // 'web' | 'pwa' | 'electron' | 'capacitor'\n title: 'My Awesome Game',\n version: '1.0.0',\n minify: true,\n treeShake: true,\n splitChunks: true,\n sourceMaps: false,\n pwa: {\n name: 'My Awesome Game',\n shortName: 'AwesomeGame',\n themeColor: '#1a1a2e',\n backgroundColor: '#1a1a2e',\n display: 'fullscreen',\n orientation: 'landscape',\n icons: [\n { src: 'icon-192.png', sizes: '192x192' },\n { src: 'icon-512.png', sizes: '512x512' },\n ],\n },\n};",
679
- codeValidation: {
680
- containsAll: ['target', 'minify', 'treeShake', 'pwa'],
681
- },
682
- hint: {
683
- en: "Set target to 'pwa' for installable web app with offline support",
684
- pl: "Ustaw target na 'pwa' dla instalowalnej web app z wsparciem offline",
685
- de: "Setze target auf 'pwa' für installierbare Web-App mit Offline-Support",
686
- },
687
- },
688
- // S4: Performance Benchmarking
643
+ // S3: Build Config
644
+ {
645
+ id: "pub-build-config",
646
+ type: "code",
647
+ title: {
648
+ en: "Configure Export Build",
649
+ pl: "Skonfiguruj build eksportu",
650
+ de: "Export-Build konfigurieren"
651
+ },
652
+ content: {
653
+ en: "Set up the export configuration for your target platform. Choose between web, PWA, Electron, or Capacitor.",
654
+ pl: "Skonfiguruj eksport dla docelowej platformy. Wybierz między web, PWA, Electron lub Capacitor.",
655
+ de: "Richte die Export-Konfiguration für deine Zielplattform ein. Wähle zwischen Web, PWA, Electron oder Capacitor."
656
+ },
657
+ codeTemplate: "// Export configuration\nconst exportConfig = {\n",
658
+ codeSolution: "const exportConfig = {\n target: 'pwa', // 'web' | 'pwa' | 'electron' | 'capacitor'\n title: 'My Awesome Game',\n version: '1.0.0',\n minify: true,\n treeShake: true,\n splitChunks: true,\n sourceMaps: false,\n pwa: {\n name: 'My Awesome Game',\n shortName: 'AwesomeGame',\n themeColor: '#1a1a2e',\n backgroundColor: '#1a1a2e',\n display: 'fullscreen',\n orientation: 'landscape',\n icons: [\n { src: 'icon-192.png', sizes: '192x192' },\n { src: 'icon-512.png', sizes: '512x512' },\n ],\n },\n};",
659
+ codeValidation: {
660
+ containsAll: ["target", "minify", "treeShake", "pwa"]
661
+ },
662
+ hint: {
663
+ en: "Set target to 'pwa' for installable web app with offline support",
664
+ pl: "Ustaw target na 'pwa' dla instalowalnej web app z wsparciem offline",
665
+ de: "Setze target auf 'pwa' für installierbare Web-App mit Offline-Support"
666
+ }
667
+ },
668
+ // S4: Performance Benchmarking
669
+ {
670
+ id: "pub-benchmark",
671
+ type: "code",
672
+ title: {
673
+ en: "Benchmark Your Game",
674
+ pl: "Zbenchmarkuj swoją grę",
675
+ de: "Performance-Benchmark"
676
+ },
677
+ content: {
678
+ en: "Run performance benchmarks before publishing to ensure smooth gameplay. Measure FPS, frame times, and memory usage.",
679
+ pl: "Uruchom benchmarki wydajności przed publikacją, aby zapewnić płynną rozgrywkę. Mierz FPS, czasy klatek i użycie pamięci.",
680
+ de: "Führe Performance-Benchmarks vor der Veröffentlichung durch. Messe FPS, Frame-Zeiten und Speicherverbrauch."
681
+ },
682
+ codeTemplate: "// Run performance benchmark\n",
683
+ codeSolution: "// Measure core loop performance\nconst bench = createBenchmark('Game Loop', 1000);\n\n// Warm up (5 runs)\nbench.warmup(5);\n\n// Run benchmark\nbench.run(() => {\n // Simulate one game frame\n world.update(1 / 60);\n});\n\n// Get results\nconst results = bench.getResults();\nconsole.log(`Avg: ${results.avg.toFixed(2)}ms`);\nconsole.log(`Min: ${results.min.toFixed(2)}ms`);\nconsole.log(`Max: ${results.max.toFixed(2)}ms`);\nconsole.log(`Ops/sec: ${results.opsPerSecond.toFixed(0)}`);",
684
+ codeValidation: {
685
+ containsAll: ["createBenchmark", "run", "getResults"]
686
+ },
687
+ hint: {
688
+ en: "createBenchmark(name, iterations) → warmup → run → getResults",
689
+ pl: "createBenchmark(nazwa, iteracje) → warmup → run → getResults",
690
+ de: "createBenchmark(name, iterationen) → warmup → run → getResults"
691
+ }
692
+ },
693
+ // S5: Deploy
694
+ {
695
+ id: "pub-deploy",
696
+ type: "text",
697
+ title: {
698
+ en: "Deploy Your Game",
699
+ pl: "Wdróż swoją grę",
700
+ de: "Spiel deployen"
701
+ },
702
+ content: {
703
+ en: "Your game is ready to deploy! Options:\n\n**Web / PWA** → Upload to any static hosting (Netlify, Vercel, GitHub Pages)\n\n**Electron** → Package for Windows (.exe), macOS (.dmg), Linux (.AppImage)\n\n**Capacitor** → Build for iOS (App Store) and Android (Google Play)\n\nAll exports use the same game code — no rewrites needed!",
704
+ pl: "Twoja gra jest gotowa do wdrożenia! Opcje:\n\n**Web / PWA** → Upload na dowolny hosting statyczny (Netlify, Vercel, GitHub Pages)\n\n**Electron** → Pakietowanie dla Windows (.exe), macOS (.dmg), Linux (.AppImage)\n\n**Capacitor** → Build dla iOS (App Store) i Android (Google Play)\n\nWszystkie eksporty używają tego samego kodu gry — bez przepisywania!",
705
+ de: "Dein Spiel ist bereit zum Deployen! Optionen:\n\n**Web / PWA** → Upload auf statisches Hosting (Netlify, Vercel, GitHub Pages)\n\n**Electron** → Verpacken für Windows (.exe), macOS (.dmg), Linux (.AppImage)\n\n**Capacitor** → Build für iOS (App Store) und Android (Google Play)\n\nAlle Exporte verwenden denselben Spielcode — kein Umschreiben nötig!"
706
+ }
707
+ },
708
+ // S6: Quiz
709
+ {
710
+ id: "pub-quiz",
711
+ type: "quiz",
712
+ title: {
713
+ en: "Publishing Quiz",
714
+ pl: "Quiz o publikacji",
715
+ de: "Veröffentlichungs-Quiz"
716
+ },
717
+ content: {
718
+ en: "What is a PWA (Progressive Web App)?",
719
+ pl: "Czym jest PWA (Progressive Web App)?",
720
+ de: "Was ist eine PWA (Progressive Web App)?"
721
+ },
722
+ quizOptions: [
689
723
  {
690
- id: 'pub-benchmark',
691
- type: 'code',
692
- title: {
693
- en: 'Benchmark Your Game',
694
- pl: 'Zbenchmarkuj swoją grę',
695
- de: 'Performance-Benchmark',
696
- },
697
- content: {
698
- en: 'Run performance benchmarks before publishing to ensure smooth gameplay. Measure FPS, frame times, and memory usage.',
699
- pl: 'Uruchom benchmarki wydajności przed publikacją, aby zapewnić płynną rozgrywkę. Mierz FPS, czasy klatek i użycie pamięci.',
700
- de: 'Führe Performance-Benchmarks vor der Veröffentlichung durch. Messe FPS, Frame-Zeiten und Speicherverbrauch.',
701
- },
702
- codeTemplate: '// Run performance benchmark\n',
703
- codeSolution: "// Measure core loop performance\nconst bench = createBenchmark('Game Loop', 1000);\n\n// Warm up (5 runs)\nbench.warmup(5);\n\n// Run benchmark\nbench.run(() => {\n // Simulate one game frame\n world.update(1 / 60);\n});\n\n// Get results\nconst results = bench.getResults();\nconsole.log(`Avg: ${results.avg.toFixed(2)}ms`);\nconsole.log(`Min: ${results.min.toFixed(2)}ms`);\nconsole.log(`Max: ${results.max.toFixed(2)}ms`);\nconsole.log(`Ops/sec: ${results.opsPerSecond.toFixed(0)}`);",
704
- codeValidation: {
705
- containsAll: ['createBenchmark', 'run', 'getResults'],
706
- },
707
- hint: {
708
- en: 'createBenchmark(name, iterations) → warmup → run → getResults',
709
- pl: 'createBenchmark(nazwa, iteracje) → warmup → run → getResults',
710
- de: 'createBenchmark(name, iterationen) → warmup → run → getResults',
711
- },
724
+ id: "a",
725
+ text: {
726
+ en: "A native mobile app",
727
+ pl: "Natywna aplikacja mobilna",
728
+ de: "Eine native mobile App"
729
+ }
712
730
  },
713
- // S5: Deploy
714
731
  {
715
- id: 'pub-deploy',
716
- type: 'text',
717
- title: {
718
- en: 'Deploy Your Game',
719
- pl: 'Wdróż swoją grę',
720
- de: 'Spiel deployen',
721
- },
722
- content: {
723
- en: 'Your game is ready to deploy! Options:\n\n**Web / PWA** → Upload to any static hosting (Netlify, Vercel, GitHub Pages)\n\n**Electron** → Package for Windows (.exe), macOS (.dmg), Linux (.AppImage)\n\n**Capacitor** → Build for iOS (App Store) and Android (Google Play)\n\nAll exports use the same game code — no rewrites needed!',
724
- pl: 'Twoja gra jest gotowa do wdrożenia! Opcje:\n\n**Web / PWA** → Upload na dowolny hosting statyczny (Netlify, Vercel, GitHub Pages)\n\n**Electron** → Pakietowanie dla Windows (.exe), macOS (.dmg), Linux (.AppImage)\n\n**Capacitor** → Build dla iOS (App Store) i Android (Google Play)\n\nWszystkie eksporty używają tego samego kodu gry — bez przepisywania!',
725
- de: 'Dein Spiel ist bereit zum Deployen! Optionen:\n\n**Web / PWA** → Upload auf statisches Hosting (Netlify, Vercel, GitHub Pages)\n\n**Electron** → Verpacken für Windows (.exe), macOS (.dmg), Linux (.AppImage)\n\n**Capacitor** → Build für iOS (App Store) und Android (Google Play)\n\nAlle Exporte verwenden denselben Spielcode — kein Umschreiben nötig!',
726
- },
732
+ id: "b",
733
+ text: {
734
+ en: "A web app that can be installed and works offline",
735
+ pl: "Web app instalowalna i działająca offline",
736
+ de: "Eine Web-App die installierbar ist und offline funktioniert"
737
+ }
727
738
  },
728
- // S6: Quiz
729
739
  {
730
- id: 'pub-quiz',
731
- type: 'quiz',
732
- title: {
733
- en: 'Publishing Quiz',
734
- pl: 'Quiz o publikacji',
735
- de: 'Veröffentlichungs-Quiz',
736
- },
737
- content: {
738
- en: 'What is a PWA (Progressive Web App)?',
739
- pl: 'Czym jest PWA (Progressive Web App)?',
740
- de: 'Was ist eine PWA (Progressive Web App)?',
741
- },
742
- quizOptions: [
743
- {
744
- id: 'a',
745
- text: {
746
- en: 'A native mobile app',
747
- pl: 'Natywna aplikacja mobilna',
748
- de: 'Eine native mobile App',
749
- },
750
- },
751
- {
752
- id: 'b',
753
- text: {
754
- en: 'A web app that can be installed and works offline',
755
- pl: 'Web app instalowalna i działająca offline',
756
- de: 'Eine Web-App die installierbar ist und offline funktioniert',
757
- },
758
- },
759
- {
760
- id: 'c',
761
- text: {
762
- en: 'A special browser plugin',
763
- pl: 'Specjalna wtyczka przeglądarki',
764
- de: 'Ein spezielles Browser-Plugin',
765
- },
766
- },
767
- {
768
- id: 'd',
769
- text: {
770
- en: 'A server-side application',
771
- pl: 'Aplikacja serwerowa',
772
- de: 'Eine serverseitige Anwendung',
773
- },
774
- },
775
- ],
776
- quizCorrectId: 'b',
740
+ id: "c",
741
+ text: {
742
+ en: "A special browser plugin",
743
+ pl: "Specjalna wtyczka przeglądarki",
744
+ de: "Ein spezielles Browser-Plugin"
745
+ }
777
746
  },
778
- // S7: Checkpoint
779
747
  {
780
- id: 'pub-complete',
781
- type: 'checkpoint',
782
- title: {
783
- en: 'Publication Complete!',
784
- pl: 'Publikacja gotowa!',
785
- de: 'Veröffentlichung fertig!',
786
- },
787
- content: {
788
- en: 'Congratulations! You now know how to:\n• Check browser feature support\n• Configure optimized builds\n• Export as PWA, Electron, or Capacitor\n• Run performance benchmarks\n• Deploy to web, desktop, and mobile\n\nYour game is ready for the world!',
789
- pl: 'Gratulacje! Teraz wiesz jak:\n• Sprawdzić wsparcie funkcji przeglądarki\n• Konfigurować zoptymalizowane buildy\n• Eksportować jako PWA, Electron lub Capacitor\n• Uruchamiać benchmarki wydajności\n• Wdrażać na web, desktop i mobile\n\nTwoja gra jest gotowa na świat!',
790
- de: 'Herzlichen Glückwunsch! Du weißt jetzt wie man:\n• Browser-Feature-Support prüft\n• Optimierte Builds konfiguriert\n• Als PWA, Electron oder Capacitor exportiert\n• Performance-Benchmarks durchführt\n• Auf Web, Desktop und Mobile deployt\n\nDein Spiel ist bereit für die Welt!',
791
- },
792
- },
793
- ],
748
+ id: "d",
749
+ text: {
750
+ en: "A server-side application",
751
+ pl: "Aplikacja serwerowa",
752
+ de: "Eine serverseitige Anwendung"
753
+ }
754
+ }
755
+ ],
756
+ quizCorrectId: "b"
757
+ },
758
+ // S7: Checkpoint
759
+ {
760
+ id: "pub-complete",
761
+ type: "checkpoint",
762
+ title: {
763
+ en: "Publication Complete!",
764
+ pl: "Publikacja gotowa!",
765
+ de: "Veröffentlichung fertig!"
766
+ },
767
+ content: {
768
+ en: "Congratulations! You now know how to:\n• Check browser feature support\n• Configure optimized builds\n• Export as PWA, Electron, or Capacitor\n• Run performance benchmarks\n• Deploy to web, desktop, and mobile\n\nYour game is ready for the world!",
769
+ pl: "Gratulacje! Teraz wiesz jak:\n• Sprawdzić wsparcie funkcji przeglądarki\n• Konfigurować zoptymalizowane buildy\n• Eksportować jako PWA, Electron lub Capacitor\n• Uruchamiać benchmarki wydajności\n• Wdrażać na web, desktop i mobile\n\nTwoja gra jest gotowa na świat!",
770
+ de: "Herzlichen Glückwunsch! Du weißt jetzt wie man:\n• Browser-Feature-Support prüft\n• Optimierte Builds konfiguriert\n• Als PWA, Electron oder Capacitor exportiert\n• Performance-Benchmarks durchführt\n• Auf Web, Desktop und Mobile deployt\n\nDein Spiel ist bereit für die Welt!"
771
+ }
772
+ }
773
+ ]
794
774
  };
795
- /* ══════════════════════════════════════════════════════════════
796
- Convenience export
797
- ══════════════════════════════════════════════════════════════ */
798
775
  function getTutorials_T12_T15() {
799
- return [TUTORIAL_RPG, TUTORIAL_TOWER_DEFENSE, TUTORIAL_3D_GAME, TUTORIAL_PUBLISHING];
776
+ return [TUTORIAL_RPG, TUTORIAL_TOWER_DEFENSE, TUTORIAL_3D_GAME, TUTORIAL_PUBLISHING];
800
777
  }
801
-
802
- export { TUTORIAL_3D_GAME, TUTORIAL_PUBLISHING, TUTORIAL_RPG, TUTORIAL_TOWER_DEFENSE, getTutorials_T12_T15 };
778
+ export {
779
+ TUTORIAL_3D_GAME,
780
+ TUTORIAL_PUBLISHING,
781
+ TUTORIAL_RPG,
782
+ TUTORIAL_TOWER_DEFENSE,
783
+ getTutorials_T12_T15
784
+ };