Skip to content

Commit 4efe09a

Browse files
feat: add script library with 6 built-in games
- index.json with categories, featured scripts, and metadata - 6 game scripts: brick breaker, space shooter, gravity maze, neon snake, jump tower, whack-a-mole Made-with: Cursor
1 parent 1646b04 commit 4efe09a

7 files changed

Lines changed: 2760 additions & 0 deletions

File tree

script_library/index.json

Lines changed: 192 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,192 @@
1+
{
2+
"format_version": 1,
3+
"data_version": 1,
4+
"updated": "2026-03-18T12:00:00Z",
5+
"announcement": {
6+
"text": "🎮 6款内置游戏已上线,快来体验!",
7+
"text_en": "🎮 6 built-in games are now available!",
8+
"action_category": "games",
9+
"expires": "2026-06-01T00:00:00Z"
10+
},
11+
"categories": [
12+
{
13+
"id": "basic",
14+
"name": "基础脚本",
15+
"name_en": "Basics",
16+
"desc": "Python 基础功能演示",
17+
"desc_en": "Python fundamentals & demos",
18+
"icon": "curlybraces",
19+
"sort": 1,
20+
"color": "#4A90D9"
21+
},
22+
{
23+
"id": "ui",
24+
"name": "UI 界面",
25+
"name_en": "UI",
26+
"desc": "原生 iOS 界面开发",
27+
"desc_en": "Native iOS UI development",
28+
"icon": "paintbrush.fill",
29+
"sort": 2,
30+
"color": "#E85D75"
31+
},
32+
{
33+
"id": "games",
34+
"name": "游戏",
35+
"name_en": "Games",
36+
"desc": "Scene 模块 2D 游戏",
37+
"desc_en": "2D games with Scene module",
38+
"icon": "gamecontroller.fill",
39+
"sort": 3,
40+
"color": "#50C878"
41+
},
42+
{
43+
"id": "widgets",
44+
"name": "小组件",
45+
"name_en": "Widgets",
46+
"desc": "桌面小组件脚本",
47+
"desc_en": "Home screen widget scripts",
48+
"icon": "square.grid.2x2",
49+
"sort": 4,
50+
"color": "#F5A623"
51+
},
52+
{
53+
"id": "other",
54+
"name": "其他格式",
55+
"name_en": "Other Formats",
56+
"desc": "HTML / Markdown / JS",
57+
"desc_en": "HTML / Markdown / JS",
58+
"icon": "globe",
59+
"sort": 5,
60+
"color": "#9B59B6"
61+
}
62+
],
63+
"featured": ["space_shooter", "neon_snake", "brick_breaker"],
64+
"scripts": [
65+
{
66+
"id": "brick_breaker",
67+
"name": "霓虹弹球",
68+
"name_en": "Neon Brick Breaker",
69+
"desc": "经典打砖块重制版。60级关卡、7种道具、连击火焰、粒子爆炸、HUD安全区适配",
70+
"desc_en": "Classic brick breaker with 60 levels, 7 power-ups, combo flames, particle effects",
71+
"category": "games",
72+
"file": "scripts/games/brick_breaker.py",
73+
"thumbnail": null,
74+
"version": 1,
75+
"file_type": "py",
76+
"author": "官方",
77+
"author_en": "Official",
78+
"tags": ["scene", "touch", "particle", "game", "brick"],
79+
"requires": [],
80+
"min_app_version": "1.5.0",
81+
"added": "2026-03-18",
82+
"updated": null,
83+
"status": "active",
84+
"lines": 627
85+
},
86+
{
87+
"id": "space_shooter",
88+
"name": "太空射击",
89+
"name_en": "Space Shooter",
90+
"desc": "纵向卷轴射击游戏。手指控制飞船,自动射击,4种敌机、Boss战、连击系统、粒子爆炸",
91+
"desc_en": "Vertical shooter with 4 enemy types, boss fights, combo system, particle explosions",
92+
"category": "games",
93+
"file": "scripts/games/space_shooter.py",
94+
"thumbnail": null,
95+
"version": 1,
96+
"file_type": "py",
97+
"author": "官方",
98+
"author_en": "Official",
99+
"tags": ["scene", "touch", "particle", "game", "shooter"],
100+
"requires": [],
101+
"min_app_version": "1.5.0",
102+
"added": "2026-03-18",
103+
"updated": null,
104+
"status": "active",
105+
"lines": 352
106+
},
107+
{
108+
"id": "gravity_maze",
109+
"name": "重力迷宫",
110+
"name_en": "Gravity Maze",
111+
"desc": "利用设备重力感应控制小球穿越迷宫,收集星星,躲避障碍",
112+
"desc_en": "Tilt your device to guide the ball through mazes, collect stars, avoid obstacles",
113+
"category": "games",
114+
"file": "scripts/games/gravity_maze.py",
115+
"thumbnail": null,
116+
"version": 1,
117+
"file_type": "py",
118+
"author": "官方",
119+
"author_en": "Official",
120+
"tags": ["scene", "gravity", "accelerometer", "game", "maze"],
121+
"requires": [],
122+
"min_app_version": "1.5.0",
123+
"added": "2026-03-18",
124+
"updated": null,
125+
"status": "active",
126+
"lines": 298
127+
},
128+
{
129+
"id": "neon_snake",
130+
"name": "霓虹贪吃蛇",
131+
"name_en": "Neon Snake",
132+
"desc": "赛博朋克风贪吃蛇。方向键+滑动操控、虚拟方向键、墙壁障碍、道具系统、连击计分",
133+
"desc_en": "Cyberpunk snake game with D-pad + swipe controls, wall obstacles, power-ups, combo scoring",
134+
"category": "games",
135+
"file": "scripts/games/neon_snake.py",
136+
"thumbnail": null,
137+
"version": 1,
138+
"file_type": "py",
139+
"author": "官方",
140+
"author_en": "Official",
141+
"tags": ["scene", "touch", "game", "snake", "dpad"],
142+
"requires": [],
143+
"min_app_version": "1.5.0",
144+
"added": "2026-03-18",
145+
"updated": null,
146+
"status": "active",
147+
"lines": 500
148+
},
149+
{
150+
"id": "jump_tower",
151+
"name": "无尽跳塔",
152+
"name_en": "Endless Jump Tower",
153+
"desc": "无尽垂直跳跃游戏。触屏控制移动方向,自动弹跳,多种平台类型,越高难度越大",
154+
"desc_en": "Endless vertical jumper with auto-bounce, multiple platform types, increasing difficulty",
155+
"category": "games",
156+
"file": "scripts/games/jump_tower.py",
157+
"thumbnail": null,
158+
"version": 1,
159+
"file_type": "py",
160+
"author": "官方",
161+
"author_en": "Official",
162+
"tags": ["scene", "touch", "game", "jump", "endless"],
163+
"requires": [],
164+
"min_app_version": "1.5.0",
165+
"added": "2026-03-18",
166+
"updated": null,
167+
"status": "active",
168+
"lines": 350
169+
},
170+
{
171+
"id": "whack_mole",
172+
"name": "极速打地鼠",
173+
"name_en": "Whack-a-Mole",
174+
"desc": "限时打地鼠挑战。普通/金色/炸弹三种地鼠,连击加分,粒子特效,多关卡递进",
175+
"desc_en": "Timed whack-a-mole with 3 mole types, combo bonuses, particle effects, progressive levels",
176+
"category": "games",
177+
"file": "scripts/games/whack_mole.py",
178+
"thumbnail": null,
179+
"version": 1,
180+
"file_type": "py",
181+
"author": "官方",
182+
"author_en": "Official",
183+
"tags": ["scene", "touch", "game", "whack", "timer"],
184+
"requires": [],
185+
"min_app_version": "1.5.0",
186+
"added": "2026-03-18",
187+
"updated": null,
188+
"status": "active",
189+
"lines": 427
190+
}
191+
]
192+
}

0 commit comments

Comments
 (0)